Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 3e214abe945921fb2ebbf234c7bfd1dab35cea9e https://github.com/WebKit/WebKit/commit/3e214abe945921fb2ebbf234c7bfd1dab35cea9e Author: Enrique Ocaña González <eoca...@igalia.com> Date: 2024-02-14 (Wed, 14 Feb 2024)
Changed paths: M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp Log Message: ----------- [GStreamer] Buffer end equals video duration for progressive video https://bugs.webkit.org/show_bug.cgi?id=269203 Reviewed by Philippe Normand. On some long regular videos, the current buffer management mechanism reports 100% of the video as loaded when that's not actually happening. This causes document.getElementsByTagName('video')[0].buffered.end(0) to be equal to document.getElementsByTagName('video')[0].duration when that should clearly not the case. The current default way of computing m_maxTimeLoaded isn't working properly because oftern, when the buffering messages are received by MediaPlayerPrivateGStreamer, the duration is still unknown and the code in charge of computing the fill status bails out. The WebKitWebSrc network downloading statistics provide a much more accurate source of information for the buffered data, and should be used in more cases when available. The download statistics tend to arrive later than the buffer fill messages and at that moment duration is already available, leading to a proper computation of m_maxTimeLoaded. See: https://github.com/WebPlatformForEmbedded/WPEWebKit/pull/1238 This patch calls updateMaxTimeLoaded() when the network statistics are received. That update must be done here because the current system in place to perform such update is based on m_fillTimer, and when the network stats are received the timer is usually already stopped. This method works fine both with on-disk cache and without it (the typical use case on set-top-box devices). Original patch authored by: suresh-khurdiya-epam <skhurdiya.contrac...@libertyglobal.com> * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::handleMessage): When a webkit-network-statistics message is received, compute the fill status and update m_maxTimeLoaded. Canonical link: https://commits.webkit.org/274643@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes