Publishing with .ogg
afrotoast
06 Mar 2016, 06:38Hi guys, I've hit another issue that's really weird.
I've been working on a Game.aslx that has a Music.mp3 playing on loop in the background as a BGM. I wanted to also include room transition sounds and so I used the following code to play .ogg files with a "Print Expression":
"<audio src=\"" + GetFileURL("Door Open 1.ogg") + "\" autoplay></audio>"
That works fine, and I can publish the game into a Game.quest and the audio goes over just fine.
---
Fast forward to today, I created a new blank project to test out a new mechanic i wanted to add into the game. This one plays a series of timed messages synchronized to an audio track that starts when you type "Play Media".
I used the same command as above to play the .ogg files, and it works fine when i test the game in Game2.aslx, but when I publish the file to Game2.quest, I noticed that the .ogg files no longer play. I've tried making sure that they're in the same folder and all but it just doesn't seem to work - which confuses me because i can't see what i'm doing differently with both Game.aslx and Game2.aslx. If it works with the first why doesn't it work with the other?
I've been working on a Game.aslx that has a Music.mp3 playing on loop in the background as a BGM. I wanted to also include room transition sounds and so I used the following code to play .ogg files with a "Print Expression":
"<audio src=\"" + GetFileURL("Door Open 1.ogg") + "\" autoplay></audio>"
That works fine, and I can publish the game into a Game.quest and the audio goes over just fine.
---
Fast forward to today, I created a new blank project to test out a new mechanic i wanted to add into the game. This one plays a series of timed messages synchronized to an audio track that starts when you type "Play Media".
I used the same command as above to play the .ogg files, and it works fine when i test the game in Game2.aslx, but when I publish the file to Game2.quest, I noticed that the .ogg files no longer play. I've tried making sure that they're in the same folder and all but it just doesn't seem to work - which confuses me because i can't see what i'm doing differently with both Game.aslx and Game2.aslx. If it works with the first why doesn't it work with the other?

XanMag
06 Mar 2016, 07:33Not sure if this will help but did you add the .ogg extension type to the list in the game attributes?

jaynabonne
06 Mar 2016, 10:41Two thoughts:
1) The ogg file is encoded differently. Does it work if you use the ogg file from game in game2?
2) The filename isn't quite right. I was suspicious of the spaces in the original name you showed, but you said it worked, so I'll accept that.
But make sure that the case is the same in both your source and the file name (e.g "Audio.ogg" vs "audio.ogg"), as Windows is forgiving of file name case differences, but other things might not be. Also, try using a very simple name (e.g. "a.ogg") just to rule that out as a possibility.
You could rename the .quest file to a .zip and open it and see that the .ogg file is actually in there. And also beware of trying to put things in subfolders. I never had any luck with that.
1) The ogg file is encoded differently. Does it work if you use the ogg file from game in game2?
2) The filename isn't quite right. I was suspicious of the spaces in the original name you showed, but you said it worked, so I'll accept that.

You could rename the .quest file to a .zip and open it and see that the .ogg file is actually in there. And also beware of trying to put things in subfolders. I never had any luck with that.