w3c / picture-in-picture

Picture-in-Picture (PiP)
https://w3c.github.io/picture-in-picture
Other
309 stars 38 forks source link

Picture in Picture with getUserMedia on iPhone Safari #206

Closed virafpatrawala closed 1 year ago

virafpatrawala commented 3 years ago

I'm trying to use the Picture in Picture API with a video element receiving a getUserMedia stream. This is working well on the PC (safari and chrome) but I am getting an error on iPhone Safari:

Unhandled Promise Rejection: NotSupportedError: The video element does not support the Picture-in-Picture mode.

Wanted to confirm if this is just not supported, or am I making some mistake. If so, can you please suggest any work-arounds for the same?

Thanks!

beaufortfrancois commented 3 years ago

@jernoble may know

eric-carlson commented 3 years ago

Unfortunately, iOS WebKit has to block PiP for video elements backed by a MediaStream because the system doesn't allow camera capture when an application is in the background.