<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>261512</bug_id>
          
          <creation_ts>2023-09-13 07:59:51 -0700</creation_ts>
          <short_desc>Changing the currentTime at loadedmetadata breaks the player</short_desc>
          <delta_ts>2023-09-20 08:00:13 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>Safari 15</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="André M.">amtins.dev</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1977295</commentid>
    <comment_count>0</comment_count>
    <who name="André M.">amtins.dev</who>
    <bug_when>2023-09-13 07:59:51 -0700</bug_when>
    <thetext>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:

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

      player.addEventListener(&apos;loadstart&apos;, () =&gt; {
        console.log(&apos;loadstart&apos;);
      });
      player.addEventListener(&apos;loadedmetadata&apos;, () =&gt; {
        console.log(&apos;loadedmetadata&apos;, player.duration);
        player.currentTime = 600;
      });
      player.addEventListener(&apos;loadeddata&apos;, () =&gt; {
        console.log(&apos;loadeddata&apos;);
      });
      player.addEventListener(&apos;timeupdate&apos;, () =&gt; {
        console.log(&apos;timeupdate&apos;, player.currentTime);
      });

      player.src = &apos;https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8&apos;;
    &lt;/script&gt;
  &lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1978649</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-09-20 08:00:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/115784490&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>