fix: cast iOS retourne false sans log d erreur car module Android only

This commit is contained in:
Mathieu 2026-05-17 12:38:44 +02:00
parent 171b0976ec
commit e5048c5461

View file

@ -1,4 +1,4 @@
import { DeviceEventEmitter, NativeModules } from 'react-native';
import { DeviceEventEmitter, NativeModules, Platform } from 'react-native';
export type CastSessionState = 'idle' | 'starting' | 'connected' | 'ending';
@ -29,6 +29,7 @@ function ensureModule(): CastModuleType {
}
export async function isCastSupported(): Promise<boolean> {
if (Platform.OS !== 'android') return false;
try {
return await ensureModule().isSupported();
} catch (err) {