fix(front): #2401 set high quality as default
This commit is contained in:
parent
8ac7503654
commit
0ea55814a8
|
@ -231,15 +231,13 @@ export const usePlayer = createGlobalState(() => {
|
||||||
// Mobile controls and lockscreen cover art
|
// Mobile controls and lockscreen cover art
|
||||||
const updateMediaSession = () => {
|
const updateMediaSession = () => {
|
||||||
if ('mediaSession' in navigator && currentTrack.value) {
|
if ('mediaSession' in navigator && currentTrack.value) {
|
||||||
// Check if the cover is large enough for higher res
|
|
||||||
const isHighRes = currentTrack.value.coverUrl.includes('large') || currentTrack.value.coverUrl.includes('original')
|
|
||||||
|
|
||||||
navigator.mediaSession.metadata = new MediaMetadata({
|
navigator.mediaSession.metadata = new MediaMetadata({
|
||||||
title: currentTrack.value.title,
|
title: currentTrack.value.title,
|
||||||
artist: currentTrack.value.artistCredit?.map(ac => ac.credit).join(', ') || 'Unknown Artist',
|
artist: currentTrack.value.artistCredit?.map(ac => ac.credit).join(', ') || 'Unknown Artist',
|
||||||
album: currentTrack.value.albumTitle || 'Unknown Album',
|
album: currentTrack.value.albumTitle || 'Unknown Album',
|
||||||
artwork: [
|
artwork: [
|
||||||
{ src: currentTrack.value.coverUrl, sizes: isHighRes ? "1200x1200" : "1024x1024", type: 'image/jpeg' }
|
{ src: currentTrack.value.coverUrl, sizes: "1200x1200", type: 'image/jpeg' }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue