Live banner on live videos

This commit is contained in:
Brahim Hadriche committed 2022-11-22 17:39:50 -05:00
1 parent b113fcfe7e
commit 8aa1d1ae51
4 files changed
+57 -31

No files matched your search

@@ -107,7 +107,7 @@ function OnHomeGridScreenVideoSelected(event as object) as void
rowContent = grid.content.GetChild(selectedRow)
itemContent = rowContent.GetChild(selectedRowItem)
videoId = itemContent.id
videoId = itemContent.videoId
if m.videoPlayer <> invalid
if m.videoPlayer.videoId = videoId
@@ -160,7 +160,7 @@ function OnHomeGridScreenVideoFocused(event as object) as void
rowContent = grid.content.GetChild(selectedRow)
itemContent = rowContent.GetChild(selectedRowItem)
videoId = itemContent.id
videoId = itemContent.videoId
thumbnail = GetThumbnailPoster(videoId)
ShowVideoScreenEmbedded(videoId, thumbnail)
end function
@@ -56,27 +56,7 @@ function GetItemData(video as object) as object
if video.videoId = invalid
return invalid
end if
item = {}
item.title = video.title
item.description = video.description
item.hdPosterURL = GetThumbnailUrl(video.videoThumbnails)
item.releaseDate = video.publishedText
item.id = video.videoId
item.length = video.lengthSeconds
item.author = video.author
item.viewCount = video.viewCount
return item
return video
end function
function GetThumbnailUrl(videoThumbnails as object, quality = "medium" as string) as string
if videoThumbnails.Count() = 0
return ""
end if
for each thumbnail in videoThumbnails
if thumbnail.quality = quality
return thumbnail.url
end if
end for
return videoThumbnails[0].url
end function