UNPKG

react-native-theoplayer

Version:

A THEOplayer video component for react-native.

38 lines (37 loc) 1.19 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.THEOplayerNativeCastAdapter = void 0; var _reactNative = require("react-native"); var _THEOplayerNativeChromecast = require("./THEOplayerNativeChromecast"); var _THEOplayerNativeAirplay = require("./THEOplayerNativeAirplay"); class THEOplayerNativeCastAdapter { constructor(_player, _view) { this._player = _player; this._view = _view; this._chromecast = new _THEOplayerNativeChromecast.THEOplayerNativeChromecast(this._player, this._view); if (_reactNative.Platform.OS !== 'android') { this._airplay = new _THEOplayerNativeAirplay.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_(); } } exports.THEOplayerNativeCastAdapter = THEOplayerNativeCastAdapter; //# sourceMappingURL=THEOplayerNativeCastAdapter.js.map