Skip to content

fix: isPictureInPictureActive needs to be updated when user exits PIP #11

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stacktoshi
Copy link

This is when the user clicks the restore button using browser control:

Screenshot 2024-05-01 at 11 08 05 AM

isPictureInPictureActive wasn't being updated in that case since only the toggle method from the hook return was updating it.

}
togglePictureInPicture(true)
}
function _onLeavePictureInPicture(e: Event) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the leavepictureinpicture event doesn't use the LeavePictureInPictureEvent type, at least in my environment, I'm just using Event here. lmk if I should remove LeavePictureInPictureEvent above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants