-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(FEC-10510): iOS14 - cannot exit from native PiP by the player's PiP button #483
Conversation
} else if (typeof this._el.webkitSetPresentationMode === 'function') { | ||
this._el.webkitSetPresentationMode('inline'); | ||
// Safari does not fire this event but Chrome does, normalizing the behaviour | ||
setTimeout(() => this.dispatchEvent(new FakeEvent(Html5EventType.LEAVE_PICTURE_IN_PICTURE)), 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need the event anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I don't see where this code was relevant, in all safari I've checked (mac, iPad with ios 11, 12, 13, and ios 14) this code was unreachable (means the if
was applied not the else if
).
After this change, I see this event fired natively.
Description of the Changes
exitPictureInPicture
when it's native PiP but usewebkitSetPresentationMode('inline')
LEAVE_PICTURE_IN_PICTURE
firing. it's already fired natively.Solves FEC-10510
CheckLists