UNPKG

react-native-theoplayer

Version:

A THEOplayer video component for react-native.

33 lines (32 loc) 946 B
"use strict"; import { Platform } from 'react-native'; import { THEOplayerNativeChromecast } from './THEOplayerNativeChromecast'; import { THEOplayerNativeAirplay } from './THEOplayerNativeAirplay'; export class THEOplayerNativeCastAdapter { constructor(_player, _view) { this._player = _player; this._view = _view; this._chromecast = new THEOplayerNativeChromecast(this._player, this._view); if (Platform.OS !== 'android') { this._airplay = new THEOplayerNativeAirplay(this._player); } } get casting() { return this._chromecast.casting || this._airplay?.casting === true; } get chromecast() { return this._chromecast; } get airplay() { return this._airplay; } async init_() { await this._chromecast?.init_(); await this._airplay?.init_(); } unload_() { this._chromecast.unload_(); this._airplay?.unload_(); } } //# sourceMappingURL=THEOplayerNativeCastAdapter.js.map