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

Unity 5.6.0.f3: VideoPlayer: Missing Rewind-Method

Discussion in 'Audio & Video' started by Cascho01, Apr 3, 2017.

  1. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    We have Play, Pause and Stop.

    Play is ok.
    Pause is ok.
    Stop is kind of misleading:

    Unity Docs says it "Pauses the playback and sets the current time to 0." - what it actually does, but we do not see the first frame.

    What I expect and need is (not a workaround-solution like Stop-Play-Pause but) a simple and true Rewind-Method that visually shows Frame 0 after invoked.
     
    Last edited: Apr 4, 2017
    Ben-BearFish likes this.
  2. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    I agree. It looks like that functionality is missing. It'd be nice if the could at least see the source or have access to the api for playback, so we could attempt to write our own rewind, if no one has gotten around to that yet.
     
  3. SaraCecilia

    SaraCecilia

    Joined:
    Jul 9, 2014
    Posts:
    675
    You can set the current time to any place you want with the API, by frame number with VideoPlayer.frame or by time (in seconds) with VideoPlayer.time. The doc for the Stop() method clears the VideoPlayer's internal state (textures, buffering, …) so it’s normal that when calling it, nothing is visible. This will be added to the API documentation so it's less confusing. Pause() would be a better way to interrupt playback without losing this state.


    Does this help?
     
    Last edited: Apr 4, 2017
  4. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Sorry - not really.
    There are at least three basic functions that usually come with any videoplayer:
    Play - Pause - Rewind

    Example of a very basic GUI for a videoplayer:
    A "Playbuttons" OnClick-Event would target the Videoplayer.cs>Play()-function. (Available)
    A "Pausebuttons" OnClick-Event would target the Videoplayer.cs>Pause()-function. (Available)
    A "Rewindbuttons" OnClick-Event would target the Videoplayer.cs>Rewind()-function. (Custom script needed) :-(

    Please - why is it so hard to natively provide such a basic method?
     
    Last edited: Apr 4, 2017
    Ben-BearFish likes this.
  5. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Any updates on if a Rewind functionality is coming?
     
  6. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
  7. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    This still seems to be a basic feature missing in Unity 2017.1.
     
  8. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    And Unity 2017.2.
     
    Rs likes this.
  9. alfred316

    alfred316

    Joined:
    Jun 14, 2018
    Posts:
    1
    and to this day
     
    Rs and Dalton-Lima like this.