Title: [264087] releases/WebKitGTK/webkit-2.28
Revision
264087
Author
[email protected]
Date
2020-07-08 03:07:41 -0700 (Wed, 08 Jul 2020)

Log Message

Merge r261550 - [GStreamer] Audio messages in web.whatsapp.com only play once.
https://bugs.webkit.org/show_bug.cgi?id=211627

Patch by Philippe Normand <[email protected]> on 2020-05-12
Reviewed by Xabier Rodriguez-Calvar.

Source/WebCore:

Test: media/video-src-blob-replay.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::updateDownloadBufferingFlag): Make sure on-disk
buffering is disabled for blob URIs, because it messes up the pipeline for replays, and it's
useless for that use-case anyway.

LayoutTests:

* media/video-src-blob-replay-expected.txt: Added.
* media/video-src-blob-replay.html: Added.

Modified Paths

Added Paths

Diff

Modified: releases/WebKitGTK/webkit-2.28/LayoutTests/ChangeLog (264086 => 264087)


--- releases/WebKitGTK/webkit-2.28/LayoutTests/ChangeLog	2020-07-08 10:07:35 UTC (rev 264086)
+++ releases/WebKitGTK/webkit-2.28/LayoutTests/ChangeLog	2020-07-08 10:07:41 UTC (rev 264087)
@@ -1,3 +1,13 @@
+2020-05-12  Philippe Normand  <[email protected]>
+
+        [GStreamer] Audio messages in web.whatsapp.com only play once.
+        https://bugs.webkit.org/show_bug.cgi?id=211627
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        * media/video-src-blob-replay-expected.txt: Added.
+        * media/video-src-blob-replay.html: Added.
+
 2020-05-05  Alicia Boya García  <[email protected]>
 
         [GStreamer] Video loops when ran in rr record --chaos

Added: releases/WebKitGTK/webkit-2.28/LayoutTests/media/video-src-blob-replay-expected.txt (0 => 264087)


--- releases/WebKitGTK/webkit-2.28/LayoutTests/media/video-src-blob-replay-expected.txt	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.28/LayoutTests/media/video-src-blob-replay-expected.txt	2020-07-08 10:07:41 UTC (rev 264087)
@@ -0,0 +1,8 @@
+OPEN FILE PANEL
+This tests the ability of the <video> element to load blob URLs, play to the end, and replay. In the browser, select a video file:  
+
+EVENT(change)
+EVENT(playing)
+EVENT(seeked)
+END OF TEST
+

Added: releases/WebKitGTK/webkit-2.28/LayoutTests/media/video-src-blob-replay.html (0 => 264087)


--- releases/WebKitGTK/webkit-2.28/LayoutTests/media/video-src-blob-replay.html	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.28/LayoutTests/media/video-src-blob-replay.html	2020-07-08 10:07:41 UTC (rev 264087)
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <script src=""
+        <script src=""
+        <script src=''></script>
+        <script>
+
+         if (window.testRunner)
+             testRunner.waitUntilDone();
+
+         function finish()
+         {
+             video.removeEventListener("ended", finish);
+
+             video.currentTime = 0;
+             waitForEvent('playing');
+             waitForEventAndEnd('seeked');
+
+             video.play();
+             video.currentTime = video.duration - 0.05;
+         }
+
+         function playing()
+         {
+             video.removeEventListener("playing", playing);
+
+             video.addEventListener("ended", finish);
+             video.currentTime = video.duration - 0.05;
+         }
+
+         function inputFileChanged(e) {
+             findMediaElement();
+             var file = e.target.files[0];
+             video.src = ""
+             video.addEventListener("playing", playing);
+             video.play();
+         }
+
+         function runTest() {
+             var inputFile = document.getElementById('file');
+             var centerX = inputFile.offsetLeft + inputFile.offsetWidth / 2;
+             var centerY = inputFile.offsetTop + inputFile.offsetHeight / 2;
+             waitForEvent('change', inputFileChanged, false, false, inputFile);
+
+             if (window.testRunner) {
+                 testRunner.setOpenPanelFiles([findMediaFile("video", "content/test")]);
+                 UIHelper.activateAt(centerX, centerY);
+             }
+         }
+        </script>
+    </head>
+    <body _onload_="runTest()">
+        <div>
+            This tests the ability of the &lt;video&gt; element to load blob URLs, play to the end, and replay. In the browser, select a video file:
+            <input type="file" name="file" id="file">
+        </div>
+        <video></video>
+    </body>
+</html>

Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog (264086 => 264087)


--- releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog	2020-07-08 10:07:35 UTC (rev 264086)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/ChangeLog	2020-07-08 10:07:41 UTC (rev 264087)
@@ -1,3 +1,17 @@
+2020-05-12  Philippe Normand  <[email protected]>
+
+        [GStreamer] Audio messages in web.whatsapp.com only play once.
+        https://bugs.webkit.org/show_bug.cgi?id=211627
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        Test: media/video-src-blob-replay.html
+        
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::updateDownloadBufferingFlag): Make sure on-disk
+        buffering is disabled for blob URIs, because it messes up the pipeline for replays, and it's
+        useless for that use-case anyway.
+
 2020-05-05  Alicia Boya García  <[email protected]>
 
         [GStreamer] Video loops when ran in rr record --chaos

Modified: releases/WebKitGTK/webkit-2.28/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (264086 => 264087)


--- releases/WebKitGTK/webkit-2.28/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2020-07-08 10:07:35 UTC (rev 264086)
+++ releases/WebKitGTK/webkit-2.28/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2020-07-08 10:07:41 UTC (rev 264087)
@@ -2984,6 +2984,13 @@
 
     unsigned flagDownload = getGstPlayFlag("download");
 
+    if (m_url.protocolIsBlob()) {
+        GST_DEBUG_OBJECT(pipeline(), "Blob URI detected. Disabling on-disk buffering");
+        g_object_set(m_pipeline.get(), "flags", flags & ~flagDownload, nullptr);
+        m_fillTimer.stop();
+        return;
+    }
+
     // We don't want to stop downloading if we already started it.
     if (flags & flagDownload && m_readyState > MediaPlayer::ReadyState::HaveNothing && !m_shouldResetPipeline) {
         GST_DEBUG_OBJECT(pipeline(), "Download already started, not starting again");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to