Skip to content

LaClarence/picture-in-picture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Picture-In-Picture test

3rd Javascript project: Picture in picture.

Resources

Others Demos

Code

Get info about Picture in picture windows

function getPIPInfo() {
  if (pipWindow) {
    console.log(`> Window size is ${pipWindow.width}x${pipWindow.height}`);
    const [track] = video.srcObject.getVideoTracks();
    var events = [];
    for (var property in pipWindow) {
      let match = property.match(/^on(.*)/)
      if (match) {
        events.push(match[1]);
      }
    }
    console.log(events);
  } else {
    console.log('No pip window is currently open...');
  }
}

Can be added in the finally bloc of onclick.

About

Picture in picture JS project 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published