Skip to content

feat: enable picture in picture for localhost #627

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

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

ManUtopiK
Copy link
Contributor

Moving the devtools to picture in picture mode is really great 🚀
But why limit this feature only for https ?

DocumentPictureInPicture is allowed only in secure context, but localhost is a secure context.

This pull request uses window.isSecureContext detection instead of relying on the location protocol.

Tested on nixOS with the most recent versions of Chromium, Google Chrome and Vivaldi.

Copy link
Member

@arashsheyda arashsheyda left a comment

Choose a reason for hiding this comment

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

awesome! thanks

@antfu antfu merged commit c43500a into nuxt:main Mar 21, 2024
2 checks passed
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.

None yet

3 participants