Search Unity

Video Testing Whether A Video Is Playing Before Commencing An Action???

Discussion in 'Audio & Video' started by alex963, Apr 10, 2019.

  1. alex963

    alex963

    Joined:
    Apr 6, 2019
    Posts:
    1
    Hi guys, I am very new to C# but I have coded games on other platforms.

    I have made a game, with a few scenes and a title page, the game is more of an exorcise in using audio and video.

    I have made a title film, that plays at the beginning, there is a simple "yield return new WaitForSeconds(16);" after which the panel, what all the video stuff is connected to, deletes itself making way for the title page.

    the fact that it is 16 seconds is important because this is how long the intro song takes to go through the song intro and then break into the main tune, so it's all in time with itself.

    On my system it works extremely well, it is well timed and gives the desired effect.

    However I tested the game on my friends PC and the music started, and about 5 seconds later the video started, where on mine they happen near enough the same time.

    Is there a way to test whether the video is playing so that the music will always start in sync with the video, even if there is a delay on the load up.

    In the panel there is a raw texture and a video player.

    Thank you.