Live banner on live videos
This commit is contained in:
1 parent
b113fcfe7e
commit
8aa1d1ae51
4 files changed
+57
-31
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user