Fix #313 by catching when unhide occurs and explicitly re-opening video player #326
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a bug with the hide & unhide video actions, #313. The issue is that hide will close the video player component and unhide will cause a seek which expects the video player to be re-opened. However an optimization was made to seek so that it wouldn't close and re-open the video player (#322), and this ends up breaking unhide.
As a fix this change catches the case where unhide occurs and does an explicit re-open of the video player. For all other seeks (like looping, user initiated seek, etc.) the quick reset occurs instead of a full close & open.
I tested this by playing a video and using the dbuscontrol.sh to run hide, unhide, and setvideopos. Before the fix hide would work but neither unhide or setvideopos would work as expected. After the fix the same commands work as expected--hide will stop displaying the video, unhide will show the video again, and setvideopos will change what area of the screen displays the video.