<?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>260259</bug_id>
          
          <creation_ts>2023-08-16 08:16:05 -0700</creation_ts>
          <short_desc>Video texture not updating after entering WebXR mode</short_desc>
          <delta_ts>2024-05-21 08:09:27 -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>WebXR</component>
          <version>Safari 16</version>
          <rep_platform>All</rep_platform>
          <op_sys>Unspecified</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>Blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>filipesnetopires</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>connell</cc>
    
    <cc>dino</cc>
    
    <cc>electroteque</cc>
    
    <cc>thorton</cc>
    
    <cc>tr</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>Yeison.lopez1028</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1971493</commentid>
    <comment_count>0</comment_count>
    <who name="">filipesnetopires</who>
    <bug_when>2023-08-16 08:16:05 -0700</bug_when>
    <thetext>I&apos;ve been reading several unresolved threads regarding video playback issues with WebXR (example thread here: https://discourse.threejs.org/t/video-texture-no-longer-updating-after-entering-webxr-mode/43068).
Has this been addressed or is it on the radar and road mapped already? Is this an appropriate place to raise the issue?

The issue I&apos;m personally facing relates to Vision Pro&apos;s Simulator and its Safari version.
When trying to playback a video texture, everything works fine in the browser&apos;s ThreeJS 3D viewer, but as soon as I enter WebXR mode, it freezes on the last frame until I exit immersive mode.
A related Stack Overflow thread is available here: https://stackoverflow.com/questions/76577886/video-playback-html5-videoelement-apple-vision-pro-simulator-in-vr-mode-not-pl.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1971703</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-08-16 18:13:46 -0700</bug_when>
    <thetext>&lt;rdar://problem/113999466&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2018005</commentid>
    <comment_count>2</comment_count>
    <who name="Daniel Rossi">electroteque</who>
    <bug_when>2024-03-01 07:13:22 -0800</bug_when>
    <thetext>I&apos;ve discovered this problem, video immediately goes to paused when launching to XR. But when I exit, I get no video playback. In Vision 1.0. In Vision 1.1 there is no webgl rendering at all. 

Test video here 

https://electroteque.org/plugins/videojs/vrvideo/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2018007</commentid>
    <comment_count>3</comment_count>
    <who name="Daniel Rossi">electroteque</who>
    <bug_when>2024-03-01 07:22:35 -0800</bug_when>
    <thetext>While the video is paused. There seems to be no VR controller device support in the simulator to click to play. So because the video is paused there is no video texture updating.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2018044</commentid>
    <comment_count>4</comment_count>
    <who name="Daniel Rossi">electroteque</who>
    <bug_when>2024-03-01 10:23:39 -0800</bug_when>
    <thetext>In the webxr session start event, forcing video playback works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2018046</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Rossi">electroteque</who>
    <bug_when>2024-03-01 10:36:57 -0800</bug_when>
    <thetext>actually you can&apos;t detect what platform visionOS is. navigator.platform reports Ipad. So have to check if it&apos;s Ipad in WebXR and force play.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2018060</commentid>
    <comment_count>6</comment_count>
    <who name="Daniel Rossi">electroteque</who>
    <bug_when>2024-03-01 11:11:10 -0800</bug_when>
    <thetext>pseudo code. the platform detected goes between Ipad and MacIntel.

onSessionStart() {
          //force play for visionOS
          if (this.isIpad) {
           // this.video.play();

            const handlePaused = () =&gt; {
                this.video.removeEventListener(&quot;pause&quot;, handlePaused);
                this.video.play();
            };

            this.video.addEventListener(&quot;pause&quot;, handlePaused);


        }
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2036002</commentid>
    <comment_count>7</comment_count>
    <who name="">Yeison.lopez1028</who>
    <bug_when>2024-05-17 07:49:56 -0700</bug_when>
    <thetext>Hi.

We have tried the suggested workaround but still finding issues such as permissions and the video simply not playing. Will there be a fix or suggested workaround for this that works consistently?. Thank you.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>