Audio not playing in IE9

Get help using Construct 2

Post » Mon Dec 17, 2012 8:28 pm

Release 108.2:

Hi,

I'm having some trouble with the audio in my first game. Specifically, the music and some of the sounds are not playing in my game when running in IE9. However, they play nicely when running in Chrome, OR when previewing the game in IE9 from Construct.

When the game is running, it takes a while until some of the sounds show up ('jumping' and 'landing'), and sounds such as 'walking', and the music tracks do not play at all.

Do you have any idea why this is?

Link to the game on my website:
http://danieltraun.dk/mm

Link to the .capx on Dropbox:
https://dl.dropbox.com/u/40033636/MM.capx

Best regards,
DanielTraun2012-12-18 06:12:22
B
2
Posts: 5
Reputation: 410

Post » Tue Dec 18, 2012 6:11 am

Updated with the correct links - found out that clickable URLs are not allowed for new users -.-

I thought sound was supposed to play nicely in IE9, when letting Construct 2 convert the waves into MPEG-4-Audio-files?
B
2
Posts: 5
Reputation: 410

Post » Tue Dec 18, 2012 3:40 pm

The most common reason audio doesn't work in IE9 is because the server MIME types are set up incorrectly. Make sure .m4a is associated with audio/mp4 (and I noticed your appcache is not set correctly either - .appcache should be text/cache-manifest)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Tue Dec 18, 2012 6:09 pm

Thanks a lot for the answer, I will look into this. Unfortunately, I have no idea of what MIME types are, or where my appcache is located. But I guess I'll find out :)
B
2
Posts: 5
Reputation: 410

Post » Tue Dec 18, 2012 6:35 pm

First off, I like your game. Great job.

I used Fiddler2 to monitor traffic to your site, and it reports that your audio files have a MIME type of audio/mpeg. According to Ashley's post above, the MIME type needs to be audio/mp4.

Your web server appears to be Apache. If you do not have privileges to modify Apache's system-wide settings in conf/mime.types, the create a file called .htaccess in your game's folder. It should contain this line:

AddType audio/mp4   m4a

To learn about MIME types, try here:

http://en.wikipedia.org/wiki/Internet_media_type#Type_audio

I haven't tried this myself, so I can't be fully sure this will solve your problem, but I hope it helps.
mattharrington2012-12-18 18:41:14
B
6
S
2
G
3
Posts: 10
Reputation: 2,402

Post » Tue Dec 18, 2012 6:49 pm

Thanks a lot for your answer - that clarified it very much!

Now I just created a .txt-file in the root of my server, named it .htaccess, and included only the line that you wrote. And now I have audio :-)

Now, the only thing still not working is the music track playing in the first 3 levels (the music in the last level starts to play as intended). This might be my fault, though; I've set 4-5 sounds to preload in the beginning of the first layout, and I guess this might clash with the streaming of the music?

Again: Thanks a bunch to the both of you. The game is just a silly little excuse for the actual message, which is in the fourth and final layout: That my wife and I are going to be parents. We then intend to make our parents play the game through (with us in the room). That's also why it's so easy, and borrows graphics :D

Apart from that, it's a great opportunity to learn Construct 2 - I really like this program!Traun2012-12-18 18:50:45
B
2
Posts: 5
Reputation: 410

Post » Tue Dec 18, 2012 7:17 pm

Tillykke!

If it's marima.mp4, then IE cannot find it. Using Fiddler2, I see that your server returns a 404 error saying:

The requested URL /mm/media/marima.m4a was not found on this server.

If that is indeed your soundtrack, then I don't know why it plays in Chrome because http://danieltraun.dk/mm/media/marima.m4a does not exist. You can check that with any browser, including Chrome.

B
6
S
2
G
3
Posts: 10
Reputation: 2,402

Post » Tue Dec 18, 2012 8:05 pm

Tak! :D

Again many thanks for helping me. In this case, I have only myself to blame, since it was a typo in the renaming I did of the music-files inside Construct 2. The music was playing in Chrome because that browser isn't using the .m4a-file, it's using the .ogg-file - which was correctly named.

Much appreciated!
B
2
Posts: 5
Reputation: 410


Return to How do I....?

Who is online

Users browsing this forum: DiabloOvermind, emoticon, MrWhizm, Skebab, Yahoo [Bot] and 17 guests