Skip to content

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

Open
stacktoshi wants to merge 1 commit intoDawChihLiou:mainfrom
stacktoshi:dev
Open

fix: isPictureInPictureActive needs to be updated when user exits PIP#11
stacktoshi wants to merge 1 commit intoDawChihLiou:mainfrom
stacktoshi:dev

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