Closed
Bug 501708
Opened 16 years ago
Closed 15 years ago
Short OGG audio files stutter and appear to start playing twice when manually played
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jhuckaby, Unassigned)
References
()
Details
Attachments
(1 file)
9.91 KB,
audio/ogg
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.18 (KHTML, like Gecko) Version/4.0.1 Safari/530.18
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5
When a short (1 -2 second) OGG audio file is embedded via the <audio> element and includes the "autoplay" attribute, it plays correctly. However, if the audio element is then played via JavaScript (by calling the play() function), the playback stutters and appears to play the sound twice.
Reproducible: Always
Steps to Reproduce:
1. Visit http://bowser.macminicolo.net/~jhuckaby/firefox/ogg/short.html
2. Notice that the sound autoplays just fine the first time.
3. Click the "Play" button to play the sound again.
Actual Results:
Notice the playback stutters and appears to play the sound twice, when activated by JavaScript.
Expected Results:
The sound should play without stuttering, and only play once.
The beginning of the sound also appears chopped off, and very, very short sounds (0.25 seconds) do not play at all.
Reporter | ||
Comment 1•16 years ago
|
||
This sound file reproduces the bug when played in Firefox 3.5 using JavaScript. It was converted from AIFF using vorbis-tools oggenc on Mac OS X 10.5.7.
Updated•16 years ago
|
Component: General → Video/Audio
Product: Firefox → Core
QA Contact: general → video.audio
Version: unspecified → 1.9.1 Branch
Comment 2•16 years ago
|
||
Appears to be branch-only on Windows.
Comment 3•16 years ago
|
||
I can reproduce this in Firefox 3.5.1 on Mac OS X 10.5.7.
If autoplay is disabled, then JavaScript plays the sound correctly the first time.
The sound also stutters when using Firefox's built in controls.
If audio.currentTime is set before calling audio.play, the sound stutters the same way every time.
I cannot reproduce this in MInefield(2009-07-24) on Mac OS X 10.5.7.
Comment 4•16 years ago
|
||
Different short audio demo: http://dingoskidneys.com/~dholth/clock/
Comment 5•15 years ago
|
||
I was able to reproduce comment #1 and comment #2's bugs with 3.5 on Linux (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2).
On trunk (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20090903 Minefield/3.7a1pre), the sound doesn't play at all a second time.
On IRC today, GPHemsley mentioned that http://upload.wikimedia.org/wikipedia/commons/c/c9/Near-open_front_unrounded_vowel.ogg stutters on the second play in 3.5, but plays fine in trunk. (Although now that I listen to it again, the initial play seems to start a short bit into the file.)
Comment 6•15 years ago
|
||
Hm. The file in comment #1 just doesn't work well in trunk. I get different behavior as I refresh the file. Sometimes, I can play the whole thing repeatedly without problems. Sometimes, it sounds like the beginning or end is slightly cut off. Sometimes, it stutters slightly at the end. Sometimes I can only play the file once -- subsequent plays don't move the progress bar or play any sound.
It seems that when the end is cut off on the initial play, subsequent plays don't work until I refresh the page. I'm not positive that's always the case, but it seems pretty consistent.
Comment 7•15 years ago
|
||
I think we have enough information to confirm this and determine that it's neither the JavaScript nor the <audio> element that is actually the problem. Rather, it is attempting to manually play an OGG file that causes the stuttering. (I don't know, nor do I know how to find out, whether the file has to have been played once automatically first.) I have changed the bug summary to reflect this.
For the record, there are many more files on Wikipedia that do the stuttering, including probably all of the IPA sounds. Here are a couple more examples:
http://upload.wikimedia.org/wikipedia/commons/7/71/Open-mid_front_unrounded_vowel.ogg
http://upload.wikimedia.org/wikipedia/commons/d/db/Schwa.ogg
(The vowels are easier to hear because the consonants have a repetition built-in, in addition to the stuttering Firefox does.)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Short OGG audio files stutter, and appear to play twice when activated by JavaScript → Short OGG audio files stutter and appear to start playing twice when manually played
Comment 8•15 years ago
|
||
This isn't just an issue with short files. The audio tag on http://www.position-absolute.com/articles/introduction-to-the-html5-audio-tag-javascript-manipulation/ will play the first fraction of a second twice the second time I play it. Jump to the end of the file and hit play, and you should be able to hear it stutter a little as it starts from the beginning. Autoplay is off and the first manual play appears to work as correctly.
Comment 9•15 years ago
|
||
Yes, this is a known problem with the liboggplay library we are using. It returns different audio data on a second play for the first part of the audio vs the original play.
Bug 512328 may contain a fix for this.
Comment 10•15 years ago
|
||
I can no longer reproduce this on trunk or in 1.9.2 nightlies on Windows. Joesph, would you be able to download a nightly and confirm this is fixed?
Reporter | ||
Comment 11•15 years ago
|
||
I cannot reproduce the bug on the latest nightly: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20090917 Minefield/3.7a1pre
Hooray!
Comment 12•15 years ago
|
||
Great! Resolving bug.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
Updated•15 years ago
|
Version: 1.9.1 Branch → 1.9.2 Branch
Comment 13•15 years ago
|
||
So, does that mean no one is going to attempt to track this down for 1.9.1?
Comment 15•15 years ago
|
||
(In reply to comment #13)
> So, does that mean no one is going to attempt to track this down for 1.9.1?
Still wondering about this....
Comment 16•15 years ago
|
||
It doesn't seem worth it, given the severity of the bug and how close 1.9.2 is to release.
Reporter | ||
Comment 17•15 years ago
|
||
Just wanted to say, thanks for fixing this one, guys. I now have true native HTML 5 audio on all my JavaScript games in FF 3.6!
Shameless plug: http://www.effectgames.com/effect/games/crystalgalaxy/
You need to log in
before you can comment on or make changes to this bug.
Description
•