Search Unity

Video Issue with playing videos on time on iOS using VideoPlayer

Discussion in 'Audio & Video' started by srylain, Oct 19, 2018.

  1. srylain

    srylain

    Joined:
    Sep 5, 2013
    Posts:
    159
    While I don't have access to an iOS device so I can't test this personally, I've been told that on both an iPhone X and an iPhone 8 there are problems with videos starting on time. This ends up making the video start late, but the time value acts as if it started when Play() was called (so the time value is a number of milliseconds ahead). These problems aren't on Android or on the editor in Windows.

    These videos are streaming from Youtube, and they are being prepared before they are started. What I'm looking for is if maybe there's some way to schedule a video to play at an exact time like there is with audio (so something similar to PlayScheduled()), or at least just a definite way to make sure a video starts as soon as Play() is called.

    Not sure if it's a bug on iOS, but since this is for a rhythm game I can't just add an amount of time to offset the video starting late as there's potential for different devices to start the video later than each other I'd think. I did just realize that videoPlayer.skipOnDrop may help, but I haven't had a chance to let my testers play a new build with it enabled. If that helps I'll close the thread.

    EDIT: It seems skipOnDrop is enabled by default so I can't see any reason why that would help.

    Thanks
     
    Last edited: Oct 20, 2018