diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 0f07dce333..bdd4151c34 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -1102,6 +1102,31 @@ })) + seekParam; + // Get Video Poster (Code from librarybrowser.js) + var screenWidth = Math.max(screen.height, screen.width), + posterUrl; + + if (item.BackdropImageTags && item.BackdropImageTags.length) { + + posterUrl = ApiClient.getScaledImageUrl(item.Id, { + type: "Backdrop", + index: 0, + maxWidth: screenWidth, + tag: item.BackdropImageTags[0] + }); + + } + else if (item.ParentBackdropItemId && item.ParentBackdropImageTags && item.ParentBackdropImageTags.length) { + + posterUrl = ApiClient.getScaledImageUrl(item.ParentBackdropItemId, { + type: 'Backdrop', + index: 0, + maxWidth: screenWidth, + tag: item.ParentBackdropImageTags[0] + }); + + } + //======================================================================================> // Create video player @@ -1111,11 +1136,11 @@ // Can't autoplay in these browsers so we need to use the full controls if (requiresNativeControls) { - html += '