* Remove asynctask code * add job test example * Fix testing * Fix a couple of imports
152 lines
6.5 KiB
XML
152 lines
6.5 KiB
XML
<!--
|
|
VideoPlayerDev is the player that will eventually be used in the Playlet app.
|
|
It extends the Video component, and will be fully managing the UI, progress,
|
|
buffering, and any state of the video playback.
|
|
This would allow us to be flexible with the UI beyond the customizations
|
|
of the stock Roku Video component.
|
|
-->
|
|
<component name="VideoPlayerDev" extends="Video" includes="AutoBind,Disposable">
|
|
<interface>
|
|
<field id="jobQueue" type="node" bind="/JobQueue" />
|
|
<field id="container" type="node" bind=".." />
|
|
<field id="videoQueue" type="node" bind="../../VideoQueue" />
|
|
<field id="preferences" type="node" bind="../../Preferences" />
|
|
<field id="invidious" type="node" bind="../../Invidious" />
|
|
<field id="previousPlayer" type="node" />
|
|
<field id="minRect" type="rect2D" value="[834,460,426,240]" />
|
|
<field id="maxRect" type="rect2D" value="[0,0,1280,720]" />
|
|
<field id="close" type="boolean" alwaysNotify="true" onChange="OnClose" />
|
|
<field id="minimizeState" type="integer" />
|
|
<field id="playerUiState" type="integer" />
|
|
<function name="PlayWithContent" />
|
|
</interface>
|
|
<children>
|
|
<!-- bs:disable-next-line LOCALE_MISSING_TRANSLATIONS -->
|
|
<SimpleLabel text="Dev Player!"
|
|
color="#FF0000"
|
|
fontUri="font:SmallestBoldSystemFont"
|
|
horizOrigin="right"
|
|
translation="[1280,0]" />
|
|
|
|
<Group id="VideoUi">
|
|
<Poster
|
|
id="BackgroundPosterSmall"
|
|
width="1280"
|
|
height="720"
|
|
blendColor="0x323232" />
|
|
<Poster
|
|
id="BackgroundPoster"
|
|
width="1280"
|
|
height="720"
|
|
blendColor="0x323232" />
|
|
<Group id="TopUi">
|
|
<Poster
|
|
uri="pkg:/images/black-gradient.png"
|
|
opacity="0.8"
|
|
width="1280"
|
|
height="240"
|
|
scaleRotateCenter="[640,120]"
|
|
rotation="3.14159265359" />
|
|
<!--
|
|
TODO:P2 once VideoPlayerDev replaces VideoPlayer, the clock can
|
|
be removed to reuse the Clock from MainScene
|
|
-->
|
|
<Clock id="Clock" />
|
|
<LayoutGroup
|
|
itemSpacings="[5]"
|
|
translation="[68,40]">
|
|
<Label
|
|
id="TitleLabel"
|
|
font="font:LargeBoldSystemFont"
|
|
width="900"
|
|
wrap="true" />
|
|
<Label
|
|
id="SecondaryTitleLabel"
|
|
font="font:SmallestSystemFont"
|
|
width="900"
|
|
wrap="true" />
|
|
</LayoutGroup>
|
|
</Group>
|
|
<Poster
|
|
uri="pkg:/images/black-gradient.png"
|
|
opacity="0.8"
|
|
width="1280"
|
|
height="360"
|
|
translation="[0,360]" />
|
|
|
|
<Group id="Buttons">
|
|
<LayoutGroup
|
|
layoutDirection="horiz"
|
|
horizAlignment="left"
|
|
itemSpacings="[15,15,50]"
|
|
translation="[562,600]">
|
|
<VideoPlayerButton
|
|
id="PreviousButton"
|
|
iconUri="pkg:/images/icons/player/previous.png"
|
|
disabled="true" />
|
|
<VideoPlayerButton
|
|
id="PlayButton"
|
|
iconUri="pkg:/images/icons/player/play.png"
|
|
iconUri2="pkg:/images/icons/player/pause.png"
|
|
disabled="true" />
|
|
<VideoPlayerButton
|
|
id="NextButton"
|
|
iconUri="pkg:/images/icons/player/next.png"
|
|
disabled="true" />
|
|
<VideoPlayerButton
|
|
id="MinimizeButton"
|
|
iconUri="pkg:/images/icons/player/minimize.png" />
|
|
</LayoutGroup>
|
|
</Group>
|
|
<Group
|
|
id="LoadingUi"
|
|
visible="false">
|
|
<Poster
|
|
id="LoadingSpinnerBackground"
|
|
width="80"
|
|
height="80"
|
|
uri="pkg:/images/white-circle.png"
|
|
opacity="0.4"
|
|
blendColor="0x000000" />
|
|
<BusySpinner
|
|
id="LoadingSpinner"
|
|
spinInterval="1">
|
|
<Label
|
|
id="LoadingPercentLabel"
|
|
horizAlign="center"
|
|
vertAlign="center"
|
|
width="150"
|
|
height="150"
|
|
font="font:SmallestSystemFont" />
|
|
<Label
|
|
id="LoadingLabel"
|
|
width="150"
|
|
horizAlign="center"
|
|
translation="[0,150]"
|
|
font="font:SmallestSystemFont" />
|
|
</BusySpinner>
|
|
</Group>
|
|
<Group>
|
|
<Timer id="ProgressTimer" repeat="true" duration="1" />
|
|
<TrickPlayBar
|
|
id="TrickPlayBar"
|
|
translation="[68,660]" />
|
|
</Group>
|
|
</Group>
|
|
|
|
<Timer id="HideVideoUiTimer" duration="3" />
|
|
<Animation id="UiFadeAnimation" duration="0.3" optional="true">
|
|
<FloatFieldInterpolator id="UiFadeOpacityInterpolator" key="[0.0, 0.5, 1.0]" keyValue="[0.0, 0.5, 1.0]" fieldToInterp="VideoUi.opacity" />
|
|
</Animation>
|
|
|
|
<Animation id="minimizeAnimation" duration="0.2" 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="#000000" opacity="0.8" visible="false">
|
|
<Label id="fullScreenHintLabel" text="Press Options (*) for full screen" height="26" color="#FFFFFF" horizAlign="center" vertAlign="center" font="font:SmallestSystemFont" />
|
|
<Timer id="fullScreenHintTimer" duration="5" />
|
|
</Rectangle>
|
|
</children>
|
|
</component> |