Source code

Revision control

Copy as Markdown

Other Tools

<meta charset="utf-8">
<title>Picture-in-Picture tests</title>
<script type="text/javascript" src="click-event-helper.js"></script>
video {
display: block;
border: 1px solid black;
<h1>Video with controls</h1>
<video id="with-controls" src="test-video.mp4" controls loop="true" width="400" height="225"></video>
<h1>Video without controls</h1>
<video id="no-controls" src="test-video.mp4" loop="true" width="400" height="225"></video>
function fireEvents() {
for (let videoID of ["with-controls", "no-controls"]) {
let video = document.getElementById(videoID);
let event = new CustomEvent("MozTogglePictureInPicture", { bubbles: true });