ianramzy / decentralized-video-chat

🚀 Zipcall- Acquired @ 250k users 🚀 Peer to peer browser video calling platform with unmatched video quality and latency.
https://zipcall.io
3.3k stars 502 forks source link

Picture in Picture Mode on Firefox #45

Closed raksdewji closed 4 years ago

raksdewji commented 4 years ago

Is there any chance we can get this option included for Firefox users?

Chaphasilor commented 4 years ago

It's not working on Firefox for Desktop? 👀

raksdewji commented 4 years ago

Currently getting this error when trying to toggle PiP image

Chaphasilor commented 4 years ago

Okay, can you try right-clicking on the other participant's video and seeing if PiP is available through the context menu?

It seems like Firefox hasn't implemented the W3C PiP API yet because it's still a draft, but I'll check later if that is actually still the case!

raksdewji commented 4 years ago

Tested on Linux and Windows and both had no PiP in the context menu.

image

Chaphasilor commented 4 years ago

Thanks for checking. I'll look into it tomorrow and see what options we have :)

Chaphasilor commented 4 years ago

Okay, so I just spent a almost two hours investigating, and I have bad news.

tl;dr: Firefox doesn't yet support picture in picture well enough so that we can use it in Zipcall :/

The issue here is twofold:

  1. Firefox is still using their own, proprietary implementation on pip. There is no API for toggling pip, only user gestures (fly-outs, context menus, etc.). That wouldn't be a huge problem of its own, but then there's the second problem:
  2. Their implementation doesn't seem to support more complex video sources, like webcam inputs or WebRTC streams yet. Only 'normal' videos with sources pointing either to a static video file or an m3u8-playlist file are supported. Because of this, we are unable to enable or provide a pip-mode in Firefox for now, it simply isn't possible from what I've found.
    There sadly isn't any official statement about that and very few info in general (aside from a StackOverflow question with negative score, no comments and no answers), so I might be wrong, but I don't think this is worth the effort right now.

Sorry to disappoint you :/

axtux commented 4 years ago

Firefox does not support picture in picture the way you could use it but the statement is wrong: Firefox does support picture in picture. I think the message should be updated to something like: Your browser does not support picture in picture for WebRTC streams. And maybe add a link to this issue if Firefox is detected?

Chaphasilor commented 4 years ago

@axtux yeah you're right, the error could be more specific. PRs are welcome ;)