Hello everybody,
as this problem gives me some headaches as it seemingly is not consistent I hope anyone of you has an idea.
Target:
- Play a video as soon as it “isPrepared”
- Jump to a frame in the middle of said video and play from there
Current state:
- At another point in the WebGL I do load, play, pause and play again other videos, which works fine
- I use the very same method to load the intro movie as well as any other movie from an url
Problem:
- The first video loaded does not start to play
- When I jump to a specific frame of that video it does also not play correctly from there (I suppose this is due to it not being prepared correctly)
Tested:
- The requested URL is correct and can be viewed in the browser
- (Seemingly) no CORS error as other videos from the same folder can be loaded no problem
Used code (reduced):
public void video_bg_play_url(string video_bg_url) {
video_bg_player.url = video_bg_url;
video_bg_player.Prepare();
StartCoroutine(video_bg_play());
}
private IEnumerator video_bg_play() {
yield return new WaitUntil(() => video_bg_player.isPrepared == true);
video_bg_player.Play();
}
Questions:
- Do you have any ideas where I might look for errors?
- Would it be a viable sollution to load at least the intro videos as “Preloaded assets”? All of them are about 170mb which is quite a lot, ideally Unity would only preload one of those videos (20mb) which would speak for a custom preloader instead of using the “Preload Assets” of the player settings, right?