[Webkit-unassigned] [Bug 261512] New: Changing the currentTime at loadedmetadata breaks the player

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 13 07:59:51 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=261512

            Bug ID: 261512
           Summary: Changing the currentTime at loadedmetadata breaks the
                    player
           Product: WebKit
           Version: Safari 15
          Hardware: iPhone / iPad
                OS: All
            Status: NEW
          Severity: Major
          Priority: P2
         Component: Media
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: amtins.dev at gmail.com

When a value is assigned to the currentTime property during loadedmetadata, this has the following consequences:

- Playback starts at position 0
- It is no longer possible to change the playback position either via the user interface or via javascript.
- timeupdate events are no longer emitted correctly.

This problem has been observed on iOS 17, 16, 15, 14, 13.

Code sample:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      html,
      body {
        height: 100vh;
        margin: 0;
        padding: 0;
      }
      .player {
        width: 100%;
        height: 50vh;
        height: 50dvh;
      }
    </style>
  </head>
  <body>
    <video
      class="player"
      controls
      playsinline
    ></video>
    <script>
      const player = document.querySelector('.player');

      player.addEventListener('loadstart', () => {
        console.log('loadstart');
      });
      player.addEventListener('loadedmetadata', () => {
        console.log('loadedmetadata', player.duration);
        player.currentTime = 600;
      });
      player.addEventListener('loadeddata', () => {
        console.log('loadeddata');
      });
      player.addEventListener('timeupdate', () => {
        console.log('timeupdate', player.currentTime);
      });

      player.src = 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8';
    </script>
  </body>
</html>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230913/28d3fb3c/attachment.htm>


More information about the webkit-unassigned mailing list