Bug 1470346 - Gesture activate all documents in tab, even across origins, upon user interaction. r=smaug
Sometimes when video is playing, a preroll ad plays, and that may be in a cross origin iframe. If autoplay media is disabled, we require a user gesture in a document before playback in that document is permitted, and we require each origin to be gesture activated separately. So in the cross origin preroll video add case, then the user will have to click once to unblock playback for the cross origin ad, and then once the preroll ad finishes, the user will have to click again to activate playback of the same origin content video. This is a bad user experience. So we should instead make gesture activation propagate up the doc tree irrespective of crossing origins. This way, when the user clicks to activate, all documents in that tab are also also effectively gesture activated, and so can autoplay. MozReview-Commit-ID: 1HZQ5zkubR
This commit is contained in:
@@ -1996,7 +1996,7 @@ HTMLMediaElement::Load()
|
||||
IsAllowedToPlay(),
|
||||
OwnerDoc(),
|
||||
DocumentOrigin(OwnerDoc()).get(),
|
||||
OwnerDoc() ? OwnerDoc()->HasBeenUserActivated() : 0,
|
||||
OwnerDoc() ? OwnerDoc()->HasBeenUserGestureActivated() : 0,
|
||||
mMuted,
|
||||
mVolume));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user