Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2021.2
2022.1
2022.1.0b7
2022.2
Issue ID
1402743
Regression
No
Video Player rewind button does not pause the video
How to reproduce:
1. Open project "NewVideoPlayer-TestProject-master.zip"
2. Enter Play Mode
3. Press the rewind button
4. Observe the video
Expected result: Video is stopped
Actual result: Video is not stopped
Reproducible with: 2019.4.36f1, 2020.3.30f1, 2021.2.13f1, 2022.1.0b9, 2022.2.0a5
Notes:
- Forward button is pausing the video when pressed
- If pressing the forward button and then pressing the rewind button then the rewind button is working as expected, but if pressing multiple times then the rewind button will do nothing
- Reproducible in the Editor and in the Player
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
Resolution Note:
In this project's VideoControls.cs, your implementation of Rewind() is using VideoPlayer.frame = "some value", which is a seek operation. Seek operations don't interfere with the playback status. If the movie is playing, it continues to do so. If it's paused, it remains paused.
On the other hand, your implementation of Forward() makes use of VideoPlayer.StepFrame(), which not only advances to the next frame, but also forces the player to be paused (assuming the user from this point on wants to keep advancing explicitly step by step).
If it is desirable for your app to preserve the playback state when moving forward, then a similar logic to what's done in Rewind should be done, by directly using vPlayer.frame. Or you could be doing vPlayer.Pause().