diff --git a/playlet-lib/src/components/VideoPlayerDev/TrickPlayBar.bs b/playlet-lib/src/components/VideoPlayerDev/TrickPlayBar.bs
new file mode 100644
index 00000000..84725e90
--- /dev/null
+++ b/playlet-lib/src/components/VideoPlayerDev/TrickPlayBar.bs
@@ -0,0 +1,16 @@
+const PROGRESS_WIDTH = 1144
+const PROGRESS_HEIGHT = 6
+const SEEK_HANDLE_WIDTH = 16
+const SEEK_HANDLE_HEIGHT = 16
+
+function Init()
+ m.progressBar = m.top.findNode("ProgressBar")
+ m.seekHandle = m.top.findNode("SeekHandle")
+ OnProgressChange()
+end function
+
+function OnProgressChange()
+ position = PROGRESS_WIDTH * m.top.progress
+ m.progressBar.width = position
+ m.seekHandle.translation = [position - SEEK_HANDLE_WIDTH / 2, (PROGRESS_HEIGHT - SEEK_HANDLE_HEIGHT) / 2]
+end function
diff --git a/playlet-lib/src/components/VideoPlayerDev/TrickPlayBar.xml b/playlet-lib/src/components/VideoPlayerDev/TrickPlayBar.xml
new file mode 100644
index 00000000..28e6caad
--- /dev/null
+++ b/playlet-lib/src/components/VideoPlayerDev/TrickPlayBar.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs b/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs
index 2089aa86..14bd4ab5 100644
--- a/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs
+++ b/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.bs
@@ -23,6 +23,8 @@ function Init()
m.playButton = m.top.findNode("PlayButton")
m.nextButton = m.top.findNode("NextButton")
m.minimizeButton = m.top.findNode("MinimizeButton")
+ m.trickPlayBar = m.top.findNode("TrickPlayBar")
+ m.progressTimer = m.top.findNode("ProgressTimer")
SetupLoadingSpinner()
end function
@@ -43,6 +45,8 @@ function OnNodeReady()
DisposableObserveField(m.top, "state", FuncName(OnPlayerStateChange))
DisposableObserveField(m.top, "bufferingStatus", FuncName(OnBufferingStatusChange))
+ DisposableObserveField(m.progressTimer, "fire", FuncName(OnProgress))
+
SetNavigation(m.previousButton, "right", m.playButton)
SetNavigation(m.playButton, "right", m.nextButton)
SetNavigation(m.nextButton, "right", m.minimizeButton)
@@ -186,12 +190,24 @@ function OnMinimizeButtonSelected()
VideoQueueUtils.ToggleVideoPictureInPicture(m.videoQueue)
end function
-function OnPlayerStateChange()
+function OnPlayerStateChange() as void
state = m.top.state
+
+ if state = "stopping" or state = "stopped"
+ m.top.videoUiVisible = false
+ return
+ end if
+
if state = "playing"
m.playButton.toggleState = false ' Pause icon
+ m.playButton.disabled = false
+
+ m.progressTimer.control = "start"
else if state = "paused"
m.playButton.toggleState = true ' Play icon
+ m.playButton.disabled = false
+ else
+ m.playButton.disabled = true
end if
if state = "buffering"
@@ -213,6 +229,16 @@ function OnBufferingStatusChange() as void
m.loadingPercentLabel.text = `${bufferingStatus.percentage}%`
end function
+function OnProgress() as void
+ duration = m.top.duration
+ if duration = 0
+ m.trickPlayBar.progress = 0
+ return
+ end if
+
+ m.trickPlayBar.progress = m.top.position / duration
+end function
+
function OnDispose()
m.fullScreenHintTimer.control = "stop"
m.loadingSpinner.control = "stop"
diff --git a/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.xml b/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.xml
index eefe1553..6a220c8b 100644
--- a/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.xml
+++ b/playlet-lib/src/components/VideoPlayerDev/VideoPlayerDev.xml
@@ -62,7 +62,8 @@
+ iconUri2="pkg:/images/icons/player/pause.png"
+ disabled="true" />
+
+
+
+
@@ -99,8 +106,8 @@
-
-
+
+
diff --git a/playlet-lib/src/images/white-circle-xs.png b/playlet-lib/src/images/white-circle-xs.png
new file mode 100644
index 00000000..c39af128
Binary files /dev/null and b/playlet-lib/src/images/white-circle-xs.png differ
diff --git a/playlet-lib/src/images/white-circle.png b/playlet-lib/src/images/white-circle.png
index b891c993..9bb0cf22 100644
Binary files a/playlet-lib/src/images/white-circle.png and b/playlet-lib/src/images/white-circle.png differ
diff --git a/playlet-lib/src/images/white-circle.svg b/playlet-lib/src/images/white-circle.svg
new file mode 100644
index 00000000..de361c32
--- /dev/null
+++ b/playlet-lib/src/images/white-circle.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/playlet-lib/src/images/white-circle.svg.meta.json5 b/playlet-lib/src/images/white-circle.svg.meta.json5
new file mode 100644
index 00000000..1e316a6d
--- /dev/null
+++ b/playlet-lib/src/images/white-circle.svg.meta.json5
@@ -0,0 +1,17 @@
+{
+ inputHash: '082106375220883816c8b3b54dbcd6d1',
+ outputs: [
+ {
+ outputFilePath: 'images/white-circle.png',
+ outputHash: '9400f095b6f953a48f570c64674cb545',
+ width: 256,
+ height: 256,
+ },
+ {
+ outputFilePath: 'images/white-circle-xs.png',
+ outputHash: 'be5ca187a83273c7aae09b2c55e93934',
+ width: 20,
+ height: 20,
+ },
+ ],
+}
\ No newline at end of file
diff --git a/playlet-lib/src/images/white-pixel.png b/playlet-lib/src/images/white-pixel.png
new file mode 100644
index 00000000..d7f30227
Binary files /dev/null and b/playlet-lib/src/images/white-pixel.png differ