WICG / document-picture-in-picture

https://wicg.github.io/document-picture-in-picture/
Other
56 stars 9 forks source link

Doesn't work on http:// for local development #98

Closed drmercer closed 7 months ago

drmercer commented 11 months ago

In Chromium 117.0.5938.88, trying to use the Document PIP API from a localhost page fails with this error message:

Opening a PiP window requires https or file protocol

This is breaking my dev workflow, and I'm pretty sure this was working previously. I understand the need to require a secure context for certain Web APIs, but don't most such APIs make exceptions for localhost?

tomayac commented 11 months ago

See https://bugs.chromium.org/p/chromium/issues/detail?id=1486404#c1. The from there linked next bug is Google-only for security reasons.

pandyama commented 11 months ago

great catch @drmercer having same issue

drmercer commented 10 months ago

To work around this, I just set up an untrusted SSL server on localhost, following these instructions (my project uses Astro). https://medium.com/geekculture/ssl-cert-https-for-local-development-using-astrojs-a58f4ae39bf1

Figured I'd post that here in case it's helpful for anyone else. Hopefully they fix this issue soon and just go back to the standard "secure context" checks that already apply to this API.

steimelchrome commented 7 months ago

This should be working in Chrome 122.0.6238.0 and later