Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Video [Solved] VideoPlayer going black on video clip switch

Discussion in 'Audio & Video' started by Red_Dragon69, Apr 15, 2019.

  1. Red_Dragon69

    Red_Dragon69

    Joined:
    Sep 7, 2015
    Posts:
    113
    Hi there :)

    I am attempting to switch between a series of mp4 movies with a simple 2D interface with VideoPlayer. I am running into the issue that, when switching video clips, I get several black frames. I understand that I have to wait for the next movie to load, when the content is prepared. Is there a way to avoid the player going black during the transition/preparation?

    Best regards :)
     
  2. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    285
    Try having different videoplayers with their VideoClips already "Prepared()" so you can switch betwen them (Stop() and Disabling the current one and enabling & Play() the next one)
     
    Red_Dragon69 likes this.
  3. Red_Dragon69

    Red_Dragon69

    Joined:
    Sep 7, 2015
    Posts:
    113
    Thx @jocyf that did the trick :)
     
    jocyf likes this.
  4. sergiosoba

    sergiosoba

    Joined:
    Apr 28, 2017
    Posts:
    8
    I tryed but it doesnt work on webgl.