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
- Shader warning in 'Hidden/Core/DebugOccluder' thrown after building High Definition 3D Sample Template
- Audio Mixer “+” buttons overlap with UI when the Audio Mixer window layout is set to Horizontal
- "Clear" button in the "Set project display name" closes all the pop-up instead of clearing just a name from the field
- Video Player renders no video on specific devices when using Vulkan
- The Editor slows itself down by showing tons of warnings when the majority of TransformAccessArrays content are NullRefs
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().