Jump to content

A specific MP3 file won't play


ylluminarious
 Share

Recommended Posts

I have two sounds that I'm trying to play in a game of mine. They're both using the MP3 codec, but one of them is inexplicably not playing in Safari 9 or Firefox 41.0.1 (Mac OS X 10.10.5). It plays just fine in the most recent version of Google Chrome, 47.0.2522.0 dev, but not Safari 9 or Firefox 41.0.1. I'm not sure why one MP3 sound would play while another wouldn't, when they both load just fine and there are no errors thrown, except in Firefox where it complains about not being able to use a given encoding (which doesn't make sense since it plays one of the MP3 sounds).

Here is a demo of both sounds playing: http://cl.ly/231I320F053D. When you open it with Safari 9 or Firefox 41.0.1, you can only hear the jump sound. Any ideas as to what's going wrong here?

 

EDIT:

 

Btw, here's the source code for the demo:

var game = new Phaser.Game(800, 550, Phaser.AUTO, "game", {preload: preload, create: create});function preload () {  intro_music_key  = "intro_music"  intro_music_path = "intro_music.mp3"    game.load.audio(intro_music_key, intro_music_path)    jump_key  = "jump"  jump_path = "jump.mp3"    game.load.audio(jump_key, jump_path)}function create () {  game.add.text(320, 100, "Audio Test", {fill: "white"});    intro_music = game.add.audio(intro_music_key);  intro_music.play();    jump = game.add.audio(jump_key);  jump.play();}
Link to comment
Share on other sites

Random guess, but some players might be confused by the random data at the start of the intro_music.mp3 file -

<br /><b>Warning</b>:  filesize(): stat failed for Heros_Day_Off.mp3 in <b>/home/teknoaxe/public_html/Music/mobile_direct_download.php</b> on line <b>20</b><br /><br /><b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/teknoaxe/public_html/Music/mobile_direct_download.php:20) in <b>/home/teknoaxe/public_html/Music/mobile_direct_download.php</b> on line <b>20</b><br />
Link to comment
Share on other sites

Random guess, but some players might be confused by the random data at the start of the intro_music.mp3 file -

<br /><b>Warning</b>:  filesize(): stat failed for Heros_Day_Off.mp3 in <b>/home/teknoaxe/public_html/Music/mobile_direct_download.php</b> on line <b>20</b><br /><br /><b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /home/teknoaxe/public_html/Music/mobile_direct_download.php:20) in <b>/home/teknoaxe/public_html/Music/mobile_direct_download.php</b> on line <b>20</b><br />

 

Thanks, I got rid of it. That seems to have solved the problem :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...