Stream while simultaneously downloading video from URL using video player
Hi, I'm wanting to use a video clip as the background in my menu scene for one of my games.
Setting the video player's URL to the URL I want to play works, however, each time the game is launched, it re-downloads the video. This causes unnecessary data usage, especially on mobile.
Instead, I tried downloading the video using a UnityWebRequest and saving it to a file. This works, and the video only has to be downloaded once, however, the video then needs to be fully downloaded before playback can commence, meaning there is a delay before the video starts playing.
So, my question is: is there any way to stream a video from a URL directly using the video player, but also cache the download in the persistent data path, so the video is only downloaded once?
The only other way I can think of achieving this is by playing the video via the URL of the video player, while also downloading the file using a web request. This is better than downloading it every time the game is launched, however, it still downloads the video twice which is not ideal.
Thanks.
Your answer
Follow this Question
Related Questions
Best way to store video content for later playback in Unity? 0 Answers
Video Streaming with New Unity Video Player issue 0 Answers
Incorrect video Length printouts between 2018 and 2019 unity 0 Answers
Streaming video camera input from WebCamTexture on mobile? (Possibly via WebRTC or websocket?) 1 Answer
(Videoplayer component) What file format and resolution do I need for iOS? 0 Answers