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);
    }   
 }

```