UNPKG

react-native-theoplayer

Version:

A THEOplayer video component for react-native.

34 lines (33 loc) 1.39 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.THEOAdsNativeAdapter = void 0; var _reactNative = require("react-native"); var _NativeInterstitialAdapter = require("./NativeInterstitialAdapter"); const NativeTHEOAdsModule = _reactNative.NativeModules.THEORCTTHEOAdsModule; class THEOAdsNativeAdapter { // @ts-ignore constructor(_player) { this._player = _player; } get currentInterstitials() { return this.getCurrentInterstitials(); } get scheduledInterstitials() { return this.getScheduledInterstitials(); } async getCurrentInterstitials() { const interstitials = await NativeTHEOAdsModule.currentInterstitials(this._player.nativeHandle); return interstitials.map(interstitial => (0, _NativeInterstitialAdapter.createNativeInterstitial)(this._player.nativeHandle, interstitial)); } async getScheduledInterstitials() { const interstitials = await NativeTHEOAdsModule.scheduledInterstitials(this._player.nativeHandle); return interstitials.map(interstitial => (0, _NativeInterstitialAdapter.createNativeInterstitial)(this._player.nativeHandle, interstitial)); } replaceAdTagParameters(adTagParameters) { NativeTHEOAdsModule.replaceAdTagParameters(this._player.nativeHandle, adTagParameters); } } exports.THEOAdsNativeAdapter = THEOAdsNativeAdapter; //# sourceMappingURL=THEOAdsNativeAdapter.js.map