Search Unity

Bug Videoplayer not stopping at the right timestamp and now doesn't play at all

Discussion in 'Audio & Video' started by deepaksinghgaira27, Feb 3, 2024.

  1. deepaksinghgaira27

    deepaksinghgaira27

    Joined:
    Feb 3, 2024
    Posts:
    1
    Hi all,
    I have a unity project where I have a scene called visualization, wherein I plot a heatmap of eye gaze data on a specific video timestamp.
    The gaze data was collected using the VR glasses with left and right videos.
    video_Left and video_Right are the variables storing the video player component.
    DrawForEachPlayer() draws the heatmap.
    hold is a public variable that marks whether to hold the video or not (as I have two options; either pause at a specific frame and plot around it - which I want - or anything else)
    vd_name is another public variable.
    The code to pause the video is this:
    upload_2024-2-3_18-6-2.jpeg
    But the video is not pausing at the timestamp. While debugging, I found that the timestamp was not assigned to the .time.
    I tried to do some debugging and took the help of chatGPT, but it didn't work either.
    Then suddenly, the videoPlayer stopped working altogether; now nothing happens in the visualization scene when I play it.
    Even when I reverted the script to its previous state, the video doesn't play at all.

    How can I correct it?