Search Unity

Question Video Player Android seekTo error: -10006

Discussion in 'Audio & Video' started by qlevine_unity, Mar 24, 2021.

  1. qlevine_unity

    qlevine_unity

    Joined:
    Mar 24, 2021
    Posts:
    1
    I having been trying to play VP8 encoded Webm videos using the Unity Video Player and I am having freezing issues. I wait for the callback from VideoPlayer.prepareCompleted, and then begin playing the video. I have noticed that for videos with low bitrate and low spatial quality, most of the time the video does not freeze. However, with higher quality videos, even if I wait for prepareCompleted, the video will always freeze around halfway through the video. The error I always see when the freezing occurs is seekTo error: -10006. It seems that this error occurs when its trying to seek to null or corrupt data, often cause by the video not loading fast enough to play.

    My question is why does prepareCompleted return if the video is not ready to be played? Also does this seekTo error mean that I can't play that level of quality of a video on Android using Unity's video player? Note I am also switching between videos often, but I always wait for prepareCompleted to return before I start playing the next video.