Changeset 261839 in webkit
- Timestamp:
- May 18, 2020 4:40:06 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r261837 r261839 1 2020-05-18 Peng Liu <peng.liu6@apple.com> 2 3 Add a quirk to allow an embedded Twitter video to play with one tapping 4 https://bugs.webkit.org/show_bug.cgi?id=211932 5 6 Reviewed by Maciej Stachowiak. 7 8 * html/MediaElementSession.cpp: 9 (WebCore::MediaElementSession::playbackPermitted const): 10 Need to check the topDocument for the existence of user interactions. 11 (WebCore::MediaElementSession::updateMediaUsageIfChanged): Ditto. 12 13 * page/Quirks.cpp: 14 (WebCore::Quirks::needsPerDocumentAutoplayBehavior const): 15 Add the missing needsQuirks() checking. 16 (WebCore::Quirks::shouldAutoplayForArbitraryUserGesture const): 17 Add a the quirk for twitter.com. 18 19 * platform/audio/ios/MediaSessionManagerIOS.mm: 20 (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): 21 Clarify the log message. 22 1 23 2020-05-18 Simon Fraser <simon.fraser@apple.com> 2 24 -
trunk/Source/WebCore/html/MediaElementSession.cpp
r260951 r261839 317 317 return { }; 318 318 319 if ( document.hasHadUserInteraction() && document.quirks().shouldAutoplayForArbitraryUserGesture())319 if (topDocument.hasHadUserInteraction() && document.quirks().shouldAutoplayForArbitraryUserGesture()) 320 320 return { }; 321 321 … … 1066 1066 pageExplicitlyAllowsElementToAutoplayInline(m_element), 1067 1067 requiresFullscreenForVideoPlayback() && !fullscreenPermitted(), 1068 document. hasHadUserInteraction() && document.quirks().shouldAutoplayForArbitraryUserGesture(),1068 document.topDocument().hasHadUserInteraction() && document.quirks().shouldAutoplayForArbitraryUserGesture(), 1069 1069 isVideo && hasBehaviorRestriction(RequireUserGestureForVideoRateChange) && !processingUserGesture, 1070 1070 isAudio && hasBehaviorRestriction(RequireUserGestureForAudioRateChange) && !processingUserGesture && !m_element.muted() && m_element.volume(), -
trunk/Source/WebCore/page/Quirks.cpp
r261261 r261839 111 111 return needsQuirks() && allowedAutoplayQuirks(*m_document).contains(AutoplayQuirk::PerDocumentAutoplayBehavior); 112 112 #else 113 if (!needsQuirks()) 114 return false; 115 113 116 auto host = m_document->topDocument().url().host(); 114 117 return equalLettersIgnoringASCIICase(host, "netflix.com") || host.endsWithIgnoringASCIICase(".netflix.com"); … … 121 124 return needsQuirks() && allowedAutoplayQuirks(*m_document).contains(AutoplayQuirk::ArbitraryUserGestures); 122 125 #else 123 return false; 126 if (!needsQuirks()) 127 return false; 128 129 auto host = m_document->url().host(); 130 return equalLettersIgnoringASCIICase(host, "twitter.com") || host.endsWithIgnoringASCIICase(".twitter.com"); 124 131 #endif 125 132 } -
trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm
r261093 r261839 132 132 } 133 133 134 ALWAYS_LOG(LOGIDENTIFIER, m_playbackTargetSupportsAirPlayVideo);134 ALWAYS_LOG(LOGIDENTIFIER, "Playback Target Supports AirPlay Video = ", m_playbackTargetSupportsAirPlayVideo); 135 135 if (m_playbackTargetSupportsAirPlayVideo) 136 136 session.setPlaybackTarget(*m_playbackTarget.copyRef());
Note: See TracChangeset
for help on using the changeset viewer.