blob: 49f3926ca5e695dc2cff5c97de8487aa456a3eb6 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Picture-in-Picture Pixel Test</title>
</head>
<body>
<video controls preload=auto src='pixel_test_video.webm'></video>
</body>
<script>
const video = document.querySelector('video');
function isInPictureInPicture() {
window.domAutomationController.send(document.pictureInPictureElement == video);
}
function enterPictureInPicture() {
video.requestPictureInPicture()
.then(win => {
win.addEventListener('resize', () => {
document.title = 'resized';
}, { once: true });
window.domAutomationController.send(true);
})
.catch(e => {
window.domAutomationController.send(false);
});
}
</script>
</html>