Bug 231017

Summary: [MSE][GStreamer] Allow infinite duration on MSE
Product: WebKit Reporter: Enrique Ocaña <eocanha>
Component: MediaAssignee: Enrique Ocaña <eocanha>
Status: RESOLVED FIXED    
Severity: Normal CC: aboya, calvaris, cgarcia, eric.carlson, ews-watchlist, glenn, gustavo, jer.noble, menard, philipj, pnormand, sergio, vjaquez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Enrique Ocaña 2021-09-30 03:34:44 PDT
Positive infinite duration isn't properly working on MSE in the glib (GStreamer) ports. When such a duration is set, nothing happens and the default zero duration remains. This can break some live streams.

My test case was a live stream in a player based on dash.js 4.0.0. The duration is set to infinity (but remains as zero due to the bug) and an initial seek to the current (huge) position is done. The wrong duration has influence in the real seek target time used[1], so the seek may end up being done to the wrong time (before the buffered ranges in my case) and the playback never starts.

[1] https://github.com/WebKit/WebKit/blob/a12c487/Source/WebCore/html/HTMLMediaElement.cpp#L3153
Comment 1 Enrique Ocaña 2021-09-30 03:44:48 PDT
Created attachment 439721 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2021-09-30 03:52:42 PDT
Comment on attachment 439721 [details]
Patch

LGTM, but let's wait for Alicia.
Comment 3 EWS 2021-09-30 05:47:36 PDT
Committed r283309 (242334@main): <https://commits.webkit.org/242334@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439721 [details].
Comment 4 Radar WebKit Bug Importer 2021-09-30 05:48:16 PDT
<rdar://problem/83715383>