Closed
Bug 1238862
Opened 9 years ago
Closed 9 years ago
[TV][Seamless experience] The total length of video should not be 00:00
Categories
(Firefox OS Graveyard :: Gaia::TV, defect)
Tracking
(blocking-b2g:2.5+, b2g-v2.5 verified, b2g-master verified)
VERIFIED
FIXED
blocking-b2g | 2.5+ |
People
(Reporter: cynthiatang, Assigned: Fischer)
References
Details
(Whiteboard: [ft:conndevices][partner-cherry-pick][partner-blocker])
Attachments
(1 file)
(deleted),
text/x-github-pull-request
|
rexboy
:
review+
jocheng
:
approval-gaia-v2.5+
|
Details |
STR:
1. Receive the request for the cast video (Real TV)
2. Check the total length of video
Expect result:
- The total length of video should not be 00:00
Actual Result:
- The total length of video is 00:00
Reporter | ||
Updated•9 years ago
|
QA Whiteboard: [COM=TV Seamless Experience]
Updated•9 years ago
|
Blocks: TV_Testing_2.6
Reporter | ||
Comment 1•9 years ago
|
||
Hi Fischer,
Could you please update the analytical results? Thank you!
Flags: needinfo?(fliu)
Updated•9 years ago
|
blocking-b2g: --- → 2.5+
Whiteboard: [ft:conndevices] → [ft:conndevices][partner-blocker]
Updated•9 years ago
|
Whiteboard: [ft:conndevices][partner-blocker] → [ft:conndevices][POVB]
Comment 2•9 years ago
|
||
More information.
From app side. The logic of JS code is like.
console.log(video.duration) // called on evt 'durationchange' received. value will be NaN.
...
console.log("metadataloaded") // called on evt 'loadedmetadata' received.
...
console.log(video.duration) // called on evt 'durationchange' received. value will be displayed correctly.
The first 'durationchange' & 'loadedmetadata' is fired from [1],[2].
According to w3c spec [3].
===========
...
The user agent must determine the duration of the media resource before playing any part of the media data and before setting readyState to a value equal to or greater than HAVE_METADATA, even if doing so requires fetching multiple parts of the resource.
...
===========
And the 'readyState' is set here [4]. So that, app(js) should be able to obtain correct duration when the 1st 'durationchange' evt arrived.
The duration is obtained from this call [5], and mDecoder should be responsible of providing it.
[1] https://dxr.mozilla.org/mozilla-central/rev/ad1f85f172b7302bef0fa9780df8e2b962780ac6/dom/html/HTMLMediaElement.cpp#3391
[2] https://dxr.mozilla.org/mozilla-central/rev/ad1f85f172b7302bef0fa9780df8e2b962780ac6/dom/html/HTMLMediaElement.cpp#3395
[3] https://www.w3.org/TR/html5/embedded-content-0.html#dom-media-duration
[4] https://dxr.mozilla.org/mozilla-central/rev/ad1f85f172b7302bef0fa9780df8e2b962780ac6/dom/html/HTMLMediaElement.cpp#3389
[5] https://dxr.mozilla.org/mozilla-central/rev/ad1f85f172b7302bef0fa9780df8e2b962780ac6/dom/html/HTMLMediaElement.cpp#1623
Fischer, could you provide js code for more detail.
Assignee | ||
Comment 3•9 years ago
|
||
In fling_player.js [1], the fling player get and show the video duration at the loadedmetadata event.
However, the video duration is NaN at the loadedmetadata event so 00:00 is displayed.
We have to wait to get the vaild video duration when the durationchange event fired afterwards.
[1] https://github.com/mozilla-b2g/gaia/blob/v2.5/tv_apps/fling-player/js/fling_player.js#L386
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → fliu
Flags: needinfo?(fliu)
Comment 4•9 years ago
|
||
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8709363 [details]
[gaia] Fischer-L:bug_1238862-fling-player-duration-0 > mozilla-b2g:master
@Rex,
On real TV, video duration is NaN at the loadedmetadate event so 00:00 is displayed.
And valid duration would be available at the durationchange event dispatched later.
To workaround this NaN duration issue, this patch listens to the durationchange event to update video duration info.
Thank you
Attachment #8709363 -
Flags: review?(rexboy)
Comment 6•9 years ago
|
||
Comment on attachment 8709363 [details]
[gaia] Fischer-L:bug_1238862-fling-player-duration-0 > mozilla-b2g:master
Looks good to me.
Attachment #8709363 -
Flags: review?(rexboy) → review+
Assignee | ||
Comment 7•9 years ago
|
||
Land to master: https://github.com/mozilla-b2g/gaia/commit/b1b2bf885e99480a8994733fe64fb71fc8e45bc0
Test: https://github.com/mozilla-b2g/gaia/commit/b1b2bf885e99480a8994733fe64fb71fc8e45bc0
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment hidden (typo) |
Updated•9 years ago
|
Attachment #8709363 -
Flags: approval-gaia-v2.5?(jocheng)
Assignee | ||
Comment 9•9 years ago
|
||
Comment on attachment 8709363 [details]
[gaia] Fischer-L:bug_1238862-fling-player-duration-0 > mozilla-b2g:master
[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): 1238862
[User impact] if declined: The video duration would be 00:00
[Testing completed]: Yes
[Risk to taking this patch] (and alternatives if risky): Low
[String changes made]: None
Attachment #8709363 -
Flags: approval-gaia-v2.5?(jocheng)
Comment 10•9 years ago
|
||
Comment on attachment 8709363 [details]
[gaia] Fischer-L:bug_1238862-fling-player-duration-0 > mozilla-b2g:master
Approve for TV 2.5
Attachment #8709363 -
Flags: approval-gaia-v2.5?(jocheng) → approval-gaia-v2.5+
Updated•9 years ago
|
status-b2g-v2.5:
--- → affected
status-b2g-master:
--- → fixed
Updated•9 years ago
|
Whiteboard: [ft:conndevices][POVB] → [ft:conndevices][partner-cherry-pick]
Assignee | ||
Updated•9 years ago
|
Whiteboard: [ft:conndevices][partner-cherry-pick] → [ft:conndevices][partner-cherry-pick][partner-blocker]
Comment 11•9 years ago
|
||
Reporter | ||
Comment 12•9 years ago
|
||
Verify:
========= Master: Passed ===================
gaia:
https://github.com/mozilla-b2g/gaia/commit/77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0
gecko:
https://hg.mozilla.org/mozilla-central/rev/a1b94785b48437662c696c9143ed92639e9617b2
========= v2.5: Passed ===================
gaia:
https://github.com/mozilla-b2g/gaia/commit/8a0d9deb2cd47df25750ed2c6820909e4feac3bb
gecko:
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/ae919160ce8c6a6e9c6d86017b02e1345dea382d
mulet:
https://hg.mozilla.org/releases/mozilla-b2g44_v2_5/rev/ae919160ce8c6a6e9c6d86017b02e1345dea382d
You need to log in
before you can comment on or make changes to this bug.
Description
•