Changeset 240537 in webkit


Ignore:
Timestamp:
Jan 25, 2019 5:46:50 PM (5 years ago)
Author:
jer.noble@apple.com
Message:

<video> elements not in the DOM should be allowed to AirPlay
https://bugs.webkit.org/show_bug.cgi?id=193837
Source/WebCore:

<rdar://42559491>

Reviewed by Eric Carlson.

Test: media/airplay-allows-buffering.html

Some websites will switch between <video> elements backed by MSE to one backed by
a media file in order to implement an AirPlay control. But when a <video> element is
removed from the DOM and paused, further buffering is blocked. For some ports (namely
Cocoa ones), this keeps AirPlay from engaging. Relax this buffering restriction for
elements who have been asked to play wirelessly, but whose wireless playback has not
started yet.

  • html/MediaElementSession.cpp:

(WebCore::MediaElementSession::dataBufferingPermitted const):
(WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):

LayoutTests:

Reviewed by Eric Carlson.

  • media/airplay-allows-buffering-expected.txt: Added.
  • media/airplay-allows-buffering.html: Added.
  • platform/ios/TestExpectations:
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r240536 r240537  
     12019-01-25  Jer Noble  <jer.noble@apple.com>
     2
     3        <video> elements not in the DOM should be allowed to AirPlay
     4        https://bugs.webkit.org/show_bug.cgi?id=193837
     5
     6        Reviewed by Eric Carlson.
     7
     8        * media/airplay-allows-buffering-expected.txt: Added.
     9        * media/airplay-allows-buffering.html: Added.
     10        * platform/ios/TestExpectations:
     11
    1122019-01-25  Simon Fraser  <simon.fraser@apple.com>
    213
  • trunk/LayoutTests/platform/ios/TestExpectations

    r240530 r240537  
    24582458
    24592459media/accessibility-closed-captions-has-aria-owns.html
     2460media/airplay-allows-buffering.html
    24602461media/airplay-autoplay.html
    24612462media/airplay-target-availability.html
  • trunk/Source/WebCore/ChangeLog

    r240525 r240537  
     12019-01-25  Jer Noble  <jer.noble@apple.com>
     2
     3        <video> elements not in the DOM should be allowed to AirPlay
     4        https://bugs.webkit.org/show_bug.cgi?id=193837
     5        <rdar://42559491>
     6
     7        Reviewed by Eric Carlson.
     8
     9        Test: media/airplay-allows-buffering.html
     10
     11        Some websites will switch between <video> elements backed by MSE to one backed by
     12        a media file in order to implement an AirPlay control. But when a <video> element is
     13        removed from the DOM and paused, further buffering is blocked. For some ports (namely
     14        Cocoa ones), this keeps AirPlay from engaging. Relax this buffering restriction for
     15        elements who have been asked to play wirelessly, but whose wireless playback has not
     16        started yet.
     17
     18        * html/MediaElementSession.cpp:
     19        (WebCore::MediaElementSession::dataBufferingPermitted const):
     20        (WebCore::MediaElementSession::setShouldPlayToPlaybackTarget):
     21
    1222019-01-25  Keith Rollin  <krollin@apple.com>
    223
  • trunk/Source/WebCore/html/MediaElementSession.cpp

    r239830 r240537  
    386386        return true;
    387387
     388#if ENABLE(WIRELESS_PLAYBACK_TARGET)
     389    if (m_shouldPlayToPlaybackTarget)
     390        return true;
     391#endif
     392
    388393    if (m_elementIsHiddenUntilVisibleInViewport || m_elementIsHiddenBecauseItWasRemovedFromDOM || m_element.elementIsHidden())
    389394        return false;
     
    684689    INFO_LOG(LOGIDENTIFIER, shouldPlay);
    685690    m_shouldPlayToPlaybackTarget = shouldPlay;
     691    updateClientDataBuffering();
    686692    client().setShouldPlayToPlaybackTarget(shouldPlay);
    687693}
Note: See TracChangeset for help on using the changeset viewer.