diff --git a/CHANGELOG.md b/CHANGELOG.md index a8aa0da0..8f72ebe6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Channels sub count in web app - Channel drag and drop in web app +- Video thumbnail when adding to queue from lounge ### Removed diff --git a/playlet-lib/src/components/Services/LoungeService/LoungeVideoQueue.bs b/playlet-lib/src/components/Services/LoungeService/LoungeVideoQueue.bs index 03ee5b56..06e9538d 100644 --- a/playlet-lib/src/components/Services/LoungeService/LoungeVideoQueue.bs +++ b/playlet-lib/src/components/Services/LoungeService/LoungeVideoQueue.bs @@ -33,10 +33,7 @@ namespace LoungeVideoQueue if queueNodesDict.DoesExist(vId) newQueueNodes.Push(queueNodesDict[vId]) else - payload = { - "type": "video" - "videoId": vId - } + payload = CreateVideoPayload(vId) if instance = invalid instance = invService.GetInstance() @@ -97,10 +94,7 @@ namespace LoungeVideoQueue preferences = videoQueueNode.preferences queueNotifications = preferences["misc.queue_notifications"] if queueNotifications - payload = { - "type": "video" - "videoId": eventVideoId - } + payload = CreateVideoPayload(eventVideoId) if instance = invalid instance = invService.GetInstance() @@ -117,4 +111,36 @@ namespace LoungeVideoQueue end if end function + function CreateVideoPayload(videoId as string) as object + return { + "type": "video" + "videoId": videoId + "videoThumbnails": [ + { + "quality": "maxres" + "url": `https://i.ytimg.com/vi/${videoId}/maxresdefault.jpg` + "width": 1280 + "height": 720 + } + { + "quality": "sddefault" + "url": `https://i.ytimg.com/vi/${videoId}/sddefault.jpg` + "width": 640 + "height": 480 + } + { + "quality": "high" + "url": `https://i.ytimg.com/vi/${videoId}/hqdefault.jpg` + "width": 480 + "height": 360 + } + { + "quality": "medium" + "url": `https://i.ytimg.com/vi/${videoId}/mqdefault.jpg` + "width": 320 + "height": 180 + } + ] + } + end function end namespace