mirror of
https://github.com/movixcorp/MovixOpenSource.git
synced 2026-08-16 16:33:41 +00:00
fix: cast iOS retourne false sans log d erreur car module Android only
This commit is contained in:
parent
171b0976ec
commit
e5048c5461
1 changed files with 2 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue