How to rewind a video player properly?

I am attempting to rewind a VideoPlayer in Unity, also I am using the new VideoPlayer API and an mp4. I have tried setting the playback speed to a negative number, but it pauses. My current solution is,
In my rewind button script:

void Update ()
    if (rewind == true) {

In my VideoController Script

public void Backward2Seconds() {
    if (!IsPlaying) return;
        videoPlayer.time = videoPlayer.time - 2;

Is there a better way? Because this is laggy.

You should use videoPlayer.time = 0;


Technically, “videoPlayer.time = 0;” will return the video to the start, but if you want to control how much to rewind, you can declare a speed variable and just deduct that from the current time of the video.
The following code worked for my project:

    private float speed = 2f;

    public void Rewind()

   videoPlayer.time -= speed;


If by rewind you mean reset to time = 0 and replay the video, I have this in a few projects and it never failed. In your case you want to use the first public method here.

    public void PlayCurrentVideoClip()

    public void PlayVideoClip(VideoClip _vc) {

    IEnumerator PlayVideoClipCoroutine(VideoClip _vc) {
        yield return new WaitForEndOfFrame(); // safely wait 1 frame for the UI to be active
        videoPlayer.enabled = true;
        videoPlayer.frame = 0;
        videoPlayer.EnableAudioTrack(0, true);

The only downside is that you might see a bit of a glitch where the video panel disappears for a split second. Can be annoying but not the end of the world.