Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
is that possible to enable and controls the JavaScript Picture-in-Picture mode android and iOS device?

I create the video calling app using webrtc, and i have successfully create the video calling app using Cordova on android and iOS.

Next i started to create the Picture-in-Picture mode using JavaScript in my web application that's also works fine, but my mobile app not support requestpictureinpicture mode.

how to enable and controls the JavaScript Picture-in-Picture mode android and iOS device?

async function videoShrink(video){
    var video = document.getElementsByTagName("video")[0];
   
    try {
        // If there is no element in Picture-in-Picture yet, request for it
        if (video !== document.pictureInPictureElement) {
            await video.requestPictureInPicture();
        }
        // If Picture-in-Picture already exists, exit the mode
        else {
            await document.exitPictureInPicture();
        }

    } catch (error) {
        // console.log(`Oh Horror! ${error}`);
        console.log(error);
    }   
 }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There are a few plugins that you could give a try.

https://www.npmjs.com/package/cordova-plugin-pip

https://github.com/efoxbr/cordova-plugin-pip-mode

Also check out

https://github.com/collab-project/videojs-record/blob/master/examples/picture-in-picture.html

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!