Chocobozzz/PeerTube

View on GitHub
client/src/standalone/videos/test-embed.html

Summary

Maintainability
Test Coverage
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
</head>
<body>
  <header>
    <div class="logo">
      <div class="icon">
        <img src="../../assets/images/logo.svg" alt="">
      </div>
      <div>
        PeerTube
      </div>
    </div>

    <div class="spacer"></div>
    <h1>Embed Playground</h1>
  </header>
  <main>
    <aside>
      <div id="host"></div>
    </aside>
    <div id="controls">
      <div>
        <button onclick="player.play()">Play</button>
        <button onclick="player.pause()">Pause</button>
        <button onclick="player.seek(parseInt(prompt('Enter position to seek to (in seconds)')))">Seek</button>
        <button onclick="player.setVolume(0)">Mute</button>
        <button onclick="player.setVolume(1)">Unmute</button>
        <button onclick="player.playNextVideo()">Next video</button>
        <button onclick="player.playPreviousVideo()">Previous video</button>
      </div>
      <br/>

      <div id="options">
        <fieldset>
          <legend>Resolutions:</legend>
          <div id="resolution-list"></div>
          <br/>
        </fieldset>

        <fieldset>
          <legend>Captions:</legend>
          <div id="caption-list"></div>
          <br/>
        </fieldset>

        <fieldset>
          <legend>Rates:</legend>
          <div id="rate-list"></div>
        </fieldset>

        <fieldset>
          <legend>Volume</legend>
          <div id="volume"></div>
        </fieldset>

        <fieldset>
          <legend>Playlist position</legend>
          <div id="playlist-position"></div>
        </fieldset>
      </div>

    </div>
  </main>

  <!-- iframes are used dynamically -->
  <iframe hidden></iframe>
  <a hidden></a>

  <script type="module" src="./test-embed.ts"></script>
</body>
</html>