Video from https service on immersive view

Hello, I'm trying to load a video on immersive space. Actually using VideoMaterial and applying it on a plane surface I'm able to load video that I have locally. If I want to load something from an external link like youtube or other service how can I do that?

Remembering obv that I'm loading it in an immersive space.

Thanks ;)

Hi @Mirco46 ,

The AVPlayer documentation says:

A player is a controller object that manages the playback and timing of a media asset. Use an instance of AVPlayer to play local and remote file-based media, such as QuickTime movies and MP3 audio files, as well as audiovisual media served using HTTP Live Streaming.

You can load remote media, but YouTube videos won't work due to their format. As far as I know, YouTube videos are embedded in a page, they're not movie files that AVPlayer can handle. I believe it's against the YouTube terms of service to scrape that video file from the public URL and play it in a AVPlayer. You'd need to use a WebView ( WKWebView)to handle that instead to use the public URL and show the web page with the embedded video.

If you have some other remote media (like something in the HTTP Live Streaming realm) you can definitely use AVPlayer to show that.

Video from https service on immersive view
 
 
Q