Search Unity

Video VideoPlayer SEEK doesn't work at all?

Discussion in 'Audio & Video' started by shoo, May 5, 2017.

  1. shoo

    shoo

    Joined:
    Nov 19, 2012
    Posts:
    67
    Hello, I need a simple thing, just seek to some second of the video.

    Code (CSharp):
    1.  
    2. videoPlayer.time = 10;
    3. videoPlayer.Play();
    4.  
    Code (CSharp):
    1.  
    2. videoPlayer.Play();
    3. videoPlayer.time = 10;
    4.  
    This code always gives me black texture from the Video Player. "videoPlayer.frame" and callback "seekCompleted" doesn't work too. I tryed different video, for full hd it works sometimes, for 4k it never works. I tryed on Android and Windows.

    Why this happens? How could I fix it?
     
  2. shoo

    shoo

    Joined:
    Nov 19, 2012
    Posts:
    67
    Code (CSharp):
    1. videoPlayer.time = 10;
    2. videoPlayer.Prepare();
    I've tryed to fix it by using "PREPARE", but seems it doesn't work either. It doesn't call "prepareCompleted" when I use Prepare(), but it does when I use Play().
     
  3. shoo

    shoo

    Joined:
    Nov 19, 2012
    Posts:
    67
    It was bugg, fixed in 2017.1 beta