Fix MediaMetadata setter
This commit is contained in:
parent
26cc5295ad
commit
77d2e7a6ee
|
@ -228,12 +228,20 @@ export default Vue.extend({
|
|||
}
|
||||
},
|
||||
mounted: function () {
|
||||
/* eslint-disable-next-line */
|
||||
navigator.mediaSession.metadata = new MediaMetadata({
|
||||
title: this.title,
|
||||
artist: this.channelName,
|
||||
artwork: this.videoThumbnail
|
||||
})
|
||||
if ('mediaSession' in navigator) {
|
||||
/* eslint-disable-next-line */
|
||||
navigator.mediaSession.metadata = new MediaMetadata({
|
||||
title: this.title,
|
||||
artist: this.channelName,
|
||||
artwork: [
|
||||
{
|
||||
src: this.videoThumbnail,
|
||||
sizes: '128x128',
|
||||
type: 'image/png'
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goToChannel: function () {
|
||||
|
|
Loading…
Reference in New Issue