OK button as Play/Pause (#307)
* OK button as Play/Pause First OK press now shows Video UI. It's achievable via hidden Roku Video node property `showUI`, which allows you to override how trickplay should be displayed by specifying parts of the UI to be rendered (like 'titleAndTime', 'trickplayBar', e.t.c). A timer is started every time custom UI is shown to prevent UI from staying forever. Second OK press while UI is visible pauses the video (pause poster animation is not added yet). However, since we shouldn't break default OK button actions, we must track whether user is seeking in video UI and if they do, fallback to Video internal OK handler. Also, auto-formatted VideoPlayer.xml * fix comment typo * move HideUI function slightly higher * Addressed the feedback: * Add a workaround to leave Live video behavior intact (no pause, ok simply switches UI back and forth) * Hide UI when minimizing to avoid a bug where title and time element could stay forver * More aggressive `isSeeking` detection, so every left/right/ff/rw button press would cause us to fall back to default OK button handler * More accurate liveNow handling * Changelog --------- Co-authored-by: Brahim Hadriche <brahim.hadriche@gmail.com>
This commit is contained in:
1 parent
544671f246
commit
e9f015bb19
4 files changed
+109
-46
No files matched your search
@@ -16,53 +16,17 @@
|
||||
<function name="Close" />
|
||||
</interface>
|
||||
<children>
|
||||
<Label
|
||||
id="chapterLabel"
|
||||
width="350"
|
||||
height="25"
|
||||
horizAlign="center"
|
||||
vertAlign="center"
|
||||
font="font:SmallestSystemFont"
|
||||
/>
|
||||
<Timer
|
||||
id="chapterLabelTimer"
|
||||
repeat="true"
|
||||
duration="0.25"
|
||||
/>
|
||||
<Animation id="minimizeAnimation"
|
||||
duration="0.3"
|
||||
optional="true">
|
||||
<FloatFieldInterpolator
|
||||
id="widthInterpolator"
|
||||
key="[0.0, 0.5, 1.0]"
|
||||
fieldToInterp="VideoPlayer.width" />
|
||||
<FloatFieldInterpolator
|
||||
id="heightInterpolator"
|
||||
key="[0.0, 0.5, 1.0]"
|
||||
fieldToInterp="VideoPlayer.height" />
|
||||
<Vector2DFieldInterpolator
|
||||
id="translationInterpolator"
|
||||
key="[0.0, 0.5, 1.0]"
|
||||
fieldToInterp="VideoPlayer.translation" />
|
||||
<Label id="chapterLabel" width="350" height="25" horizAlign="center" vertAlign="center" font="font:SmallestSystemFont" />
|
||||
<Timer id="chapterLabelTimer" repeat="true" duration="0.25" />
|
||||
<Animation id="minimizeAnimation" duration="0.3" optional="true">
|
||||
<FloatFieldInterpolator id="widthInterpolator" key="[0.0, 0.5, 1.0]" fieldToInterp="VideoPlayer.width" />
|
||||
<FloatFieldInterpolator id="heightInterpolator" key="[0.0, 0.5, 1.0]" fieldToInterp="VideoPlayer.height" />
|
||||
<Vector2DFieldInterpolator id="translationInterpolator" key="[0.0, 0.5, 1.0]" fieldToInterp="VideoPlayer.translation" />
|
||||
</Animation>
|
||||
<Rectangle
|
||||
id="fullScreenHint"
|
||||
height="26"
|
||||
color="0x000000"
|
||||
opacity="0.8"
|
||||
visible="false">
|
||||
<Label
|
||||
id="fullScreenHintLabel"
|
||||
text="Press Options (*) for full screen"
|
||||
height="26"
|
||||
color="0xFFFFFF"
|
||||
horizAlign="center"
|
||||
vertAlign="center"
|
||||
font="font:SmallestSystemFont"
|
||||
/>
|
||||
<Timer
|
||||
id="fullScreenHintTimer"
|
||||
duration="5" />
|
||||
<Rectangle id="fullScreenHint" height="26" color="0x000000" opacity="0.8" visible="false">
|
||||
<Label id="fullScreenHintLabel" text="Press Options (*) for full screen" height="26" color="0xFFFFFF" horizAlign="center" vertAlign="center" font="font:SmallestSystemFont" />
|
||||
<Timer id="fullScreenHintTimer" duration="5" />
|
||||
<Timer id="trickplayUITimer" duration="5" />
|
||||
</Rectangle>
|
||||
</children>
|
||||
</component>
|
||||
Reference in new issue
Block a user