GithubHelp home page GithubHelp logo

Comments (6)

miroslavpejic85 avatar miroslavpejic85 commented on June 11, 2024 1

Hi @chengyuhui,
Hope you're doing well! 😊 Would you mind sending a pull request?
Thanks a bunch!

from mirotalk.

miroslavpejic85 avatar miroslavpejic85 commented on June 11, 2024

Good, I just fix a typo.

document.pictureInPictureEnabled already returns a boolean, then using double negation (!!) is indeed unnecessary. In such a case, you can directly use the boolean value returned by document.pictureInPictureEnabled without any additional conversions.

Thank you!

from mirotalk.

miroslavpejic85 avatar miroslavpejic85 commented on June 11, 2024

Tested to be working on latest mobile Chrome (simply removing !isMobileDevice works).

But I'm not able to make it work on real mobile device in Chrome, and other browsers as well :)

I recall now that Document PIP and Video PIP doesn't work on real mobile devices.

That's why I implemented the filter !isMobileDevice

from mirotalk.

chengyuhui avatar chengyuhui commented on June 11, 2024

Just tested again on my Samsung S23 with Chrome 120.0.6099.144, video PiP worked fine. Note that Firefox does not support these APIs at all.

Document PiP isn't even available on mobile devices, if memory serves me right.

from mirotalk.

miroslavpejic85 avatar miroslavpejic85 commented on June 11, 2024

You are right in this device works and maybe also in some other, while in some not, although document.pictureInPictureEnabled return true, in the browser logs got:

Failed to enter Picture-in-Picture mode: NotSupportedError: The video element does not support the Picture-in-Picture mode.

Let me thinking, I will push asap.

from mirotalk.

miroslavpejic85 avatar miroslavpejic85 commented on June 11, 2024

Now you will be able to use PIP video on Mobile devices. In case your device doesn't support this feature for some reason, a helpful popup message will appear, and the button will be hidden.

from mirotalk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.