Video not playing in AR mode

I have loaded the VideoPlayer sample and opened it on my iPhone (iOS 18.1.1). In the web view everything works fine and the video is played automatically, but when I switch to AR mode, only the preview image of the video is shown and the video does not play. Is there any solution to make the video playing in AR or is this a limitation of the usdz format?

Hello Null,

The issue you’re experiencing with the video not playing in AR mode may be related to how video playback interacts with the AR framework and specific limitations of the USDZ format on iOS.

Here are a few considerations and potential solutions:

  1. USDZ Format Limitations: The USDZ format sometimes does not support dynamic media (like videos) in certain contexts. When switching to AR, it may only display the video preview without actual playback.

  2. Video Playback Settings: Ensure the video element in your VideoPlayer code is set to allow inline playback, which is particularly important on iOS. This can be done by setting the playsInline attribute on your video element:

    this._videoElement.playsInline = true;
    
  3. Muted Playback: iOS usually requires videos to be muted at the start to allow them to autoplay. Check that the video is set to muted if it isn’t receiving any user interaction:

    this._videoElement.muted = true;
    
  4. Debugging the VideoPlayer Component: Utilize debugging logs to verify that playback is actually being initiated when AR is active. This can help in confirming the state of the video element during the switch.

  5. Test with Other Formats: If possible, test with different video formats and ensure that the video URL is publicly accessible and not restricted by cross-origin policies.

If the issue persists, you may want to consider examining the AR session settings or reaching out to support for the specific limitations when dealing with USDZ on iOS devices.

For further insights, you can refer to the Needle Engine documentation on how video components are managed, or review the VideoPlayer sample for any relevant implementation details.

If you have more specific questions or need a closer look at your configuration, feel free to ask!

1 replies left - Get a PRO license for more AI replies.
thread_7eR8I5ZN5HxCjvSgDMgFBCtK
Reply to this message to continue the conversation

Hello,

this is due to Quicklook not supporting video playback right now. A workaround would be to generate a frame by frame texture (e.g. at quicklook export time). See the posts here: Video Textures and Audio in IOS - #3 by hybridherbst