Add some UI to dev player
This commit is contained in:
1 parent
43b62a0ef8
commit
5c215ca974
19 files changed
+292
-4
No files matched your search
@@ -1,10 +1,15 @@
|
||||
import "pkg:/components/Services/Invidious/InvidiousService.bs"
|
||||
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
||||
|
||||
@asynctask
|
||||
function VideoContentTaskDev(input as object) as object
|
||||
titleLabel = input.titleLabel
|
||||
secondaryTitleLabel = input.secondaryTitleLabel
|
||||
contentNode = input.content
|
||||
invidiousNode = input.invidious
|
||||
|
||||
titleLabel.text = contentNode.title
|
||||
|
||||
if StringUtils.IsNullOrEmpty(contentNode.videoId)
|
||||
throw "Can't load video information: videoId is missing"
|
||||
end if
|
||||
@@ -27,7 +32,20 @@ function VideoContentTaskDev(input as object) as object
|
||||
end if
|
||||
|
||||
contentNode.title = metadata.title
|
||||
contentNode.secondaryTitle = metadata.author
|
||||
titleLabel.text = metadata.title
|
||||
|
||||
secondaryTitle = `${metadata.author}`
|
||||
viewCount = InvidiousContent.VideoGetViewCountText(metadata)
|
||||
if not StringUtils.IsNullOrEmpty(viewCount)
|
||||
secondaryTitle = `${secondaryTitle} • ${viewCount}`
|
||||
end if
|
||||
pubslishedText = InvidiousContent.VideoGetPublishedText(metadata)
|
||||
if not StringUtils.IsNullOrEmpty(pubslishedText)
|
||||
secondaryTitle = `${secondaryTitle} • ${pubslishedText}`
|
||||
end if
|
||||
|
||||
contentNode.secondaryTitle = secondaryTitle
|
||||
secondaryTitleLabel.text = secondaryTitle
|
||||
contentNode.live = metadata.liveNow
|
||||
|
||||
streamUrls = [`http://127.0.0.1:8888/api/dash?v=${metadata.videoId}`]
|
||||
|
||||
Reference in new issue
Block a user