mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-11-03 19:17:16 -05:00 
			
		
		
		
	Front: Fix props of MediaSessionManager for Image
This commit is contained in:
		
							parent
							
								
									67e1dadfab
								
							
						
					
					
						commit
						7f144e8cc3
					
				@ -26,12 +26,12 @@ import { durationAtom, playAtom, progressAtom } from "./state";
 | 
			
		||||
 | 
			
		||||
export const MediaSessionManager = ({
 | 
			
		||||
	title,
 | 
			
		||||
	image,
 | 
			
		||||
	imageUri,
 | 
			
		||||
	previous,
 | 
			
		||||
	next,
 | 
			
		||||
}: {
 | 
			
		||||
	title?: string;
 | 
			
		||||
	image?: string | null;
 | 
			
		||||
	imageUri?: string | null;
 | 
			
		||||
	previous?: string;
 | 
			
		||||
	next?: string;
 | 
			
		||||
}) => {
 | 
			
		||||
@ -45,9 +45,9 @@ export const MediaSessionManager = ({
 | 
			
		||||
		if (!("mediaSession" in navigator)) return;
 | 
			
		||||
		navigator.mediaSession.metadata = new MediaMetadata({
 | 
			
		||||
			title: title,
 | 
			
		||||
			artwork: image ? [{ src: image }] : undefined,
 | 
			
		||||
			artwork: imageUri ? [{ src: imageUri }] : undefined,
 | 
			
		||||
		});
 | 
			
		||||
	}, [title, image]);
 | 
			
		||||
	}, [title, imageUri]);
 | 
			
		||||
 | 
			
		||||
	useEffect(() => {
 | 
			
		||||
		if (!("mediaSession" in navigator)) return;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user