High latency when controlling playback of HTML5 audio

RESOLVED INACTIVE

Status

()

RESOLVED INACTIVE
5 years ago
a month ago

People

(Reporter: unas.zole, Unassigned)

Tracking

24 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 816399 [details]
voice_1.mp3

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release)
Build ID: 20130911164256

Steps to reproduce:

Attempted to play then stop the voice_1.mp3 file attached, in Firefox 24 on Windows 7.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0

Run the following commands in console :
var s = new Audio('voice_1.mp3');
s.loop = true;
s.play();

Then wait for a little while for the sound to play, and run :
s.pause();


Actual results:

Sound kept playing until around 1s after the "s.pause()" call was run, and only then did it stop.

It may work every once in a while, but if you try several times the bug should occur quickly.


Expected results:

Sound should have paused immediately.


A few important things to note :

- Other mp3 files apparently play perfectly in Firefox HTML5 Audio, so far I've only seen this latency problem with this particular file.

- The same file plays perfectly in Chrome using HTML5 Audio as well.

- The file plays perfectly in either browser when using the Flash fallback in SoundManager2 library (in particular in Firefox on Linux).

So for some reason, Firefox doesn't seem to like this mp3 file too much, but I don't know why, since it works eveywhere else.
Have you experienced this problem with other files?

Also, it may be worth trying the technique suggested here: http://robert.ocallahan.org/2011/11/latency-of-html5-sounds.html
(Reporter)

Comment 2

5 years ago
Thanks for your answer and sorry for the late reply. :-)

No, so far I haven't seen the problem on other files - though I haven't tried many yet.
Also, I examined basic data (bitrate type, value, sampling, etc.) of this file and they all seem normal : I have other files with the same properties that play fine.

Given that the problem happens only in one specific configuration (Windows 7 + Firefox + HTML5 Audio + this file) while any other combination (using Linux, or Chrome, or Flash Player with this file) I tried work, and that this file looks normal at first sight, I can just guess that there is a problem on the decoder Firefox relies on for HTML5 playback of MP3.
Or maybe a problem with the file, that other decoders recover well, while Firefox's lags ?

Anyway, since I have no knowledge of how Firefox handles audio playback, I'd need help with investigating that.


Also, thanks for the link, but it doesn't correspond to this problem - it intervenes at loading time (to prevent loading again when unnecessary), while my problem happens when controlling playback, in particular when pausing - which shouldn't require loading anything at all.
Component: Audio/Video → Audio/Video: Playback
Mass closing because of inactivity.
Please feel free to re-open if still relevant.
Status: UNCONFIRMED → RESOLVED
Last Resolved: a month ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.