chromium/chrome/test/data/extensions/audio_focus_web_app/main.html

<!--
Copyright 2018 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!DOCTYPE html>
<html>
<body>
  <video src="/media/bigbuck.webm"></video>
  <script>
    const video = document.getElementsByTagName('video')[0];

    function startPlaying() {
      return video.play()
        .then(() =>  true)
        .catch(() => false);
    }

    function waitForPause() {
      if (video.paused) {
        return true;
      }

      return new Promise(resolve => {
        video.addEventListener('pause', () => resolve(true), { once: true });
      });
    }

    function isPaused() {
      return video.paused;
    }
  </script>
</body>
</html>