Closed Bug 802310 Opened 12 years ago Closed 6 years ago

Adding, removing audio element, then adding another audio element causes strange behaviour

Categories

(Core :: Audio/Video: Playback, defect)

11 Branch
x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: yo, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1
Build ID: 20120907231657

Steps to reproduce:

The main problem is with the website http://www.radiobattletoads.com/. I've set up a more simple environment for this bug report, here: http://www.radiobattletoads.com/prueba.html

Just follow the steps described in the website: add dinamically an audio element pointing to a stream, remove it, and then add another audio element pointing to the same stream.


Actual results:

The second time you add an audio element, the first seconds from the first one you've added are played, then silence happens until the player reaches the proper starting time, and the player starts playing from where it should be.


Expected results:

The second audio element should have nothing to do with the first one. When the second audio element is added, the stream should start from where it should.
I've made a simple regression test. I've tested the site on Firefox 4, 8, 9, 10, 11, 12, 15 and 16.

It seems Firefox 4-10 are unaffected. Firefox 11 onwards are affected.
Summary: Adding, removing, and then adding an audio element causes strange behaviour → Adding, removing audio element, then adding another audio element causes strange behaviour
Regression window(cached m-c)
Good:
http://hg.mozilla.org/mozilla-central/rev/84117219ded0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111125 Firefox/11.0a1 ID:20111125031016
Bad:
http://hg.mozilla.org/mozilla-central/rev/655742c3b022
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111125 Firefox/11.0a1 ID:20111125015409
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=84117219ded0&tochange=655742c3b022


Regression window(cached m-i)
Good:
http://hg.mozilla.org/integration/mozilla-inbound/rev/a4492c6d02b0
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111124 Firefox/11.0a1 ID:20111124173310
Bad:
http://hg.mozilla.org/integration/mozilla-inbound/rev/37f51b143fad
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111124 Firefox/11.0a1 ID:20111124181610
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=a4492c6d02b0&tochange=37f51b143fad


Suspected : Bug 703379
Blocks: 703379
Status: UNCONFIRMED → NEW
Component: General → Video/Audio
Ever confirmed: true
Keywords: regression
OS: Linux → All
Version: 16 Branch → 11 Branch
Attached file test2 html
When I open audio(same src) in the other tab again, this problem also happens.

Steps to reproduce:
 1. Open test2 html in New Tab
 2. After audio started, Close the tab several seconds later.
 3. Open test2 html in New Tab again

Actual results:
 Same problem of comment#0 happens

And regression range is same as comment #2
This is a live stream, right?

For better or worse, our behavior is actually allowed by the HTML5 spec. We are allowed to assume that two loads with the same URL represent the same resource.

You could work around this by adding query parameters to make the URLs different.
Thanks for the workaround. I'm now applying it to my website, and I'm happy. 

BUT, even when that's allowed by the HTML5 spec, I don't think that this is a good idea for live streams. Spec says nothing about that?
It is a very good idea for non-live streams, and unfortunately we don't have a reliable way to tell whether a resource is a live stream or not.
So, do you think the good way to go is discussing this on the html 5 spec?
Setting media.cache_size = 0 (restart browser necessary) may help
Component: Audio/Video → Audio/Video: Playback
Mass closing do to inactivity.
Feel free to re-open if still needed.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: