Closed
Bug 1240478
Opened 9 years ago
Closed 9 years ago
MediaStream in video element doesn't guarantee video size on "loadedmetadata"
Categories
(Core :: WebRTC: Audio/Video, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla47
backlog | webrtc/webaudio+ |
People
(Reporter: pehrsons, Assigned: pehrsons)
References
Details
(Keywords: regression)
Attachments
(4 files, 1 obsolete file)
58 bytes,
text/x-review-board-request
|
jesup
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
jib
:
review+
jesup
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
jesup
:
review+
|
Details |
4.43 KB,
patch
|
jesup
:
review+
Sylvestre
:
approval-mozilla-aurora+
Sylvestre
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
See bug 1097260 comment 12,
> Not sure this is properly fixed for WebRTC at least.
>
> When attaching a mediaStream to video.srcObject the loadedmetadata event is fired however the video.videoWidth and video.videoHeight are 0 until the first frame is received which happens on play.
>
> According to the spec[1] the loadedmetadata event should be fired when:
> The user agent has just determined the duration and dimensions of the media resource and the text tracks are ready.
>
> http://dev.w3.org/html5/spec-preview/media-elements.html#event-media-loadedmetadata
We have a special MediaStreamSizeListener in HTMLMediaElement that should cover exactly this case, but I think it broke when roc removed blocking because that listener is now basically added to the playback stream on play().
So, in addition to fixing this, we desperately need basic tests that cover this case.
Assignee | ||
Comment 1•9 years ago
|
||
If my analysis is correct, this is broken in 43 and up.
[Tracking Requested - why for this release]:
That a video element's videoWidth and videoHeight are reliably working when playing streams after its "loadedmetadata" event is a basic feature that we have had to fix before (we got multiple comments requesting it fixed before that). Fixing and uplifting this to Firefox 44 seems too tight, but I think 45 is reasonable.
tracking-firefox45:
--- → ?
Keywords: regression
OS: Unspecified → All
Hardware: Unspecified → All
Version: unspecified → 43 Branch
Comment 2•9 years ago
|
||
Maire, do you know who could help with this?
I am not capable to evaluate the impact on the release. Andreas, could you bit a more explicit for someone who doesn't know WebRTC?
status-firefox43:
--- → wontfix
status-firefox44:
--- → wontfix
status-firefox45:
--- → affected
status-firefox46:
--- → affected
Flags: needinfo?(mreavy)
Comment 3•9 years ago
|
||
This is not a major regression, but it is a noticeable, unfortunate annoyance. I agree with Andreas that this is something we want to fix and uplift to Fx45, but not to Fx44.
Sylvestre: The higher level summary is that there is a mechanism that allows a web dev to know what the resolution of a video is before receiving the first frame. This broke when Bug 1189506 landed. This regression is not critical (e.g. no one has pinged me or anyone on the team about it until now even though Fx43 is about to be replaced by Fx44 as our release) -- a developer can find out this information later in the sequence when the first frame is received -- but this regression definitely violates the spec (would be annoying to a web dev, especially since it was working previously), and we want to fix it.
Pehrsons, Roc, Padenot -- This is not a firedrill, but I'd like to get this fixed sometime in the next 2 weeks and then uplift it early in Fx45. Would one of you like to take this, or shall I find someone else? If you don't want to or can't take this, can you comment on the best way to fix this (if you have opinions/suggestions), especially given we'll want to uplift the fix? Thanks.
Flags: needinfo?(roc)
Flags: needinfo?(pehrsons)
Flags: needinfo?(padenot)
Flags: needinfo?(mreavy)
Assignee | ||
Comment 4•9 years ago
|
||
I can take it as soon as I free up some brain cells from cloning. I think it's as easy as moving the frame size listener from UpdateSrcMediaStreamPlaying() to Setup/EndSrcMediaStreamPlaying(). I also want to add an NS_ASSERTION to verify that videoWidth and Videoheight have been set as we issue "loadedmetadata".
Flags: needinfo?(pehrsons)
Comment 5•9 years ago
|
||
Thanks, Andreas. I'll plan on your taking it this and getting a fix into Fx45 in early Beta or earlier. (FYI: I think of "early Beta" as the first 2 weeks of Beta -- which for Fx45 would mean on or before Feb 5th.)
backlog: --- → webrtc/webaudio+
Rank: 10
Flags: needinfo?(roc)
Flags: needinfo?(padenot)
Priority: -- → P1
Assignee | ||
Comment 7•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/31735/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/31735/
Attachment #8710384 -
Flags: review?(roc)
Assignee | ||
Comment 8•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/31737/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/31737/
Attachment #8710385 -
Flags: review?(roc)
Attachment #8710385 -
Flags: review?(jib)
Assignee | ||
Comment 9•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/31739/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/31739/
Attachment #8710386 -
Flags: review?(roc)
Assignee | ||
Comment 10•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/31741/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/31741/
Attachment #8710387 -
Flags: review?(roc)
Assignee | ||
Comment 11•9 years ago
|
||
When I tested I just didn't get "loadedmetadata" without play()ing. It's bad, but not as bad as we feared.
Updated•9 years ago
|
Assignee: nobody → pehrsons
Comment 12•9 years ago
|
||
Comment on attachment 8710385 [details]
MozReview Request: Bug 1240478 - Add test for video size on 'loadedmetadata'. r?jesup,jib
https://reviewboard.mozilla.org/r/31737/#review28517
Attachment #8710385 -
Flags: review?(jib) → review+
Assignee | ||
Updated•9 years ago
|
Attachment #8710384 -
Flags: review?(roc) → review?(rjesup)
Assignee | ||
Updated•9 years ago
|
Attachment #8710385 -
Flags: review?(roc) → review?(rjesup)
Assignee | ||
Updated•9 years ago
|
Attachment #8710386 -
Flags: review?(roc) → review?(rjesup)
Assignee | ||
Updated•9 years ago
|
Attachment #8710387 -
Flags: review?(roc) → review?(rjesup)
Updated•9 years ago
|
Attachment #8710384 -
Flags: review?(rjesup) → review+
Comment 13•9 years ago
|
||
Comment on attachment 8710384 [details]
MozReview Request: Bug 1240478 - Remove Mutex from MediaStreamSizeListener. r?jesup
https://reviewboard.mozilla.org/r/31735/#review28609
Comment 14•9 years ago
|
||
Comment on attachment 8710385 [details]
MozReview Request: Bug 1240478 - Add test for video size on 'loadedmetadata'. r?jesup,jib
https://reviewboard.mozilla.org/r/31737/#review28611
Attachment #8710385 -
Flags: review?(rjesup) → review+
Comment 15•9 years ago
|
||
Comment on attachment 8710386 [details]
MozReview Request: Bug 1240478 - Assert that we know the video size on 'loadedmetadata'. r?jesup
https://reviewboard.mozilla.org/r/31739/#review28613
Attachment #8710386 -
Flags: review?(rjesup) → review+
Comment 16•9 years ago
|
||
Comment on attachment 8710387 [details]
MozReview Request: Bug 1240478 - Have MediaStreamSizeListener active at all times, not only when playing. r?jesup
https://reviewboard.mozilla.org/r/31741/#review28615
Attachment #8710387 -
Flags: review?(rjesup) → review+
Assignee | ||
Comment 17•9 years ago
|
||
Comment on attachment 8710384 [details]
MozReview Request: Bug 1240478 - Remove Mutex from MediaStreamSizeListener. r?jesup
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31735/diff/1-2/
Attachment #8710384 -
Attachment description: MozReview Request: Bug 1240478 - Remove Mutex from MediaStreamSizeListener. r?roc → MozReview Request: Bug 1240478 - Remove Mutex from MediaStreamSizeListener. r?jesup
Assignee | ||
Comment 18•9 years ago
|
||
Comment on attachment 8710385 [details]
MozReview Request: Bug 1240478 - Add test for video size on 'loadedmetadata'. r?jesup,jib
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31737/diff/1-2/
Attachment #8710385 -
Attachment description: MozReview Request: Bug 1240478 - Add test for video size on 'loadedmetadata'. r?roc,jib → MozReview Request: Bug 1240478 - Add test for video size on 'loadedmetadata'. r?jesup,jib
Assignee | ||
Comment 19•9 years ago
|
||
Comment on attachment 8710386 [details]
MozReview Request: Bug 1240478 - Assert that we know the video size on 'loadedmetadata'. r?jesup
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31739/diff/1-2/
Attachment #8710386 -
Attachment description: MozReview Request: Bug 1240478 - Assert that we know the video size on 'loadedmetadata'. r?roc → MozReview Request: Bug 1240478 - Assert that we know the video size on 'loadedmetadata'. r?jesup
Assignee | ||
Comment 20•9 years ago
|
||
Comment on attachment 8710387 [details]
MozReview Request: Bug 1240478 - Have MediaStreamSizeListener active at all times, not only when playing. r?jesup
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/31741/diff/1-2/
Attachment #8710387 -
Attachment description: MozReview Request: Bug 1240478 - Have MediaStreamSizeListener active at all times, not only when playing. r?roc → MozReview Request: Bug 1240478 - Have MediaStreamSizeListener active at all times, not only when playing. r?jesup
Assignee | ||
Comment 21•9 years ago
|
||
I rebased and fixed a detail in the last patch.
Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d3bf507b23aa
Comment 22•9 years ago
|
||
Comment 23•9 years ago
|
||
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/601943e5bee5
https://treeherder.mozilla.org/#/jobs?repo=try&revision=639fc43f725e,ead4a726df58,83425612b633 is, from the bottom up, your parent rev, you, and you backed out. Somehow this media patch causes a 50% failure in a font-matching reftest. I'm trying to imagine a way that that would be a good and reasonable thing, and coming up empty.
Assignee | ||
Comment 24•9 years ago
|
||
roc, do you by any chance have a clue to how I could have caused these bizarre failures?
Flags: needinfo?(roc)
No idea. You could try bisecting the patches to see which one appears to cause the regression.
Flags: needinfo?(roc)
Assignee | ||
Comment 26•9 years ago
|
||
It must be the last one, because this is the video size assert and it passes: https://treeherder.mozilla.org/#/jobs?repo=try&revision=aa1882aaedef
And the last one is the actual fix.
Assignee | ||
Comment 27•9 years ago
|
||
This is a workaround for the font reftest issue. It basically makes sure that the stream size listener will have been removed by the time those font tests run (not sure if it was still applied without the workaround, but the original patch definitely changed the timing of when it was removed, while this restores it somewhat).
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=961add745471&selectedJob=16076378
Attachment #8710387 -
Attachment is obsolete: true
Attachment #8713495 -
Flags: review?(rjesup)
Comment 28•9 years ago
|
||
Comment on attachment 8713495 [details] [diff] [review]
Have MediaStreamSizeListener active immediately, until the initial size is known
Review of attachment 8713495 [details] [diff] [review]:
-----------------------------------------------------------------
Still makes absolutely no sense, but r+
Attachment #8713495 -
Flags: review?(rjesup) → review+
Comment 29•9 years ago
|
||
Comment 30•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/16928e1771ca
https://hg.mozilla.org/mozilla-central/rev/ca4fa9403dc6
https://hg.mozilla.org/mozilla-central/rev/b35aa9ae63e8
https://hg.mozilla.org/mozilla-central/rev/ad5c4de4b923
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Assignee | ||
Comment 31•9 years ago
|
||
Comment on attachment 8713495 [details] [diff] [review]
Have MediaStreamSizeListener active immediately, until the initial size is known
Approval Request Comment
[Feature/regressing bug #]: 1189506
[User impact if declined]: See comment 3.
[Describe test coverage new/current, TreeHerder]: Covered by mochitest in m-c.
[Risks and why]: Low risk; small change, has mochitest on m-c.
[String/UUID change made/needed]: None.
Attachment #8713495 -
Flags: approval-mozilla-beta?
Attachment #8713495 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 32•9 years ago
|
||
Comment on attachment 8713495 [details] [diff] [review]
Have MediaStreamSizeListener active immediately, until the initial size is known
Oh, and only this patch is requested to be uplifted.
Comment 33•9 years ago
|
||
Comment on attachment 8713495 [details] [diff] [review]
Have MediaStreamSizeListener active immediately, until the initial size is known
Fix a regression, taking it.
Should be in 45 beta 2.
Attachment #8713495 -
Flags: approval-mozilla-beta?
Attachment #8713495 -
Flags: approval-mozilla-beta+
Attachment #8713495 -
Flags: approval-mozilla-aurora?
Attachment #8713495 -
Flags: approval-mozilla-aurora+
Comment 34•9 years ago
|
||
bugherder uplift |
Comment 35•9 years ago
|
||
bugherder uplift |
You need to log in
before you can comment on or make changes to this bug.
Description
•