Closed asurdej-comcast closed 3 months ago
Patch submitted upstream for review as https://bugs.webkit.org/show_bug.cgi?id=272167 / https://github.com/WebKit/WebKit/pull/26856
Landed upstream as https://github.com/eocanha/WebKit/commit/40cfa6a6170658709d2eafdc10657bc67a6ec207. Backported it to wpe-2.38 as https://github.com/WebPlatformForEmbedded/WPEWebKit/commit/efc4d3d9c50d56fbfa690f68c6a0bfe40c514164 and to the calvaris/wpe-2.42/upstream branch as https://github.com/WebPlatformForEmbedded/WPEWebKit/commit/bb5f5c2fcce2cb1177faa22183cc0ad474e0ece8. Closing PR.
[2.38] Don't trust sinks position when pipeline is not prerolled as behavor is different across devices. Use last cached position instead.
After removing MSE data, sinks get flushed and are not able to return valid playback time. Some implementation returns invalid time, 0.00 or even some random value. This value may be then reported up to HTMLMediaElement that may be confusing to web applications.
This fixes Disney+ video "Restart" button as application may skip currentTime change to 0.00 because video element already reports that position is 0.00: 1) Video play at position x.xx 2) pause 3) Remove video and audio MSE data 4) video.currentTime is 0.00 so no need to change it (position reported by sink with no preroll) 5) Append new data and start playback 6) Position returns back to x.xx