summaryrefslogtreecommitdiffstats
path: root/toolkit/content/tests/browser/file_iframe_media.html
blob: 929fb84002bd8dd83b554a3480a899bfc09dca1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!DOCTYPE html>
<video id="video" src="gizmo.mp4" loop></video>
<script type="text/javascript">

window.onmessage = async event => {
  const video = document.getElementById("video");
  const w = window.opener || window.parent;
  if (event.data == "play") {
    await video.play();
    w.postMessage("played", "*");
  }
}

</script>