⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 279313 in webkit


Ignore:
Timestamp:
Jun 27, 2021, 2:32:37 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

[GStreamer] SleepDisabler not destroyed when video playback stops
​https://bugs.webkit.org/show_bug.cgi?id=219353

Patch by Philippe Normand <​pnormand@igalia.com> on 2021-06-27
Reviewed by Eric Carlson.

Source/WebCore:

In GStreamer ports the SleepDisabler remained active after EOS because
HTMLMediaElement::updateSleepDisabling() was not being triggered. An explicit clean-up upon
the ended event in the media element is better than any other implicit action.

Test: media/video-ended-does-not-hold-sleep-assertion.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::dispatchEvent):

LayoutTests:

  • media/video-ended-does-not-hold-sleep-assertion-expected.txt: Added.
  • media/video-ended-does-not-hold-sleep-assertion.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r279309 r279313  
     12021-06-27  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] SleepDisabler not destroyed when video playback stops
     4        https://bugs.webkit.org/show_bug.cgi?id=219353
     5
     6        Reviewed by Eric Carlson.
     7
     8        * media/video-ended-does-not-hold-sleep-assertion-expected.txt: Added.
     9        * media/video-ended-does-not-hold-sleep-assertion.html: Added.
     10
    1112021-06-26  Sam Weinig  <weinig@apple.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r279312 r279313  
     12021-06-27  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer] SleepDisabler not destroyed when video playback stops
     4        https://bugs.webkit.org/show_bug.cgi?id=219353
     5
     6        Reviewed by Eric Carlson.
     7
     8        In GStreamer ports the SleepDisabler remained active after EOS because
     9        HTMLMediaElement::updateSleepDisabling() was not being triggered. An explicit clean-up upon
     10        the ended event in the media element is better than any other implicit action.
     11
     12        Test: media/video-ended-does-not-hold-sleep-assertion.html
     13
     14        * html/HTMLMediaElement.cpp:
     15        (WebCore::HTMLMediaElement::dispatchEvent):
     16
    1172021-06-27  Antoine Quint  <graouts@webkit.org>
    218
  • trunk/Source/WebCore/html/HTMLMediaElement.cpp

    r279289 r279313  
    58635863    DEBUG_LOG(LOGIDENTIFIER, event.type());
    58645864
    5865     if (m_removedBehaviorRestrictionsAfterFirstUserGesture && event.type() == eventNames().endedEvent)
    5866         document().userActivatedMediaFinishedPlaying();
     5865    if (event.type() == eventNames().endedEvent) {
     5866        if (m_removedBehaviorRestrictionsAfterFirstUserGesture)
     5867            document().userActivatedMediaFinishedPlaying();
     5868
     5869        updateSleepDisabling();
     5870    }
    58675871
    58685872    HTMLElement::dispatchEvent(event);
    … …  
    68446848    return SleepType::None;
    68456849#endif
    6846     if (!m_player || m_player->paused() || loop())
     6850    if (m_sentEndEvent || !m_player || m_player->paused() || loop())
    68476851        return SleepType::None;
    68486852
Note: See TracChangeset for help on using the changeset viewer.