Closed Bug 1236558 Opened 8 years ago Closed 8 years ago

durationchange is fired twice on video, should be once

Categories

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

43 Branch
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: rafarel007, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/47.0.2526.73 Chrome/47.0.2526.73 Safari/537.36

Steps to reproduce:

Add a video tag and a source tag in javascript then listen to all video events


Actual results:

durationchange is fired twice

The first time the video have a readyState = 1
The second time readyState = 4

Here is my console output (events trace)

loadstart (readyState: 0)
durationchange (readyState: 1)
loadedmetadata (readyState: 1)
loadeddata (readyState: 4)
canplay (readyState: 4)
canplaythrough (readyState: 4)
durationchange (readyState: 4)


Expected results:

durationchange should fire only once ? (the first time with ready state = 1)
Component: Untriaged → Audio/Video
Product: Firefox → Core
Component: Audio/Video → Audio/Video: Playback
Please provide a complete test page exhibiting the problem. More than one duration change is perfectly okay. It typically happens on streams where there's a discrepancy between the audio and video track duration. 

As the metadata would show one duration, yet when we read the file we find data past that original duration.

That's why an example is required, as it may be just something to do with your media content.
Flags: needinfo?(rafarel007)
Closing for lack of follow-up. Please reopen if you have a test case you think shows a spec violation.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Flags: needinfo?(rafarel007)
You need to log in before you can comment on or make changes to this bug.