diff --git a/src/renderer/components/watch-video-info/watch-video-info.js b/src/renderer/components/watch-video-info/watch-video-info.js index 52356b3d..9a54283e 100644 --- a/src/renderer/components/watch-video-info/watch-video-info.js +++ b/src/renderer/components/watch-video-info/watch-video-info.js @@ -90,6 +90,10 @@ export default Vue.extend({ lengthSeconds: { type: Number, required: true + }, + videoThumbnail: { + type: String, + required: true } }, data: function () { @@ -223,6 +227,14 @@ export default Vue.extend({ } } }, + mounted: function () { + /* eslint-disable-next-line */ + navigator.mediaSession.metadata = new MediaMetadata({ + title: this.title, + artist: this.channelName, + artwork: this.videoThumbnail + }) + }, methods: { goToChannel: function () { this.$router.push({ path: `/channel/${this.channelId}` }) diff --git a/src/renderer/views/Watch/Watch.vue b/src/renderer/views/Watch/Watch.vue index 8202edde..cb428351 100644 --- a/src/renderer/views/Watch/Watch.vue +++ b/src/renderer/views/Watch/Watch.vue @@ -82,6 +82,7 @@ :watching-playlist="watchingPlaylist" :theatre-possible="theatrePossible" :length-seconds="videoLengthSeconds" + :video-thumbnail="thumbnail" class="watchVideo" :class="{ theatreWatchVideo: useTheatreMode }" @theatre-mode="toggleTheatreMode"