Problems playing MP3 files from Amazon S3 in IE

  • Problem
  • Updated 3 years ago
  • In Progress
I'm having a problem with SoundManager 2 not playing MP3 files from S3 in an IE browser. No problems in Chrome or Firefox, just IE.

I'm using the latest SoundManager version (2.97a.20120513).

You can see the problem at http://sedeeva.com/pipeup/share/?p=8f.... I turned on SoundManager debugging in the page.

An example of the error is:

SMSound._onload(): "sound_2,1" failed to load? - http://pipeup.s3-website-us-east-1.am...

HTML5::error: 4

The mp3 plays fine directly in the browser, and via script in Chrome and Firefox, so this looks like an IE-specific problem. I'm using
IE v 9.0.8112.16421, but have had reports from other versions as well.

Any suggestions?
Photo of JGJ

JG

  • 2 Posts
  • 0 Reply Likes

Posted 3 years ago

  • 1
Photo of Aswani KumarAK

Aswani Kumar

  • 6 Posts
  • 0 Reply Likes
soundManager.createSound({
id: 'sid',
url: 'http://pipeup.s3-website-us-east-1.am...,
autoPlay: true
});

working fine in IE 9.0.8112.16421
Photo of JGJ

JG

  • 2 Posts
  • 0 Reply Likes
I am using the .createSound method without the "autoplay" option, with a subsequent call to the .play method.

This generates log file output like the below. This only happens on IE, not Chrome or Firefox. Any troubleshooting suggestions appreciated...

SMSound._onload(): "sound_0,0" failed to load? - http://pipeup.s3-website-us-east-1.am...
HTML5::error: 4
SMSound._onload(): "sound_1,0" failed to load? - http://pipeup.s3-website-us-east-1.am...
HTML5::error: 4
HTML5::loadstart: sound_0,0
HTML5::loadstart: sound_1,0
HTML5::waiting: sound_0,0
HTML5::play: sound_0,0, http://pipeup.s3-website-us-east-1.am...
HTML5::emptied: sound_0,0
SMSound.play(): "sound_0,0" is starting to play
HTML5::load: sound_0,0
SMSound.load(): http://pipeup.s3-website-us-east-1.am...
SMSound.play(): Attempting to load "sound_0,0"
soundManager.stopAll()
HTML5::adding event listeners: sound_1,0
creating HTML5 Audio() element with URL: http://pipeup.s3-website-us-east-1.am...
Loading sound sound_1,0 via HTML5
SMSound() merged options: { id: sound_1,0, url: http://pipeup.s3-website-us-east-1.am..., autoLoad: false, stream: true, autoPlay: false, loops: 1, onbeforefinishtime: 5000, onjustbeforefinishtime: 200, multiShot: true, multiShotEvents: false, pan: 0, usePolicyFile: false, volume: 100, usePeakData: false, useWaveformData: false, useEQData: false, bufferTime: 3 }
soundManager.createSound(): sound_1,0 (http://pipeup.s3-website-us-east-1.am...)
HTML5::adding event listeners: sound_0,0
creating HTML5 Audio() element with URL: http://pipeup.s3-website-us-east-1.am...
Loading sound sound_0,0 via HTML5
SMSound() merged options: { id: sound_0,0, url: http://pipeup.s3-website-us-east-1.am..., autoLoad: false, stream: true, autoPlay: false, loops: 1, onbeforefinishtime: 5000, onjustbeforefinishtime: 200, multiShot: true, multiShotEvents: false, pan: 0, usePolicyFile: false, volume: 100, usePeakData: false, useWaveformData: false, useEQData: false, bufferTime: 3 }
soundManager.createSound(): sound_0,0 (http://pipeup.s3-website-us-east-1.am...)
soundManager: Firing 1 onready() item
-- SoundManager 2: loaded --
-- SoundManager 2: HTML5 support tests (/^probably$/i): mp3: true, mp4: true, ogg: false, wav: false --
-- soundManager::init() --
-- SoundManager 2 V2.97a.20110424 (HTML5-only mode) --
Photo of Aswani KumarAK

Aswani Kumar

  • 6 Posts
  • 0 Reply Likes
i have gone through the page and found that its difficult to find problem as there is heavy js.

try to implement a function which play sound on passing url as argument and call the function when needed. im sure this will help fixing the issue.

for example:
-----------------

var rurl = [];
rurl['sid'] = 'myrad';
rurl['surl'] = '';
var playing = false;
var sound = 60;

function rplay(url)
{
rurl['surl'] = url;

if(playing)
soundManager.destroySound(rurl['sid']);

soundManager.createSound({
id: rurl['sid'],
url: rurl['surl'],
volume: sound,
autoPlay: true,
whileplaying: function(){}
});

playing = true;
}
Photo of Scott

Scott, Official Rep

  • 3798 Posts
  • 245 Reply Likes
Sounds like a HTTP response header issue to me; browsers will behave differently, whether using HTML5 or Flash for playback, depending on the response from your server (S3, Apache or what have you.)

Here's what I got from S3 (it played OK in Flash 9):
Content-Length	18360

Content-Type binary/octet-stream
Date Wed, 23 May 2012 01:36:52 GMT
Etag "d9b04cdb1da11bfd0adb60a0faf30b09"
Last-Modified Wed, 09 May 2012 07:00:17 GMT
Server AmazonS3
x-amz-id-2 7ZIWmt41teZqsZ+ab0emRQmzk6ZIO/8ROy8M1WGQ9PKOZ1Gi5IJPfmSBr2pJh01E
x-amz-request-id E1F7739EEADD8DCC
Having content-length is good for showing progress and duration, long story short - people often report weirdness if that one is missing...

Content-Type could be better here, and that's probably the source of the issue. Specify audio/mp3 here if it it in fact an MP3 file, and you're likely to see proper playback in HTML5-based UAs.