From 8cf0b40d3483e5e3769933cec85b2c78edd83008 Mon Sep 17 00:00:00 2001 From: Gamebrary Date: Fri, 26 Aug 2022 16:46:24 -0700 Subject: [PATCH 1/3] added steam movies to media player --- src/components/Game/GameMediaModal.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/Game/GameMediaModal.vue b/src/components/Game/GameMediaModal.vue index bd6252c3..1753b4c7 100644 --- a/src/components/Game/GameMediaModal.vue +++ b/src/components/Game/GameMediaModal.vue @@ -90,9 +90,21 @@ export default { ...mapState(['board', 'game']), gameMedia() { - // TODO: add steam movies // TODO: also handle thumbnails // TODO: do all of this in mutation after loading game + const steamVideos = this.game?.steam?.movies?.map((video) => { + const hiQuality = video?.mp4?.max; + const lowQuality = video?.mp4?.[480]; + + return { + imageUrl: video.thumbnail, + videoUrl: hiQuality || lowQuality, + video: true, + source: 'steam', + } + }) || []; + console.log(steamVideos); + const igdbVideos = this.game?.videos?.map((video) => { return { imageUrl: `https://img.youtube.com/vi/${video.video_id}/sddefault.jpg`, @@ -121,6 +133,7 @@ export default { return [ ...igdbVideos, + ...steamVideos, ...gogImages, ...steamScreenshots, ...igdbScreenshots, From 93334dc802ff5641d22e042dfd92c85e37a5b941 Mon Sep 17 00:00:00 2001 From: Gamebrary Date: Fri, 26 Aug 2022 17:02:52 -0700 Subject: [PATCH 2/3] Restore game cover in media modal header and improved selected image display --- src/components/Game/GameMediaModal.vue | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/components/Game/GameMediaModal.vue b/src/components/Game/GameMediaModal.vue index 1753b4c7..02314692 100644 --- a/src/components/Game/GameMediaModal.vue +++ b/src/components/Game/GameMediaModal.vue @@ -10,18 +10,20 @@ + + + -