Pause/Resume during picture in picture (#156)
* Pause/Resume during picture in picture * changelog * changelog
This commit is contained in:
1 parent
a6f8cb59ee
commit
324543684d
3 files changed
+34
-1
No files matched your search
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Support to pause/play while picture-in-picture
|
||||||
|
|
||||||
## [0.13.0] - 2023-10-02
|
## [0.13.0] - 2023-10-02
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -83,7 +83,22 @@ function onKeyEvent(key as string, press as boolean) as boolean
|
|||||||
end if
|
end if
|
||||||
if key = "options"
|
if key = "options"
|
||||||
VideoUtils.ToggleVideoPictureInPicture()
|
VideoUtils.ToggleVideoPictureInPicture()
|
||||||
else if key = "back"
|
return true
|
||||||
|
end if
|
||||||
|
|
||||||
|
if key = "play"
|
||||||
|
VideoUtils.TogglePause()
|
||||||
|
end if
|
||||||
|
|
||||||
|
if key = "pause"
|
||||||
|
VideoUtils.PauseVideo()
|
||||||
|
end if
|
||||||
|
|
||||||
|
if key = "playonly"
|
||||||
|
VideoUtils.ResumeVideo()
|
||||||
|
end if
|
||||||
|
|
||||||
|
if key = "back"
|
||||||
dialog = DialogUtils.ShowDialogButtons("Do you want to exit Playlet?", "Exit", ["Exit", "Cancel"])
|
dialog = DialogUtils.ShowDialogButtons("Do you want to exit Playlet?", "Exit", ["Exit", "Cancel"])
|
||||||
dialog.observeField("buttonSelected", FuncName(OnExitDialog), ["buttonSelected"])
|
dialog.observeField("buttonSelected", FuncName(OnExitDialog), ["buttonSelected"])
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -81,6 +81,18 @@ namespace VideoUtils
|
|||||||
player.control = "resume"
|
player.control = "resume"
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function TogglePause() as void
|
||||||
|
player = GetVideoPlayer()
|
||||||
|
if player = invalid
|
||||||
|
return
|
||||||
|
end if
|
||||||
|
if player.state = "playing"
|
||||||
|
player.control = "pause"
|
||||||
|
else if player.state = "paused"
|
||||||
|
player.control = "resume"
|
||||||
|
end if
|
||||||
|
end function
|
||||||
|
|
||||||
end namespace
|
end namespace
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user