Summary: | Twitter PiP video pauses when scrolling | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Peng Liu <peng.liu6> | ||||||||||||
Component: | Media | Assignee: | Peng Liu <peng.liu6> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Normal | CC: | calvaris, cdumez, changseok, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, jer.noble, kondapallykalyan, philipj, sergio, webkit-bug-importer | ||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||
Hardware: | iPhone / iPad | ||||||||||||||
OS: | Unspecified | ||||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=220939 | ||||||||||||||
Attachments: |
|
Description
Peng Liu
2021-01-22 20:18:29 PST
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]. |