Support playing a video from a specific time (cast from phone, drag a… (#88)

* Support playing a video from a specific time (cast from phone, drag and drop, open in Invidious)

* Remove a console log
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2023-06-25 16:17:12 -04:00
1 parent 6c84630cec
commit 3acf733eec
14 files changed
+220 -45

No files matched your search

+7 -4
View File
@@ -113,8 +113,11 @@ function OnWebServerLogin()
m.homeGridScreen.refresh = true
end function
function OnWebServerCommand()
if m.serverTask.command.StartsWith("play:")
function OnWebServerCommand() as void
if m.serverTask.command = invalid or m.serverTask.command.command = invalid
return
end if
if m.serverTask.command.command = "play"
sender = m.videoContainer.sender ?? m.currentFocued
if m.videoContainer.fullscreen
dialog = m.top.getScene().dialog
@@ -122,7 +125,7 @@ function OnWebServerCommand()
dialog.close = true
end if
end if
PlayVideo(m.serverTask.command.Mid(5), { sender: sender })
PlayVideo(m.serverTask.command.videoId, { sender: sender, timestamp: m.serverTask.command.timestamp })
end if
end function
@@ -146,5 +149,5 @@ function PlayVideoFromArgs(args as object) as void
end if
sender = m.videoContainer.sender ?? m.currentFocued
PlayVideo(args.contentId, { sender: sender })
PlayVideo(args.contentId, { sender: sender, timestamp: args.timestamp })
end function