react-native-theoplayer 1.7.1 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/android/src/main/java/com/theoplayer/PlayerConfigAdapter.kt +115 -0
- package/android/src/main/java/com/theoplayer/PlayerEventEmitter.kt +648 -0
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerPackage.kt +23 -0
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.kt +446 -0
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerViewManager.kt +117 -0
- package/android/src/main/java/com/theoplayer/{TimeUpdateRate.java → TimeUpdateRate.kt} +2 -2
- package/android/src/main/java/com/theoplayer/ads/AdAdapter.kt +161 -0
- package/android/src/main/java/com/theoplayer/ads/AdEventAdapter.kt +90 -0
- package/android/src/main/java/com/theoplayer/ads/AdsModule.kt +140 -0
- package/android/src/main/java/com/theoplayer/cast/CastEventAdapter.kt +81 -0
- package/android/src/main/java/com/theoplayer/cast/CastModule.kt +75 -0
- package/android/src/main/java/com/theoplayer/drm/ContentProtectionAdapter.kt +2 -2
- package/android/src/main/java/com/theoplayer/drm/ContentProtectionModule.kt +1 -2
- package/android/src/main/java/com/theoplayer/drm/ProxyContentProtectionIntegration.kt +1 -2
- package/android/src/main/java/com/theoplayer/drm/ProxyContentProtectionIntegrationFactory.kt +3 -5
- package/android/src/main/java/com/theoplayer/source/SourceAdapter.kt +402 -0
- package/android/src/main/java/com/theoplayer/track/MediaTrackEventType.kt +6 -0
- package/android/src/main/java/com/theoplayer/track/MediaTrackType.kt +6 -0
- package/android/src/main/java/com/theoplayer/track/QualityListAdapter.kt +43 -0
- package/android/src/main/java/com/theoplayer/track/QualityListFilter.kt +28 -0
- package/android/src/main/java/com/theoplayer/track/TextTrackCueEventType.kt +10 -0
- package/android/src/main/java/com/theoplayer/track/TrackEventType.kt +7 -0
- package/android/src/main/java/com/theoplayer/track/TrackListAdapter.kt +219 -0
- package/android/src/main/java/com/theoplayer/util/ViewResolver.kt +19 -0
- package/ios/THEOplayerRCTAdAggregator.swift +15 -6
- package/ios/THEOplayerRCTAdsAPI.swift +39 -40
- package/ios/THEOplayerRCTBridge.m +54 -1
- package/ios/THEOplayerRCTCastAPI.swift +275 -0
- package/ios/THEOplayerRCTDebug.swift +3 -0
- package/ios/THEOplayerRCTSourceDescriptionBuilder.swift +91 -19
- package/ios/THEOplayerRCTTrackEventTypes.swift +17 -0
- package/ios/{THEOplayerRCTMetadataAggregator.swift → THEOplayerRCTTrackMetadataAggregator.swift} +69 -55
- package/ios/THEOplayerRCTView.swift +126 -22
- package/ios/THEOplayerRCTViewAdEventHandler.swift +7 -5
- package/ios/THEOplayerRCTViewCastEventHandler.swift +124 -0
- package/ios/THEOplayerRCTViewMainEventHandler.swift +1 -1
- package/ios/THEOplayerRCTViewMediaTrackEventHandler.swift +185 -0
- package/ios/THEOplayerRCTViewTextTrackEventHandler.swift +30 -13
- package/ios/custom/Frameworks/ios/put_custom_ios_xcframework_here.txt +1 -1
- package/ios/custom/Frameworks/tvos/put_custom_tvos_xcframework_here.txt +2 -0
- package/ios/custom/react-native-theoplayer_custom.podspec +46 -0
- package/lib/commonjs/api/THEOplayerView.js.map +1 -1
- package/lib/commonjs/api/barrel.js +21 -8
- package/lib/commonjs/api/barrel.js.map +1 -1
- package/lib/commonjs/api/cast/Airplay.js +6 -0
- package/lib/commonjs/api/cast/Airplay.js.map +1 -0
- package/lib/commonjs/api/cast/CastAPI.js +6 -0
- package/lib/commonjs/api/cast/CastAPI.js.map +1 -0
- package/lib/commonjs/api/cast/CastConfiguration.js +2 -0
- package/lib/commonjs/api/cast/CastConfiguration.js.map +1 -0
- package/lib/commonjs/api/cast/CastState.js +2 -0
- package/lib/commonjs/api/cast/CastState.js.map +1 -0
- package/lib/commonjs/api/cast/Chromecast.js +6 -0
- package/lib/commonjs/api/cast/Chromecast.js.map +1 -0
- package/lib/commonjs/api/cast/barrel.js +71 -0
- package/lib/commonjs/api/cast/barrel.js.map +1 -0
- package/lib/commonjs/api/config/PlayerConfiguration.js.map +1 -1
- package/lib/commonjs/api/error/ChromecastError.js +2 -0
- package/lib/commonjs/api/error/ChromecastError.js.map +1 -0
- package/lib/commonjs/api/error/barrel.js +13 -0
- package/lib/commonjs/api/error/barrel.js.map +1 -1
- package/lib/commonjs/api/event/CastEvent.js +21 -0
- package/lib/commonjs/api/event/CastEvent.js.map +1 -0
- package/lib/commonjs/api/event/TrackEvent.js +17 -1
- package/lib/commonjs/api/event/TrackEvent.js.map +1 -1
- package/lib/commonjs/api/event/barrel.js +25 -12
- package/lib/commonjs/api/event/barrel.js.map +1 -1
- package/lib/commonjs/api/source/SourceDescription.js.map +1 -1
- package/lib/commonjs/api/source/barrel.js +13 -0
- package/lib/commonjs/api/source/barrel.js.map +1 -1
- package/lib/commonjs/api/source/metadata/MetadataDescription.js +2 -0
- package/lib/commonjs/api/source/metadata/MetadataDescription.js.map +1 -0
- package/lib/commonjs/api/source/metadata/barrel.js +19 -0
- package/lib/commonjs/api/source/metadata/barrel.js.map +1 -0
- package/lib/commonjs/internal/THEOplayerView.js +30 -0
- package/lib/commonjs/internal/THEOplayerView.js.map +1 -1
- package/lib/commonjs/internal/THEOplayerView.web.js +80 -20
- package/lib/commonjs/internal/THEOplayerView.web.js.map +1 -1
- package/lib/commonjs/internal/cast/THEOplayerNativeAirplay.js +34 -0
- package/lib/commonjs/internal/cast/THEOplayerNativeAirplay.js.map +1 -0
- package/lib/commonjs/internal/cast/THEOplayerNativeCastApi.js +46 -0
- package/lib/commonjs/internal/cast/THEOplayerNativeCastApi.js.map +1 -0
- package/lib/commonjs/internal/cast/THEOplayerNativeChromecast.js +42 -0
- package/lib/commonjs/internal/cast/THEOplayerNativeChromecast.js.map +1 -0
- package/lib/commonjs/internal/cast/THEOplayerWebCastApi.js +31 -0
- package/lib/commonjs/internal/cast/THEOplayerWebCastApi.js.map +1 -0
- package/lib/commonjs/internal/web/stub/CastButtonStub.js +16 -0
- package/lib/commonjs/internal/web/stub/CastButtonStub.js.map +1 -0
- package/lib/module/api/THEOplayerView.js.map +1 -1
- package/lib/module/api/barrel.js +1 -0
- package/lib/module/api/barrel.js.map +1 -1
- package/lib/module/api/cast/Airplay.js +2 -0
- package/lib/module/api/cast/Airplay.js.map +1 -0
- package/lib/module/api/cast/CastAPI.js +2 -0
- package/lib/module/api/cast/CastAPI.js.map +1 -0
- package/lib/module/api/cast/CastConfiguration.js +2 -0
- package/lib/module/api/cast/CastConfiguration.js.map +1 -0
- package/lib/module/api/cast/CastState.js +2 -0
- package/lib/module/api/cast/CastState.js.map +1 -0
- package/lib/module/api/cast/Chromecast.js +2 -0
- package/lib/module/api/cast/Chromecast.js.map +1 -0
- package/lib/module/api/cast/barrel.js +6 -0
- package/lib/module/api/cast/barrel.js.map +1 -0
- package/lib/module/api/config/PlayerConfiguration.js.map +1 -1
- package/lib/module/api/error/ChromecastError.js +2 -0
- package/lib/module/api/error/ChromecastError.js.map +1 -0
- package/lib/module/api/error/barrel.js +1 -0
- package/lib/module/api/error/barrel.js.map +1 -1
- package/lib/module/api/event/CastEvent.js +14 -0
- package/lib/module/api/event/CastEvent.js.map +1 -0
- package/lib/module/api/event/TrackEvent.js +14 -0
- package/lib/module/api/event/TrackEvent.js.map +1 -1
- package/lib/module/api/event/barrel.js +2 -1
- package/lib/module/api/event/barrel.js.map +1 -1
- package/lib/module/api/source/SourceDescription.js.map +1 -1
- package/lib/module/api/source/barrel.js +1 -0
- package/lib/module/api/source/barrel.js.map +1 -1
- package/lib/module/api/source/metadata/MetadataDescription.js +2 -0
- package/lib/module/api/source/metadata/MetadataDescription.js.map +1 -0
- package/lib/module/api/source/metadata/barrel.js +2 -0
- package/lib/module/api/source/metadata/barrel.js.map +1 -0
- package/lib/module/internal/THEOplayerView.js +29 -0
- package/lib/module/internal/THEOplayerView.js.map +1 -1
- package/lib/module/internal/THEOplayerView.web.js +80 -21
- package/lib/module/internal/THEOplayerView.web.js.map +1 -1
- package/lib/module/internal/cast/THEOplayerNativeAirplay.js +24 -0
- package/lib/module/internal/cast/THEOplayerNativeAirplay.js.map +1 -0
- package/lib/module/internal/cast/THEOplayerNativeCastApi.js +34 -0
- package/lib/module/internal/cast/THEOplayerNativeCastApi.js.map +1 -0
- package/lib/module/internal/cast/THEOplayerNativeChromecast.js +32 -0
- package/lib/module/internal/cast/THEOplayerNativeChromecast.js.map +1 -0
- package/lib/module/internal/cast/THEOplayerWebCastApi.js +22 -0
- package/lib/module/internal/cast/THEOplayerWebCastApi.js.map +1 -0
- package/lib/module/internal/web/stub/CastButtonStub.js +6 -0
- package/lib/module/internal/web/stub/CastButtonStub.js.map +1 -0
- package/lib/typescript/lib/commonjs/api/cast/Airplay.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/cast/CastAPI.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/cast/CastConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/cast/CastState.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/cast/Chromecast.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/cast/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/error/ChromecastError.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/event/CastEvent.d.ts +2 -0
- package/lib/typescript/lib/commonjs/api/event/TrackEvent.d.ts +4 -0
- package/lib/typescript/lib/commonjs/api/source/metadata/MetadataDescription.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/source/metadata/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/internal/THEOplayerView.d.ts +3 -0
- package/lib/typescript/lib/commonjs/internal/THEOplayerView.web.d.ts +3 -0
- package/lib/typescript/lib/commonjs/internal/cast/THEOplayerNativeAirplay.d.ts +9 -0
- package/lib/typescript/lib/commonjs/internal/cast/THEOplayerNativeCastApi.d.ts +12 -0
- package/lib/typescript/lib/commonjs/internal/cast/THEOplayerNativeChromecast.d.ts +11 -0
- package/lib/typescript/lib/commonjs/internal/cast/THEOplayerWebCastApi.d.ts +8 -0
- package/lib/typescript/lib/commonjs/internal/web/stub/CastButtonStub.d.ts +2 -0
- package/lib/typescript/lib/module/api/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/api/cast/Airplay.d.ts +1 -0
- package/lib/typescript/lib/module/api/cast/CastAPI.d.ts +1 -0
- package/lib/typescript/lib/module/api/cast/CastConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/cast/CastState.d.ts +0 -0
- package/lib/typescript/lib/module/api/cast/Chromecast.d.ts +1 -0
- package/lib/typescript/lib/module/api/cast/barrel.d.ts +3 -0
- package/lib/typescript/lib/module/api/error/ChromecastError.d.ts +0 -0
- package/lib/typescript/lib/module/api/event/CastEvent.d.ts +1 -0
- package/lib/typescript/lib/module/api/event/TrackEvent.d.ts +2 -0
- package/lib/typescript/lib/module/api/event/barrel.d.ts +2 -1
- package/lib/typescript/lib/module/api/source/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/metadata/MetadataDescription.d.ts +0 -0
- package/lib/typescript/lib/module/api/source/metadata/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/internal/THEOplayerView.d.ts +3 -0
- package/lib/typescript/lib/module/internal/THEOplayerView.web.d.ts +3 -0
- package/lib/typescript/lib/module/internal/cast/THEOplayerNativeAirplay.d.ts +8 -0
- package/lib/typescript/lib/module/internal/cast/THEOplayerNativeCastApi.d.ts +11 -0
- package/lib/typescript/lib/module/internal/cast/THEOplayerNativeChromecast.d.ts +10 -0
- package/lib/typescript/lib/module/internal/cast/THEOplayerWebCastApi.d.ts +7 -0
- package/lib/typescript/lib/module/internal/web/stub/CastButtonStub.d.ts +2 -0
- package/lib/typescript/src/api/THEOplayerView.d.ts +21 -3
- package/lib/typescript/src/api/barrel.d.ts +1 -0
- package/lib/typescript/src/api/cast/Airplay.d.ts +27 -0
- package/lib/typescript/src/api/cast/CastAPI.d.ts +25 -0
- package/lib/typescript/src/api/cast/CastConfiguration.d.ts +41 -0
- package/lib/typescript/src/api/cast/CastState.d.ts +10 -0
- package/lib/typescript/src/api/cast/Chromecast.d.ts +39 -0
- package/lib/typescript/src/api/cast/barrel.d.ts +5 -0
- package/lib/typescript/src/api/config/PlayerConfiguration.d.ts +6 -1
- package/lib/typescript/src/api/error/ChromecastError.d.ts +34 -0
- package/lib/typescript/src/api/error/barrel.d.ts +1 -0
- package/lib/typescript/src/api/event/CastEvent.d.ts +21 -0
- package/lib/typescript/src/api/event/TrackEvent.d.ts +49 -3
- package/lib/typescript/src/api/event/barrel.d.ts +2 -1
- package/lib/typescript/src/api/source/SourceDescription.d.ts +7 -0
- package/lib/typescript/src/api/source/barrel.d.ts +1 -0
- package/lib/typescript/src/api/source/metadata/MetadataDescription.d.ts +12 -0
- package/lib/typescript/src/api/source/metadata/barrel.d.ts +1 -0
- package/lib/typescript/src/internal/THEOplayerView.d.ts +9 -1
- package/lib/typescript/src/internal/THEOplayerView.web.d.ts +7 -2
- package/lib/typescript/src/internal/cast/THEOplayerNativeAirplay.d.ts +9 -0
- package/lib/typescript/src/internal/cast/THEOplayerNativeCastApi.d.ts +10 -0
- package/lib/typescript/src/internal/cast/THEOplayerNativeChromecast.d.ts +11 -0
- package/lib/typescript/src/internal/cast/THEOplayerWebCastApi.d.ts +9 -0
- package/lib/typescript/src/internal/web/stub/CastButtonStub.d.ts +3 -0
- package/package.json +2 -2
- package/react-native-theoplayer.podspec +2 -2
- package/src/api/THEOplayerView.ts +25 -3
- package/src/api/barrel.ts +1 -0
- package/src/api/cast/Airplay.ts +31 -0
- package/src/api/cast/CastAPI.ts +30 -0
- package/src/api/cast/CastConfiguration.ts +44 -0
- package/src/api/cast/CastState.ts +10 -0
- package/src/api/cast/Chromecast.ts +45 -0
- package/src/api/cast/barrel.ts +5 -0
- package/src/api/config/PlayerConfiguration.ts +7 -1
- package/src/api/error/ChromecastError.ts +46 -0
- package/src/api/error/barrel.ts +1 -0
- package/src/api/event/CastEvent.ts +45 -0
- package/src/api/event/TrackEvent.ts +58 -2
- package/src/api/event/barrel.ts +2 -1
- package/src/api/source/SourceDescription.ts +8 -0
- package/src/api/source/barrel.ts +1 -0
- package/src/api/source/metadata/MetadataDescription.ts +13 -0
- package/src/api/source/metadata/barrel.ts +1 -0
- package/src/internal/THEOplayerView.tsx +35 -0
- package/src/internal/THEOplayerView.web.tsx +87 -19
- package/src/internal/cast/THEOplayerNativeAirplay.ts +22 -0
- package/src/internal/cast/THEOplayerNativeCastApi.ts +28 -0
- package/src/internal/cast/THEOplayerNativeChromecast.ts +30 -0
- package/src/internal/cast/THEOplayerWebCastApi.ts +21 -0
- package/src/internal/web/stub/CastButtonStub.tsx +7 -0
- package/android/src/main/java/com/theoplayer/PlayerConfigHelper.java +0 -70
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerPackage.java +0 -32
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.java +0 -525
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerViewManager.java +0 -127
- package/android/src/main/java/com/theoplayer/SourceHelper.java +0 -362
- package/android/src/main/java/com/theoplayer/VideoEventEmitter.java +0 -442
- package/android/src/main/java/com/theoplayer/ads/AdEventAdapter.java +0 -92
- package/android/src/main/java/com/theoplayer/ads/AdInfo.java +0 -168
- package/android/src/main/java/com/theoplayer/ads/AdsModule.java +0 -152
- package/android/src/main/java/com/theoplayer/track/QualityListAdapter.java +0 -54
- package/android/src/main/java/com/theoplayer/track/QualityListFilter.java +0 -40
- package/android/src/main/java/com/theoplayer/track/TextTrackCueEventType.java +0 -11
- package/android/src/main/java/com/theoplayer/track/TrackEventType.java +0 -11
- package/android/src/main/java/com/theoplayer/track/TrackListInfo.java +0 -212
- package/android/src/main/java/com/theoplayer/util/ViewResolver.java +0 -42
- package/ios/custom/react-native-theoplayer_custom_ios.podspec +0 -36
|
@@ -15,11 +15,16 @@ import type {
|
|
|
15
15
|
TextTrackEvent,
|
|
16
16
|
AdEvent,
|
|
17
17
|
AdsAPI,
|
|
18
|
+
MediaTrackEvent,
|
|
19
|
+
MediaTrackListEvent,
|
|
20
|
+
CastAPI,
|
|
21
|
+
CastEvent,
|
|
18
22
|
} from 'react-native-theoplayer';
|
|
19
23
|
|
|
20
24
|
import styles from './THEOplayerView.style';
|
|
21
25
|
import type { SourceDescription } from 'react-native-theoplayer';
|
|
22
26
|
import { THEOplayerNativeAdsAPI } from './ads/THEOplayerNativeAdsAPI';
|
|
27
|
+
import { THEOplayerNativeCastAPI } from './cast/THEOplayerNativeCastApi';
|
|
23
28
|
import { decodeNanInf } from './utils/TypeUtils';
|
|
24
29
|
|
|
25
30
|
interface THEOplayerRCTViewProps extends THEOplayerViewProps {
|
|
@@ -45,7 +50,10 @@ interface THEOplayerRCTViewProps extends THEOplayerViewProps {
|
|
|
45
50
|
onNativeSegmentNotFound: (event: NativeSyntheticEvent<SegmentNotFoundEvent>) => void;
|
|
46
51
|
onNativeTextTrackListEvent: (event: NativeSyntheticEvent<TextTrackListEvent>) => void;
|
|
47
52
|
onNativeTextTrackEvent: (event: NativeSyntheticEvent<TextTrackEvent>) => void;
|
|
53
|
+
onNativeMediaTrackListEvent: (event: NativeSyntheticEvent<MediaTrackListEvent>) => void;
|
|
54
|
+
onNativeMediaTrackEvent: (event: NativeSyntheticEvent<MediaTrackEvent>) => void;
|
|
48
55
|
onNativeAdEvent: (event: NativeSyntheticEvent<AdEvent>) => void;
|
|
56
|
+
onNativeCastEvent: (event: NativeSyntheticEvent<CastEvent>) => void;
|
|
49
57
|
onNativeFullscreenPlayerWillPresent?: () => void;
|
|
50
58
|
onNativeFullscreenPlayerDidPresent?: () => void;
|
|
51
59
|
onNativeFullscreenPlayerWillDismiss?: () => void;
|
|
@@ -64,6 +72,7 @@ interface THEOplayerViewNativeComponent extends THEOplayerViewComponent, HostCom
|
|
|
64
72
|
export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplayerRCTViewState> implements THEOplayerViewComponent {
|
|
65
73
|
private readonly _root: React.RefObject<THEOplayerViewNativeComponent>;
|
|
66
74
|
private readonly _adsApi: THEOplayerNativeAdsAPI;
|
|
75
|
+
private readonly _castApi: THEOplayerNativeCastAPI;
|
|
67
76
|
|
|
68
77
|
private static initialState: THEOplayerRCTViewState = {
|
|
69
78
|
isBuffering: false,
|
|
@@ -75,6 +84,7 @@ export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplaye
|
|
|
75
84
|
this._root = React.createRef();
|
|
76
85
|
this.state = THEOplayerView.initialState;
|
|
77
86
|
this._adsApi = new THEOplayerNativeAdsAPI(this);
|
|
87
|
+
this._castApi = new THEOplayerNativeCastAPI(this);
|
|
78
88
|
}
|
|
79
89
|
|
|
80
90
|
componentWillUnmount() {
|
|
@@ -106,6 +116,10 @@ export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplaye
|
|
|
106
116
|
return this._adsApi;
|
|
107
117
|
}
|
|
108
118
|
|
|
119
|
+
public get cast(): CastAPI {
|
|
120
|
+
return this._castApi;
|
|
121
|
+
}
|
|
122
|
+
|
|
109
123
|
private reset() {
|
|
110
124
|
this.setState(THEOplayerView.initialState);
|
|
111
125
|
}
|
|
@@ -260,12 +274,30 @@ export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplaye
|
|
|
260
274
|
}
|
|
261
275
|
};
|
|
262
276
|
|
|
277
|
+
private _onMediaTrackListEvent = (event: NativeSyntheticEvent<MediaTrackListEvent>) => {
|
|
278
|
+
if (this.props.onMediaTrackListEvent) {
|
|
279
|
+
this.props.onMediaTrackListEvent(event.nativeEvent);
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
private _onMediaTrackEvent = (event: NativeSyntheticEvent<MediaTrackEvent>) => {
|
|
284
|
+
if (this.props.onMediaTrackEvent) {
|
|
285
|
+
this.props.onMediaTrackEvent(event.nativeEvent);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
263
289
|
private _onAdEvent = (event: NativeSyntheticEvent<AdEvent>) => {
|
|
264
290
|
if (this.props.onAdEvent) {
|
|
265
291
|
this.props.onAdEvent(event.nativeEvent);
|
|
266
292
|
}
|
|
267
293
|
};
|
|
268
294
|
|
|
295
|
+
private _onCastEvent = (event: NativeSyntheticEvent<CastEvent>) => {
|
|
296
|
+
if (this.props.onCastEvent) {
|
|
297
|
+
this.props.onCastEvent(event.nativeEvent);
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
|
|
269
301
|
private _onFullscreenPlayerWillPresent = () => {
|
|
270
302
|
if (this.props.onFullscreenPlayerWillPresent) {
|
|
271
303
|
this.props.onFullscreenPlayerWillPresent();
|
|
@@ -327,7 +359,10 @@ export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplaye
|
|
|
327
359
|
onNativeSegmentNotFound={this._onSegmentNotFound}
|
|
328
360
|
onNativeTextTrackListEvent={this._onTextTrackListEvent}
|
|
329
361
|
onNativeTextTrackEvent={this._onTextTrackEvent}
|
|
362
|
+
onNativeMediaTrackListEvent={this._onMediaTrackListEvent}
|
|
363
|
+
onNativeMediaTrackEvent={this._onMediaTrackEvent}
|
|
330
364
|
onNativeAdEvent={this._onAdEvent}
|
|
365
|
+
onNativeCastEvent={this._onCastEvent}
|
|
331
366
|
onNativeFullscreenPlayerWillPresent={this._onFullscreenPlayerWillPresent}
|
|
332
367
|
onNativeFullscreenPlayerDidPresent={this._onFullscreenPlayerDidPresent}
|
|
333
368
|
onNativeFullscreenPlayerWillDismiss={this._onFullscreenPlayerWillDismiss}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
|
|
3
|
-
import type { AdEvent, AdsAPI, PlayerError, TextTrack, THEOplayerViewProps, TimeRange } from 'react-native-theoplayer';
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import type { AdEvent, AdsAPI, CastAPI, MediaTrack, PlayerError, TextTrack, THEOplayerViewProps, TimeRange } from 'react-native-theoplayer';
|
|
4
|
+
import {
|
|
5
|
+
AdEventNames,
|
|
6
|
+
MediaTrackEventType,
|
|
7
|
+
MediaTrackType,
|
|
8
|
+
TextTrackEventType,
|
|
9
|
+
THEOplayerViewComponent,
|
|
10
|
+
TrackListEventType,
|
|
11
|
+
} from 'react-native-theoplayer';
|
|
12
|
+
import type { Event, TextTrackCue as NativeTextTrackCue, TrackChangeEvent } from 'theoplayer';
|
|
6
13
|
|
|
7
14
|
import type {
|
|
8
15
|
AddTrackEvent,
|
|
@@ -15,6 +22,7 @@ import type {
|
|
|
15
22
|
import * as THEOplayer from 'theoplayer';
|
|
16
23
|
import { findNativeQualitiesByUid, fromNativeCue, fromNativeMediaTrack, fromNativeTextTrack } from './web/TrackUtils';
|
|
17
24
|
import { THEOplayerWebAdsAPI } from './ads/THEOplayerWebAdsAPI';
|
|
25
|
+
import { THEOplayerWebCastAPI } from './cast/THEOplayerWebCastApi';
|
|
18
26
|
|
|
19
27
|
interface THEOplayerRCTViewState {
|
|
20
28
|
isBuffering: boolean;
|
|
@@ -23,7 +31,8 @@ interface THEOplayerRCTViewState {
|
|
|
23
31
|
|
|
24
32
|
export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplayerRCTViewState> implements THEOplayerViewComponent {
|
|
25
33
|
private _player: THEOplayer.ChromelessPlayer | null = null;
|
|
26
|
-
private _adsApi: THEOplayerWebAdsAPI;
|
|
34
|
+
private readonly _adsApi: THEOplayerWebAdsAPI;
|
|
35
|
+
private readonly _castApi: THEOplayerWebCastAPI;
|
|
27
36
|
|
|
28
37
|
private static initialState: THEOplayerRCTViewState = {
|
|
29
38
|
isBuffering: false,
|
|
@@ -34,6 +43,7 @@ export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplaye
|
|
|
34
43
|
super(props);
|
|
35
44
|
this.state = THEOplayerView.initialState;
|
|
36
45
|
this._adsApi = new THEOplayerWebAdsAPI(this);
|
|
46
|
+
this._castApi = new THEOplayerWebCastAPI(this);
|
|
37
47
|
}
|
|
38
48
|
|
|
39
49
|
componentDidMount() {
|
|
@@ -79,6 +89,10 @@ export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplaye
|
|
|
79
89
|
return this._adsApi;
|
|
80
90
|
}
|
|
81
91
|
|
|
92
|
+
public get cast(): CastAPI {
|
|
93
|
+
return this._castApi;
|
|
94
|
+
}
|
|
95
|
+
|
|
82
96
|
public get nativePlayer(): THEOplayer.ChromelessPlayer | null {
|
|
83
97
|
return this._player;
|
|
84
98
|
}
|
|
@@ -206,6 +220,19 @@ export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplaye
|
|
|
206
220
|
}
|
|
207
221
|
};
|
|
208
222
|
|
|
223
|
+
private onActiveQualityChanged = (trackType: MediaTrackType, track: NativeMediaTrack) => () => {
|
|
224
|
+
const { onMediaTrackEvent } = this.props;
|
|
225
|
+
if (onMediaTrackEvent) {
|
|
226
|
+
const quality = track.activeQuality;
|
|
227
|
+
onMediaTrackEvent({
|
|
228
|
+
type: MediaTrackEventType.ActiveQualityChanged,
|
|
229
|
+
trackType,
|
|
230
|
+
trackUid: track.uid,
|
|
231
|
+
qualities: quality ? [quality] : undefined,
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
|
|
209
236
|
private addEventListeners() {
|
|
210
237
|
const player = this._player;
|
|
211
238
|
if (!player) {
|
|
@@ -369,6 +396,7 @@ export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplaye
|
|
|
369
396
|
});
|
|
370
397
|
}
|
|
371
398
|
});
|
|
399
|
+
|
|
372
400
|
player.presentation.addEventListener('presentationmodechange', (event: PresentationModeChangeEvent) => {
|
|
373
401
|
const { presentationMode } = event;
|
|
374
402
|
const { onFullscreenPlayerDidPresent, onFullscreenPlayerDidDismiss } = this.props;
|
|
@@ -382,32 +410,51 @@ export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplaye
|
|
|
382
410
|
}
|
|
383
411
|
}
|
|
384
412
|
});
|
|
413
|
+
|
|
385
414
|
player.textTracks.addEventListener('addtrack', (event: AddTrackEvent) => {
|
|
386
|
-
const { onTextTrackListEvent } = this.props;
|
|
387
415
|
const track = event.track as NativeTextTrack;
|
|
388
416
|
track.addEventListener('addcue', this.onAddTextTrackCue(track));
|
|
389
417
|
track.addEventListener('removecue', this.onRemoveTextTrackCue(track));
|
|
390
|
-
|
|
391
|
-
if (onTextTrackListEvent) {
|
|
392
|
-
onTextTrackListEvent({
|
|
393
|
-
type: TrackListEventType.AddTrack,
|
|
394
|
-
track: track as TextTrack,
|
|
395
|
-
});
|
|
396
|
-
}
|
|
418
|
+
this.dispatchTextTrackListEvent(TrackListEventType.AddTrack, track as TextTrack);
|
|
397
419
|
});
|
|
420
|
+
|
|
398
421
|
player.textTracks.addEventListener('removetrack', (event: RemoveTrackEvent) => {
|
|
399
|
-
const { onTextTrackListEvent } = this.props;
|
|
400
422
|
const track = event.track as NativeTextTrack;
|
|
401
423
|
track.removeEventListener('addcue', this.onAddTextTrackCue(track));
|
|
402
424
|
track.removeEventListener('removecue', this.onRemoveTextTrackCue(track));
|
|
425
|
+
this.dispatchTextTrackListEvent(TrackListEventType.RemoveTrack, track as NativeTextTrack as TextTrack);
|
|
426
|
+
});
|
|
403
427
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
type: TrackListEventType.RemoveTrack,
|
|
407
|
-
track: event.track as unknown as TextTrack,
|
|
408
|
-
});
|
|
409
|
-
}
|
|
428
|
+
player.textTracks.addEventListener('change', (event: TrackChangeEvent) => {
|
|
429
|
+
this.dispatchTextTrackListEvent(TrackListEventType.ChangeTrack, event.track as NativeTextTrack as TextTrack);
|
|
410
430
|
});
|
|
431
|
+
|
|
432
|
+
[MediaTrackType.Audio, MediaTrackType.Video].forEach((trackType) => {
|
|
433
|
+
const mediaTracks = trackType === MediaTrackType.Audio ? player.audioTracks : player.videoTracks;
|
|
434
|
+
mediaTracks.addEventListener('addtrack', (event: AddTrackEvent) => {
|
|
435
|
+
const track = event.track as NativeMediaTrack;
|
|
436
|
+
track.addEventListener('activequalitychanged', this.onActiveQualityChanged(trackType, track));
|
|
437
|
+
this.dispatchMediaTrackListEvent(TrackListEventType.AddTrack, trackType, track as MediaTrack);
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
[MediaTrackType.Audio, MediaTrackType.Video].forEach((trackType) => {
|
|
442
|
+
const mediaTracks = trackType === MediaTrackType.Audio ? player.audioTracks : player.videoTracks;
|
|
443
|
+
mediaTracks.addEventListener('removetrack', (event: RemoveTrackEvent) => {
|
|
444
|
+
const track = event.track as NativeMediaTrack;
|
|
445
|
+
track.removeEventListener('activequalitychanged', this.onActiveQualityChanged(trackType, track));
|
|
446
|
+
this.dispatchMediaTrackListEvent(TrackListEventType.RemoveTrack, trackType, track as MediaTrack);
|
|
447
|
+
});
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
[MediaTrackType.Audio, MediaTrackType.Video].forEach((trackType) => {
|
|
451
|
+
const mediaTracks = trackType === MediaTrackType.Audio ? player.audioTracks : player.videoTracks;
|
|
452
|
+
mediaTracks.addEventListener('change', (event: TrackChangeEvent) => {
|
|
453
|
+
const track = event.track as NativeMediaTrack;
|
|
454
|
+
this.dispatchMediaTrackListEvent(TrackListEventType.ChangeTrack, trackType, track as MediaTrack);
|
|
455
|
+
});
|
|
456
|
+
});
|
|
457
|
+
|
|
411
458
|
player.ads?.addEventListener(AdEventNames, (event) => {
|
|
412
459
|
const { onAdEvent } = this.props;
|
|
413
460
|
if (onAdEvent) {
|
|
@@ -416,6 +463,27 @@ export class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplaye
|
|
|
416
463
|
});
|
|
417
464
|
}
|
|
418
465
|
|
|
466
|
+
private dispatchTextTrackListEvent = (type: TrackListEventType, track: TextTrack) => {
|
|
467
|
+
const { onTextTrackListEvent } = this.props;
|
|
468
|
+
if (onTextTrackListEvent) {
|
|
469
|
+
onTextTrackListEvent({
|
|
470
|
+
type,
|
|
471
|
+
track,
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
private dispatchMediaTrackListEvent = (type: TrackListEventType, trackType: MediaTrackType, track: MediaTrack) => {
|
|
477
|
+
const { onMediaTrackListEvent } = this.props;
|
|
478
|
+
if (onMediaTrackListEvent) {
|
|
479
|
+
onMediaTrackListEvent({
|
|
480
|
+
type,
|
|
481
|
+
trackType,
|
|
482
|
+
track: track as MediaTrack,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
};
|
|
486
|
+
|
|
419
487
|
public render(): JSX.Element {
|
|
420
488
|
const { config } = this.props;
|
|
421
489
|
const chromeless = config?.chromeless === undefined || config?.chromeless === true;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Airplay, CastState, THEOplayerView } from 'react-native-theoplayer';
|
|
2
|
+
import { NativeModules } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export class THEOplayerNativeAirplay implements Airplay {
|
|
5
|
+
public constructor(private readonly _player: THEOplayerView) {}
|
|
6
|
+
|
|
7
|
+
casting(): Promise<boolean> {
|
|
8
|
+
return NativeModules.CastModule.airplayCasting(this._player.nativeHandle);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
state(): Promise<CastState> {
|
|
12
|
+
return NativeModules.CastModule.airplayState(this._player.nativeHandle);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
start(): void {
|
|
16
|
+
NativeModules.CastModule.airplayStart(this._player.nativeHandle);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
stop(): void {
|
|
20
|
+
NativeModules.CastModule.airplayStop(this._player.nativeHandle);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NativeModules, Platform } from 'react-native';
|
|
2
|
+
import { THEOplayerNativeChromecast } from './THEOplayerNativeChromecast';
|
|
3
|
+
import { THEOplayerNativeAirplay } from './THEOplayerNativeAirplay';
|
|
4
|
+
import type { Airplay, CastAPI, Chromecast, THEOplayerView } from 'react-native-theoplayer';
|
|
5
|
+
|
|
6
|
+
export class THEOplayerNativeCastAPI implements CastAPI {
|
|
7
|
+
private readonly _chromecast: Chromecast;
|
|
8
|
+
private readonly _airplay: Airplay | undefined;
|
|
9
|
+
|
|
10
|
+
constructor(private readonly _player: THEOplayerView) {
|
|
11
|
+
this._chromecast = new THEOplayerNativeChromecast(this._player);
|
|
12
|
+
if (Platform.OS !== 'android') {
|
|
13
|
+
this._airplay = new THEOplayerNativeAirplay(this._player);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
casting(): Promise<boolean> {
|
|
18
|
+
return NativeModules.CastModule.casting(this._player.nativeHandle);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
get chromecast(): Chromecast | undefined {
|
|
22
|
+
return this._chromecast;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
get airplay(): Airplay | undefined {
|
|
26
|
+
return this._airplay;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { CastState, Chromecast, THEOplayerView } from 'react-native-theoplayer';
|
|
2
|
+
import { NativeModules } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export class THEOplayerNativeChromecast implements Chromecast {
|
|
5
|
+
public constructor(private readonly _player: THEOplayerView) {}
|
|
6
|
+
|
|
7
|
+
casting(): Promise<boolean> {
|
|
8
|
+
return NativeModules.CastModule.chromecastCasting(this._player.nativeHandle);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
state(): Promise<CastState> {
|
|
12
|
+
return NativeModules.CastModule.chromecastState(this._player.nativeHandle);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
start(): void {
|
|
16
|
+
NativeModules.CastModule.chromecastStart(this._player.nativeHandle);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
stop(): void {
|
|
20
|
+
NativeModules.CastModule.chromecastStop(this._player.nativeHandle);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
join(): void {
|
|
24
|
+
NativeModules.CastModule.chromecastJoin(this._player.nativeHandle);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
leave(): void {
|
|
28
|
+
NativeModules.CastModule.chromecastLeave(this._player.nativeHandle);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Airplay, CastAPI, Chromecast } from 'react-native-theoplayer';
|
|
2
|
+
import type { THEOplayerView } from '../THEOplayerView.web';
|
|
3
|
+
|
|
4
|
+
export class THEOplayerWebCastAPI implements CastAPI {
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
constructor(private readonly _player: THEOplayerView) {}
|
|
7
|
+
|
|
8
|
+
casting(): Promise<boolean> {
|
|
9
|
+
return Promise.resolve(false);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
get chromecast(): Chromecast | undefined {
|
|
13
|
+
// TODO
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
get airplay(): Airplay | undefined {
|
|
18
|
+
// TODO
|
|
19
|
+
return undefined;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
package com.theoplayer;
|
|
2
|
-
|
|
3
|
-
import android.text.TextUtils;
|
|
4
|
-
|
|
5
|
-
import androidx.annotation.Nullable;
|
|
6
|
-
|
|
7
|
-
import com.facebook.react.bridge.ReadableMap;
|
|
8
|
-
import com.theoplayer.android.api.THEOplayerConfig;
|
|
9
|
-
import com.theoplayer.android.api.ads.AdPreloadType;
|
|
10
|
-
import com.theoplayer.android.api.ads.AdsConfiguration;
|
|
11
|
-
import com.theoplayer.android.api.ads.GoogleImaConfiguration;
|
|
12
|
-
|
|
13
|
-
public class PlayerConfigHelper {
|
|
14
|
-
static final private String PROP_ADS_CONFIGURATION = "ads";
|
|
15
|
-
static final private String PROP_LICENSE = "license";
|
|
16
|
-
static final private String PROP_LICENSE_URL = "licenseUrl";
|
|
17
|
-
static final private String PROP_CHROMELESS = "chromeless";
|
|
18
|
-
static final private String PROP_PRELOAD = "preload";
|
|
19
|
-
static final private String PROP_UI_ENABLED = "uiEnabled";
|
|
20
|
-
static final private String PROP_GOOGLE_IMA_CONFIGURATION = "googleImaConfiguration";
|
|
21
|
-
static final private String PROP_USE_NATIVE_IMA = "useNativeIma";
|
|
22
|
-
|
|
23
|
-
static public THEOplayerConfig fromProps(@Nullable ReadableMap configProps) {
|
|
24
|
-
THEOplayerConfig.Builder configBuilder = new THEOplayerConfig.Builder();
|
|
25
|
-
if (configProps != null) {
|
|
26
|
-
AdsConfiguration adsConfig = adsConfigurationFromProps(configProps.getMap(PROP_ADS_CONFIGURATION));
|
|
27
|
-
if (adsConfig != null) {
|
|
28
|
-
configBuilder.ads(adsConfig);
|
|
29
|
-
}
|
|
30
|
-
String license = configProps.getString(PROP_LICENSE);
|
|
31
|
-
if (license != null) {
|
|
32
|
-
configBuilder.license(license);
|
|
33
|
-
}
|
|
34
|
-
String licenseUrl = configProps.getString(PROP_LICENSE_URL);
|
|
35
|
-
if (licenseUrl != null) {
|
|
36
|
-
configBuilder.licenseUrl(licenseUrl);
|
|
37
|
-
}
|
|
38
|
-
if (configProps.hasKey(PROP_CHROMELESS)) {
|
|
39
|
-
configBuilder.chromeless(configProps.getBoolean(PROP_CHROMELESS));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return configBuilder.build();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
static private AdsConfiguration adsConfigurationFromProps(@Nullable ReadableMap configProps) {
|
|
46
|
-
if (configProps == null) {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
AdsConfiguration.Builder builder = new AdsConfiguration.Builder();
|
|
50
|
-
String preloadTypeString = configProps.getString(PROP_PRELOAD);
|
|
51
|
-
if (!TextUtils.isEmpty(preloadTypeString)) {
|
|
52
|
-
builder.preload(AdPreloadType.from(preloadTypeString));
|
|
53
|
-
}
|
|
54
|
-
builder.showCountdown(!configProps.hasKey(PROP_UI_ENABLED) || configProps.getBoolean(PROP_UI_ENABLED));
|
|
55
|
-
GoogleImaConfiguration googleImaConfiguration = googleImaConfigurationFromProps(configProps.getMap(PROP_GOOGLE_IMA_CONFIGURATION));
|
|
56
|
-
if (googleImaConfiguration != null) {
|
|
57
|
-
builder.googleImaConfiguration(googleImaConfiguration);
|
|
58
|
-
}
|
|
59
|
-
return builder.build();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
static private GoogleImaConfiguration googleImaConfigurationFromProps(@Nullable ReadableMap configProps) {
|
|
63
|
-
if (configProps == null) {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
return new GoogleImaConfiguration.Builder()
|
|
67
|
-
.useNativeIma(configProps.hasKey(PROP_USE_NATIVE_IMA) && configProps.getBoolean(PROP_USE_NATIVE_IMA))
|
|
68
|
-
.build();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
package com.theoplayer;
|
|
2
|
-
|
|
3
|
-
import androidx.annotation.NonNull;
|
|
4
|
-
|
|
5
|
-
import com.facebook.react.ReactPackage;
|
|
6
|
-
import com.facebook.react.bridge.NativeModule;
|
|
7
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
8
|
-
import com.facebook.react.uimanager.ViewManager;
|
|
9
|
-
import com.theoplayer.ads.AdsModule;
|
|
10
|
-
import com.theoplayer.drm.ContentProtectionModule;
|
|
11
|
-
|
|
12
|
-
import java.util.ArrayList;
|
|
13
|
-
import java.util.Arrays;
|
|
14
|
-
import java.util.List;
|
|
15
|
-
|
|
16
|
-
public class ReactTHEOplayerPackage implements ReactPackage {
|
|
17
|
-
|
|
18
|
-
@NonNull
|
|
19
|
-
@Override
|
|
20
|
-
public List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext) {
|
|
21
|
-
List<NativeModule> modules = new ArrayList<>();
|
|
22
|
-
modules.add(new AdsModule(reactContext));
|
|
23
|
-
modules.add(new ContentProtectionModule(reactContext));
|
|
24
|
-
return modules;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@NonNull
|
|
28
|
-
@Override
|
|
29
|
-
public List<ViewManager> createViewManagers(@NonNull ReactApplicationContext reactContext) {
|
|
30
|
-
return Arrays.<ViewManager>asList(new ReactTHEOplayerViewManager());
|
|
31
|
-
}
|
|
32
|
-
}
|