WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
192530
[GStreamer] HTMLMediaElement::m_player->paused is always true while video is playing
https://bugs.webkit.org/show_bug.cgi?id=192530
Summary
[GStreamer] HTMLMediaElement::m_player->paused is always true while video is ...
Michael Catanzaro
Reported
2018-12-08 13:57:49 PST
I was debugging why SleepDisablerGLib is broken currently. After getting a bit distracted by the inhibit portal being broken (separate bug, not our fault) I realized HTMLMediaElement is never creating SleepDisabler objects in the first place. Turns out that when playing a YouTube video, HTMLMediaElement::shouldDisableSleep always returns early in this condition here: if (!m_player || m_player->paused() || loop()) return SleepType::None; because m_player->paused() is returning true. But this happens when the video is playing, not when it is paused. So yeah that's not good.
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2018-12-08 14:03:20 PST
BTW I wonder if this state tracking issue is why YouTube videos often restart improperly when moused over.
Michael Catanzaro
Comment 2
2018-12-09 15:22:23 PST
Strangely it's not a recent regression, I tried bisecting this but found this to be the case as far back as the 2.20(!) branchpoint.
Alicia Boya García
Comment 3
2018-12-10 07:16:46 PST
Can you confirm if this affects the non-MSE media player?
Michael Catanzaro
Comment 4
2018-12-10 07:23:14 PST
I tried to disable the setting in MiniBrowser and noted that paused() was still returning true during playback, but I'm not sure if the setting really took effect or not. Unfortunately I can't confirm outside my WebKit jhbuild because MSE is now required for YouTube video playback without H.264.
Alicia Boya García
Comment 5
2018-12-10 07:35:42 PST
(In reply to Michael Catanzaro from
comment #4
)
> I tried to disable the setting in MiniBrowser and noted that paused() was > still returning true during playback, but I'm not sure if the setting really > took effect or not. > > Unfortunately I can't confirm outside my WebKit jhbuild because MSE is now > required for YouTube video playback without H.264.
What about this one?
https://www.w3schools.com/html/html5_video.asp
Michael Catanzaro
Comment 6
2018-12-10 10:37:17 PST
(In reply to Alicia Boya García from
comment #5
)
> What about this one?
https://www.w3schools.com/html/html5_video.asp
OK that worked. The bug occurs the same with and without MSE. P.S. Apparently I've never seen that part of Big Buck Bunny. It was traumatizing. :(
Philippe Normand
Comment 7
2019-02-15 08:53:55 PST
I can't reproduce this issue. diff --git a/Source/WebCore/html/HTMLMediaElement.cpp b/Source/WebCore/html/HTMLMediaElement.cpp index 88eae188a0e..8d2f2d18379 100644 --- a/Source/WebCore/html/HTMLMediaElement.cpp +++ b/Source/WebCore/html/HTMLMediaElement.cpp @@ -6896,6 +6896,7 @@ HTMLMediaElement::SleepType HTMLMediaElement::shouldDisableSleep() const #if !PLATFORM(COCOA) && !PLATFORM(GTK) && !PLATFORM(WPE) return SleepType::None; #endif + WTFLogAlways("paused: %d", m_player->paused()); if (!m_player || m_player->paused() || loop()) return SleepType::None; $ run-minibrowser --gtk
https://www.w3schools.com/html/html5_video.asp
paused: 1 paused: 1 paused: 1 paused: 1 paused: 1 paused: 1 # ^ this is expected because autoplay is disabled for this element # now let's press play. paused: 0 paused: 0 # Playback about to end paused: 1 paused: 1 # Done...
Michael Catanzaro
Comment 8
2019-02-15 09:47:00 PST
I can confirm this seems fixed, in both WebKit JHBuild and my personal JHBuild. Now, HTMLMediaElement::updateSleepDisabling is not being called when paused/unpaused, which is bad, but I believe we have other bug reports for that.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug