mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-11-04 03:27:14 -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 = ({
 | 
					export const MediaSessionManager = ({
 | 
				
			||||||
	title,
 | 
						title,
 | 
				
			||||||
	image,
 | 
						imageUri,
 | 
				
			||||||
	previous,
 | 
						previous,
 | 
				
			||||||
	next,
 | 
						next,
 | 
				
			||||||
}: {
 | 
					}: {
 | 
				
			||||||
	title?: string;
 | 
						title?: string;
 | 
				
			||||||
	image?: string | null;
 | 
						imageUri?: string | null;
 | 
				
			||||||
	previous?: string;
 | 
						previous?: string;
 | 
				
			||||||
	next?: string;
 | 
						next?: string;
 | 
				
			||||||
}) => {
 | 
					}) => {
 | 
				
			||||||
@ -45,9 +45,9 @@ export const MediaSessionManager = ({
 | 
				
			|||||||
		if (!("mediaSession" in navigator)) return;
 | 
							if (!("mediaSession" in navigator)) return;
 | 
				
			||||||
		navigator.mediaSession.metadata = new MediaMetadata({
 | 
							navigator.mediaSession.metadata = new MediaMetadata({
 | 
				
			||||||
			title: title,
 | 
								title: title,
 | 
				
			||||||
			artwork: image ? [{ src: image }] : undefined,
 | 
								artwork: imageUri ? [{ src: imageUri }] : undefined,
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
	}, [title, image]);
 | 
						}, [title, imageUri]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	useEffect(() => {
 | 
						useEffect(() => {
 | 
				
			||||||
		if (!("mediaSession" in navigator)) return;
 | 
							if (!("mediaSession" in navigator)) return;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user