Twitter PiP video pauses when scrolling
<rdar://73369869>
Created attachment 418214 [details] WIP patch
Created attachment 418215 [details] WIP patch
Created attachment 418218 [details] WIP patch
Created attachment 418309 [details] Patch
Comment on attachment 418309 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418309&action=review > Source/WebCore/html/MediaElementSession.cpp:279 > +SuccessOr<MediaPlaybackDenialReason> MediaElementSession::playbackPermitted(MediaPlaybackOperation operation) const As we discussed, I'm not happy with this enum. Please add a FIXME here and note the url of the bug you filed to fix this. > Source/WebCore/page/Quirks.cpp:1269 > + // Facebook and twitter will naively pause a <video> element that has scrolled out of the viewport, s/twitter/Twitter/ > Source/WebCore/page/Quirks.cpp:1276 > auto domain = RegistrableDomain(m_document->topDocument().url()); auto domain = RegistrableDomain(m_document->topDocument().url()).string(); m_requiresUserGestureToPauseInPictureInPicture = domain == "facebook.com"_s || domain == "twitter.com"_s;
Created attachment 418318 [details] Revise the patch based on Eric's comments
Comment on attachment 418309 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418309&action=review >> Source/WebCore/html/MediaElementSession.cpp:279 >> +SuccessOr<MediaPlaybackDenialReason> MediaElementSession::playbackPermitted(MediaPlaybackOperation operation) const > > As we discussed, I'm not happy with this enum. Please add a FIXME here and note the url of the bug you filed to fix this. Filed bug 220939 to track the refactoring. >> Source/WebCore/page/Quirks.cpp:1269 >> + // Facebook and twitter will naively pause a <video> element that has scrolled out of the viewport, > > s/twitter/Twitter/ Fixed. >> Source/WebCore/page/Quirks.cpp:1276 >> auto domain = RegistrableDomain(m_document->topDocument().url()); > > auto domain = RegistrableDomain(m_document->topDocument().url()).string(); > m_requiresUserGestureToPauseInPictureInPicture = domain == "facebook.com"_s || domain == "twitter.com"_s; Good point! Fixed.
Committed r271870: <https://trac.webkit.org/changeset/271870> All reviewed patches have been landed. Closing bug and clearing flags on attachment 418318 [details].