Skip to content

feat: enable picture in picture for localhost#627

Merged
antfu merged 1 commit intonuxt:mainfrom
ManUtopiK:pip4localhost
Mar 21, 2024
Merged

feat: enable picture in picture for localhost#627
antfu merged 1 commit intonuxt:mainfrom
ManUtopiK:pip4localhost

Conversation

@ManUtopiK
Copy link
Copy Markdown
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
Copy Markdown
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
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.

3 participants