b1d02b9b09adba4e3cb20dd2ef0524c35d5b013e
[WebKit-https.git] / LayoutTests / media / controls / ipad / resources / picture-in-picture.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../media-file.js"></script>
5 </head>
6 <body>
7 <video controls></video>
8 <script>
9 if (window.internals)
10     internals.settings.setAllowsPictureInPictureMediaPlayback(true);
11
12 function dispatchDidChangePresentationMode()
13 {
14     window.opener.notifyDidChangePresentationMode();
15 }
16
17 var video = document.querySelector("video");
18 if (window.internals)
19     internals.setMediaElementRestrictions(video, "NoRestrictions");
20 video.addEventListener("webkitpresentationmodechanged", dispatchDidChangePresentationMode, false);
21 video.addEventListener("canplaythrough", function () { video.webkitSetPresentationMode("picture-in-picture"); }, false);
22 video.src = findMediaFile("video", "../../../content/test");
23 </script>
24 </body>
25 </html>