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:
1 parent
6c84630cec
commit
3acf733eec
14 files changed
+220
-45
No files matched your search
@@ -7,11 +7,16 @@ import "pkg:/components/VideoPlayer/MarkVideoWatchedTask.bs"
|
||||
function PlayVideo(videoId as string, args = invalid as object)
|
||||
sender = args?.sender
|
||||
metadata = args?.metadata
|
||||
timestamp = args?.timestamp
|
||||
|
||||
if metadata <> invalid and GetInterface(metadata, "ifSGNodeField") <> invalid
|
||||
metadata = args.metadata.getFields()
|
||||
end if
|
||||
|
||||
if timestamp = invalid
|
||||
timestamp = 0
|
||||
end if
|
||||
|
||||
width = 1280
|
||||
height = 720
|
||||
translation = [0.0, 0.0]
|
||||
@@ -29,6 +34,7 @@ function PlayVideo(videoId as string, args = invalid as object)
|
||||
videoContainer.insertChild(videoContainer.videoPlayer, 0)
|
||||
videoContainer.videoPlayer.id = "VideoPlayer"
|
||||
videoContainer.videoPlayer.metadata = metadata
|
||||
videoContainer.videoPlayer.timestamp = timestamp
|
||||
videoContainer.videoPlayer.videoId = videoId
|
||||
videoContainer.videoPlayer.width = width
|
||||
videoContainer.videoPlayer.height = height
|
||||
|
||||
Reference in new issue
Block a user