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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import { NativeSyntheticEvent, HostComponent } from 'react-native';
|
|
3
|
-
import type { DurationChangeEvent, ErrorEvent, LoadedMetadataEvent, ReadyStateChangeEvent, THEOplayerViewComponent, THEOplayerViewProps, TimeUpdateEvent, ProgressEvent, PlayerError, SegmentNotFoundEvent, TextTrackListEvent, TextTrackEvent, AdEvent, AdsAPI } from 'react-native-theoplayer';
|
|
3
|
+
import type { DurationChangeEvent, ErrorEvent, LoadedMetadataEvent, ReadyStateChangeEvent, THEOplayerViewComponent, THEOplayerViewProps, TimeUpdateEvent, ProgressEvent, PlayerError, SegmentNotFoundEvent, TextTrackListEvent, TextTrackEvent, AdEvent, AdsAPI, MediaTrackEvent, MediaTrackListEvent, CastAPI, CastEvent } from 'react-native-theoplayer';
|
|
4
4
|
import type { SourceDescription } from 'react-native-theoplayer';
|
|
5
5
|
interface THEOplayerRCTViewProps extends THEOplayerViewProps {
|
|
6
6
|
ref: React.RefObject<THEOplayerViewNativeComponent>;
|
|
@@ -24,7 +24,10 @@ interface THEOplayerRCTViewProps extends THEOplayerViewProps {
|
|
|
24
24
|
onNativeSegmentNotFound: (event: NativeSyntheticEvent<SegmentNotFoundEvent>) => void;
|
|
25
25
|
onNativeTextTrackListEvent: (event: NativeSyntheticEvent<TextTrackListEvent>) => void;
|
|
26
26
|
onNativeTextTrackEvent: (event: NativeSyntheticEvent<TextTrackEvent>) => void;
|
|
27
|
+
onNativeMediaTrackListEvent: (event: NativeSyntheticEvent<MediaTrackListEvent>) => void;
|
|
28
|
+
onNativeMediaTrackEvent: (event: NativeSyntheticEvent<MediaTrackEvent>) => void;
|
|
27
29
|
onNativeAdEvent: (event: NativeSyntheticEvent<AdEvent>) => void;
|
|
30
|
+
onNativeCastEvent: (event: NativeSyntheticEvent<CastEvent>) => void;
|
|
28
31
|
onNativeFullscreenPlayerWillPresent?: () => void;
|
|
29
32
|
onNativeFullscreenPlayerDidPresent?: () => void;
|
|
30
33
|
onNativeFullscreenPlayerWillDismiss?: () => void;
|
|
@@ -40,6 +43,7 @@ interface THEOplayerViewNativeComponent extends THEOplayerViewComponent, HostCom
|
|
|
40
43
|
export declare class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplayerRCTViewState> implements THEOplayerViewComponent {
|
|
41
44
|
private readonly _root;
|
|
42
45
|
private readonly _adsApi;
|
|
46
|
+
private readonly _castApi;
|
|
43
47
|
private static initialState;
|
|
44
48
|
constructor(props: THEOplayerRCTViewProps);
|
|
45
49
|
componentWillUnmount(): void;
|
|
@@ -47,6 +51,7 @@ export declare class THEOplayerView extends PureComponent<THEOplayerViewProps, T
|
|
|
47
51
|
seek(time: number): void;
|
|
48
52
|
get nativeHandle(): number | null;
|
|
49
53
|
get ads(): AdsAPI;
|
|
54
|
+
get cast(): CastAPI;
|
|
50
55
|
private reset;
|
|
51
56
|
private setNativeProps;
|
|
52
57
|
private maybeChangeBufferingState;
|
|
@@ -68,7 +73,10 @@ export declare class THEOplayerView extends PureComponent<THEOplayerViewProps, T
|
|
|
68
73
|
private _onSegmentNotFound;
|
|
69
74
|
private _onTextTrackListEvent;
|
|
70
75
|
private _onTextTrackEvent;
|
|
76
|
+
private _onMediaTrackListEvent;
|
|
77
|
+
private _onMediaTrackEvent;
|
|
71
78
|
private _onAdEvent;
|
|
79
|
+
private _onCastEvent;
|
|
72
80
|
private _onFullscreenPlayerWillPresent;
|
|
73
81
|
private _onFullscreenPlayerDidPresent;
|
|
74
82
|
private _onFullscreenPlayerWillDismiss;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
|
-
import type { AdsAPI, PlayerError, THEOplayerViewProps } from 'react-native-theoplayer';
|
|
2
|
+
import type { AdsAPI, CastAPI, PlayerError, THEOplayerViewProps } from 'react-native-theoplayer';
|
|
3
3
|
import { THEOplayerViewComponent } from 'react-native-theoplayer';
|
|
4
4
|
import * as THEOplayer from 'theoplayer';
|
|
5
5
|
interface THEOplayerRCTViewState {
|
|
@@ -8,20 +8,25 @@ interface THEOplayerRCTViewState {
|
|
|
8
8
|
}
|
|
9
9
|
export declare class THEOplayerView extends PureComponent<THEOplayerViewProps, THEOplayerRCTViewState> implements THEOplayerViewComponent {
|
|
10
10
|
private _player;
|
|
11
|
-
private _adsApi;
|
|
11
|
+
private readonly _adsApi;
|
|
12
|
+
private readonly _castApi;
|
|
12
13
|
private static initialState;
|
|
13
14
|
constructor(props: THEOplayerViewProps);
|
|
14
15
|
componentDidMount(): void;
|
|
15
16
|
componentWillUnmount(): void;
|
|
16
17
|
seek(time: number): void;
|
|
17
18
|
get ads(): AdsAPI;
|
|
19
|
+
get cast(): CastAPI;
|
|
18
20
|
get nativePlayer(): THEOplayer.ChromelessPlayer | null;
|
|
19
21
|
private reset;
|
|
20
22
|
componentDidUpdate(prevProps: Readonly<THEOplayerViewProps>): void;
|
|
21
23
|
private maybeChangeBufferingState;
|
|
22
24
|
private onAddTextTrackCue;
|
|
23
25
|
private onRemoveTextTrackCue;
|
|
26
|
+
private onActiveQualityChanged;
|
|
24
27
|
private addEventListeners;
|
|
28
|
+
private dispatchTextTrackListEvent;
|
|
29
|
+
private dispatchMediaTrackListEvent;
|
|
25
30
|
render(): JSX.Element;
|
|
26
31
|
}
|
|
27
32
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Airplay, CastState, THEOplayerView } from 'react-native-theoplayer';
|
|
2
|
+
export declare class THEOplayerNativeAirplay implements Airplay {
|
|
3
|
+
private readonly _player;
|
|
4
|
+
constructor(_player: THEOplayerView);
|
|
5
|
+
casting(): Promise<boolean>;
|
|
6
|
+
state(): Promise<CastState>;
|
|
7
|
+
start(): void;
|
|
8
|
+
stop(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Airplay, CastAPI, Chromecast, THEOplayerView } from 'react-native-theoplayer';
|
|
2
|
+
export declare class THEOplayerNativeCastAPI implements CastAPI {
|
|
3
|
+
private readonly _player;
|
|
4
|
+
private readonly _chromecast;
|
|
5
|
+
private readonly _airplay;
|
|
6
|
+
constructor(_player: THEOplayerView);
|
|
7
|
+
casting(): Promise<boolean>;
|
|
8
|
+
get chromecast(): Chromecast | undefined;
|
|
9
|
+
get airplay(): Airplay | undefined;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CastState, Chromecast, THEOplayerView } from 'react-native-theoplayer';
|
|
2
|
+
export declare class THEOplayerNativeChromecast implements Chromecast {
|
|
3
|
+
private readonly _player;
|
|
4
|
+
constructor(_player: THEOplayerView);
|
|
5
|
+
casting(): Promise<boolean>;
|
|
6
|
+
state(): Promise<CastState>;
|
|
7
|
+
start(): void;
|
|
8
|
+
stop(): void;
|
|
9
|
+
join(): void;
|
|
10
|
+
leave(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Airplay, CastAPI, Chromecast } from 'react-native-theoplayer';
|
|
2
|
+
import type { THEOplayerView } from '../THEOplayerView.web';
|
|
3
|
+
export declare class THEOplayerWebCastAPI implements CastAPI {
|
|
4
|
+
private readonly _player;
|
|
5
|
+
constructor(_player: THEOplayerView);
|
|
6
|
+
casting(): Promise<boolean>;
|
|
7
|
+
get chromecast(): Chromecast | undefined;
|
|
8
|
+
get airplay(): Airplay | undefined;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-theoplayer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "A THEOplayer video component for react-native.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -111,6 +111,6 @@
|
|
|
111
111
|
},
|
|
112
112
|
"dependencies": {
|
|
113
113
|
"buffer": "^6.0.3",
|
|
114
|
-
"theoplayer": "^
|
|
114
|
+
"theoplayer": "^4.6.0"
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -13,8 +13,8 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
s.platforms = { :ios => "11.0", :tvos => "12.0" }
|
|
14
14
|
s.source = { :git => "https://www.theoplayer.com/.git", :tag => "#{s.version}" }
|
|
15
15
|
|
|
16
|
-
s.source_files = "ios
|
|
17
|
-
s.resources = ['ios
|
|
16
|
+
s.source_files = "ios/*.{h,m,mm,swift}"
|
|
17
|
+
s.resources = ['ios/*.css']
|
|
18
18
|
|
|
19
19
|
s.dependency "React-Core"
|
|
20
20
|
s.dependency "THEOplayerSDK-basic"
|
|
@@ -9,11 +9,13 @@ import type {
|
|
|
9
9
|
ProgressEvent,
|
|
10
10
|
SegmentNotFoundEvent,
|
|
11
11
|
} from './event/PlayerEvent';
|
|
12
|
-
import type { TextTrackEvent, TextTrackListEvent } from './event/TrackEvent';
|
|
12
|
+
import type { MediaTrackEvent, MediaTrackListEvent, TextTrackEvent, TextTrackListEvent } from './event/TrackEvent';
|
|
13
13
|
import type { PlayerConfiguration } from './config/PlayerConfiguration';
|
|
14
14
|
import type { ABRConfiguration } from './abr/ABRConfiguration';
|
|
15
|
-
import type { AdEvent } from
|
|
16
|
-
import type { AdsAPI } from
|
|
15
|
+
import type { AdEvent } from './event/AdEvent';
|
|
16
|
+
import type { AdsAPI } from './ads/AdsAPI';
|
|
17
|
+
import type { CastAPI } from './cast/CastAPI';
|
|
18
|
+
import type { CastEvent } from './event/CastEvent';
|
|
17
19
|
|
|
18
20
|
export interface THEOplayerViewProps {
|
|
19
21
|
/**
|
|
@@ -225,10 +227,25 @@ export interface THEOplayerViewProps {
|
|
|
225
227
|
*/
|
|
226
228
|
onTextTrackEvent?: (event: TextTrackEvent) => void;
|
|
227
229
|
|
|
230
|
+
/**
|
|
231
|
+
* Invoked when a media track list event occurs.
|
|
232
|
+
*/
|
|
233
|
+
onMediaTrackListEvent?: (event: MediaTrackListEvent) => void;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* Invoked when a media track event occurs.
|
|
237
|
+
*/
|
|
238
|
+
onMediaTrackEvent?: (event: MediaTrackEvent) => void;
|
|
239
|
+
|
|
228
240
|
/**
|
|
229
241
|
* Invoked when an ad event occurs.
|
|
230
242
|
*/
|
|
231
243
|
onAdEvent?: (event: AdEvent) => void;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Invoked when a cast event occurs, either for Chromecast or Airplay.
|
|
247
|
+
*/
|
|
248
|
+
onCastEvent?: (event: CastEvent) => void;
|
|
232
249
|
}
|
|
233
250
|
|
|
234
251
|
export interface THEOplayerViewComponent {
|
|
@@ -243,4 +260,9 @@ export interface THEOplayerViewComponent {
|
|
|
243
260
|
* The API for advertisements.
|
|
244
261
|
*/
|
|
245
262
|
ads: AdsAPI;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* The API for casting devices.
|
|
266
|
+
*/
|
|
267
|
+
cast: CastAPI;
|
|
246
268
|
}
|
package/src/api/barrel.ts
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Airplay API.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
import type {CastState} from "./CastState";
|
|
7
|
+
|
|
8
|
+
export interface Airplay {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the player is connected with an airplay device.
|
|
11
|
+
*/
|
|
12
|
+
casting(): Promise<boolean>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The state of the casting process.
|
|
16
|
+
*/
|
|
17
|
+
state(): Promise<CastState>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Start a casting session with the player's source.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* <br/> - A native browser pop-up will prompt to choose an airplay device.
|
|
24
|
+
*/
|
|
25
|
+
start(): void;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Stop the active casting session.
|
|
29
|
+
*/
|
|
30
|
+
stop(): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type {Airplay} from "./Airplay";
|
|
2
|
+
import type {Chromecast} from "./Chromecast";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The API for casting.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export interface CastAPI {
|
|
10
|
+
/**
|
|
11
|
+
* Whether the player is connected with a casting device.
|
|
12
|
+
*/
|
|
13
|
+
casting(): Promise<boolean>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The Chromecast API.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* <br/> - Only available when the feature or extension `'chromecast'` is enabled.
|
|
20
|
+
*/
|
|
21
|
+
readonly chromecast?: Chromecast;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The Airplay API.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* <br/> - Only available when the feature or extension `'airplay'` is enabled.
|
|
28
|
+
*/
|
|
29
|
+
readonly airplay?: Airplay;
|
|
30
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes the configuration of the Cast integrations.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface CastConfiguration {
|
|
7
|
+
/**
|
|
8
|
+
* The Chromecast configuration.
|
|
9
|
+
*
|
|
10
|
+
* @defaultValue A {@link ChromecastConfiguration} with default values.
|
|
11
|
+
*/
|
|
12
|
+
chromecast?: ChromecastConfiguration;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The join strategy of the player.
|
|
16
|
+
*
|
|
17
|
+
* @defaultValue `'manual'`
|
|
18
|
+
*/
|
|
19
|
+
strategy?: JoinStrategy;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The join strategy, represented by a value from the following list:
|
|
24
|
+
* <br/> - `'auto'` : The player will automatically join a cast session if one exists when play is called. Otherwise it will prompt the user with all available devices.
|
|
25
|
+
* <br/> - `'manual'` : The player will take over an existing session if there is one and the cast button is clicked. Otherwise it will prompt the user with all available devices.
|
|
26
|
+
* <br/> - `'disabled'` : The player is not affected by cast sessions and is not castable.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export type JoinStrategy = 'auto' | 'manual' | 'disabled';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Describes the configuration of the Chromecast integration.
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export interface ChromecastConfiguration {
|
|
38
|
+
/**
|
|
39
|
+
* The identifier of a custom Chromecast receiver app.
|
|
40
|
+
*
|
|
41
|
+
* @defaultValue The default THEOplayer receiver app.
|
|
42
|
+
*/
|
|
43
|
+
appID?: string;
|
|
44
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The state of a casting process, represented by a value from the following list:
|
|
3
|
+
* <br/> - `'unavailable'`: No available cast devices.
|
|
4
|
+
* <br/> - `'available'`: Cast device available, but the player is not connected.
|
|
5
|
+
* <br/> - `'connecting'`: Cast device available and the player is connecting.
|
|
6
|
+
* <br/> - `'connected'`: Cast device available and the player is connected.
|
|
7
|
+
*
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export type CastState = 'unavailable' | 'available' | 'connecting' | 'connected';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Airplay API.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
import type {CastState} from "./CastState";
|
|
7
|
+
|
|
8
|
+
export interface Chromecast {
|
|
9
|
+
/**
|
|
10
|
+
* Whether the player is connected with a chromecast device.
|
|
11
|
+
*/
|
|
12
|
+
casting(): Promise<boolean>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The state of the casting process.
|
|
16
|
+
*/
|
|
17
|
+
state(): Promise<CastState>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Start a casting session with the player's source.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* <br/> - A native browser pop-up will prompt to choose a chromecast device.
|
|
24
|
+
*/
|
|
25
|
+
start(): void;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Stop the active casting session.
|
|
29
|
+
*/
|
|
30
|
+
stop(): void;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Join an active casting session.
|
|
34
|
+
*/
|
|
35
|
+
join(): void;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Leave the active casting session.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* <br/> - Does not stop the session when other devices are connected.
|
|
42
|
+
* <br/> - Use {@link stop} to fully stop the session.
|
|
43
|
+
*/
|
|
44
|
+
leave(): void;
|
|
45
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { AdsConfiguration } from
|
|
1
|
+
import type { AdsConfiguration } from '../ads/AdsConfiguration';
|
|
2
|
+
import type { CastConfiguration } from '../cast/CastConfiguration';
|
|
2
3
|
|
|
3
4
|
export interface PlayerConfiguration {
|
|
4
5
|
/**
|
|
@@ -6,6 +7,11 @@ export interface PlayerConfiguration {
|
|
|
6
7
|
*/
|
|
7
8
|
ads?: AdsConfiguration;
|
|
8
9
|
|
|
10
|
+
/**
|
|
11
|
+
* The cast configuration for the player.
|
|
12
|
+
*/
|
|
13
|
+
cast?: CastConfiguration;
|
|
14
|
+
|
|
9
15
|
/**
|
|
10
16
|
* The license for the player
|
|
11
17
|
*/
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The chromecast error code, represented by a value from the following list:
|
|
3
|
+
* <br/> - `'CANCEL'`: The operation was canceled by the user.
|
|
4
|
+
* <br/> - `'TIMEOUT'`: The operation timed out.
|
|
5
|
+
* <br/> - `'API_NOT_INITIALIZED'`: The API is not initialized.
|
|
6
|
+
* <br/> - `'INVALID_PARAMETER'`: The parameters to the operation were not valid.
|
|
7
|
+
* <br/> - `'EXTENSION_NOT_COMPATIBLE'`: The API script is not compatible with the installed Cast extension.
|
|
8
|
+
* <br/> - `'EXTENSION_MISSING'`: The Cast extension is not available.
|
|
9
|
+
* <br/> - `'RECEIVER_UNAVAILABLE'`: No receiver was compatible with the session request.
|
|
10
|
+
* <br/> - `'SESSION_ERROR'`: A session could not be created, or a session was invalid.
|
|
11
|
+
* <br/> - `'CHANNEL_ERROR'`: A channel to the receiver is not available.
|
|
12
|
+
* <br/> - `'LOAD_MEDIA_FAILED'`: Load media failed.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* <br/> - The error codes correspond to the error codes documented in the {@link https://developers.google.com/cast/docs/reference/chrome/chrome.cast.html#.ErrorCode | Chromecast API reference}.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export type ChromecastErrorCode =
|
|
20
|
+
| 'CANCEL'
|
|
21
|
+
| 'TIMEOUT'
|
|
22
|
+
| 'API_NOT_INITIALIZED'
|
|
23
|
+
| 'INVALID_PARAMETER'
|
|
24
|
+
| 'EXTENSION_NOT_COMPATIBLE'
|
|
25
|
+
| 'EXTENSION_MISSING'
|
|
26
|
+
| 'RECEIVER_UNAVAILABLE'
|
|
27
|
+
| 'SESSION_ERROR'
|
|
28
|
+
| 'CHANNEL_ERROR'
|
|
29
|
+
| 'LOAD_MEDIA_FAILED';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* An error that occurred while casting or attempting to cast to Chromecast.
|
|
33
|
+
*
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export interface ChromecastError {
|
|
37
|
+
/**
|
|
38
|
+
* The error code of the error.
|
|
39
|
+
*/
|
|
40
|
+
errorCode: ChromecastErrorCode;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The human-readable description of the error.
|
|
44
|
+
*/
|
|
45
|
+
description: string;
|
|
46
|
+
}
|
package/src/api/error/barrel.ts
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { CastState, ChromecastError } from 'react-native-theoplayer';
|
|
2
|
+
|
|
3
|
+
export const CastEventNames = [
|
|
4
|
+
/**
|
|
5
|
+
* Dispatched when the ChromeCast state was changed.
|
|
6
|
+
*/
|
|
7
|
+
'chromecaststatechange',
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Dispatched when the Airplay state was changed.
|
|
11
|
+
*/
|
|
12
|
+
'airplaystatechange',
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Dispatched when an error occurred when using Chromecast.
|
|
16
|
+
*/
|
|
17
|
+
'chromecasterror',
|
|
18
|
+
] as const;
|
|
19
|
+
|
|
20
|
+
export type CastEventType = typeof CastEventNames[number];
|
|
21
|
+
|
|
22
|
+
export interface CastEvent {
|
|
23
|
+
/**
|
|
24
|
+
* Type of ad event.
|
|
25
|
+
*/
|
|
26
|
+
readonly type: CastEventType;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ChromecastChangeEvent extends CastEvent {
|
|
30
|
+
readonly type: 'chromecaststatechange';
|
|
31
|
+
|
|
32
|
+
readonly state: CastState;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface AirplayStateChangeEvent extends CastEvent {
|
|
36
|
+
readonly type: 'airplaystatechange';
|
|
37
|
+
|
|
38
|
+
readonly state: CastState;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ChromecastErrorEvent extends CastEvent {
|
|
42
|
+
readonly type: 'chromecasterror';
|
|
43
|
+
|
|
44
|
+
readonly error: ChromecastError;
|
|
45
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TextTrack } from '../track/TextTrack';
|
|
2
2
|
import type { TextTrackCue } from '../track/TextTrackCue';
|
|
3
|
+
import type { MediaTrack } from '../track/MediaTrack';
|
|
4
|
+
import type { Quality } from '../track/Quality';
|
|
3
5
|
|
|
4
6
|
export enum TrackListEventType {
|
|
5
7
|
/**
|
|
@@ -11,14 +13,21 @@ export enum TrackListEventType {
|
|
|
11
13
|
* Dispatched when track has been removed from the track list.
|
|
12
14
|
*/
|
|
13
15
|
RemoveTrack,
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Fired when a track has been changed.
|
|
19
|
+
*/
|
|
20
|
+
ChangeTrack,
|
|
14
21
|
}
|
|
15
22
|
|
|
16
|
-
export interface
|
|
23
|
+
export interface TrackListEvent {
|
|
17
24
|
/**
|
|
18
|
-
* The type of
|
|
25
|
+
* The type of track list event.
|
|
19
26
|
*/
|
|
20
27
|
readonly type: TrackListEventType;
|
|
28
|
+
}
|
|
21
29
|
|
|
30
|
+
export interface TextTrackListEvent extends TrackListEvent {
|
|
22
31
|
/**
|
|
23
32
|
* The relevant text track.
|
|
24
33
|
*/
|
|
@@ -53,3 +62,50 @@ export interface TextTrackEvent {
|
|
|
53
62
|
*/
|
|
54
63
|
readonly cue: TextTrackCue;
|
|
55
64
|
}
|
|
65
|
+
|
|
66
|
+
export enum MediaTrackType {
|
|
67
|
+
Audio,
|
|
68
|
+
|
|
69
|
+
Video,
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface MediaTrackListEvent extends TrackListEvent {
|
|
73
|
+
/**
|
|
74
|
+
* The relevant media track type, either {@link MediaTrackType.Audio} or {@link MediaTrackType.Video}.
|
|
75
|
+
*/
|
|
76
|
+
readonly trackType: MediaTrackType;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The relevant media track.
|
|
80
|
+
*/
|
|
81
|
+
readonly track: MediaTrack;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export enum MediaTrackEventType {
|
|
85
|
+
/**
|
|
86
|
+
* Dispatched when the media track's active quality changes.
|
|
87
|
+
*/
|
|
88
|
+
ActiveQualityChanged,
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface MediaTrackEvent {
|
|
92
|
+
/**
|
|
93
|
+
* The type of media track event.
|
|
94
|
+
*/
|
|
95
|
+
readonly type: MediaTrackEventType;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The media track's type to which event belongs, either {@link MediaTrackType.Audio} or {@link MediaTrackType.Video}.
|
|
99
|
+
*/
|
|
100
|
+
readonly trackType: MediaTrackType;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The media track's uid to which event belongs.
|
|
104
|
+
*/
|
|
105
|
+
readonly trackUid: number;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The affected media track's qualities.
|
|
109
|
+
*/
|
|
110
|
+
readonly qualities?: Quality | Quality[];
|
|
111
|
+
}
|
package/src/api/event/barrel.ts
CHANGED
|
@@ -10,6 +10,7 @@ import type { DashPlaybackConfiguration } from './dash/DashPlaybackConfiguration
|
|
|
10
10
|
import type { DRMConfiguration } from './drm/DRMConfiguration';
|
|
11
11
|
import type { HlsPlaybackConfiguration } from './hls/HlsPlaybackConfiguration';
|
|
12
12
|
import type { AdDescription } from './ads/Ads';
|
|
13
|
+
import type { MetadataDescription } from './metadata/MetadataDescription';
|
|
13
14
|
import type { ServerSideAdInsertionConfiguration } from "./ads/ssai/ServerSideAdInsertionConfiguration";
|
|
14
15
|
|
|
15
16
|
export type Source = TypedSource;
|
|
@@ -79,6 +80,13 @@ export interface SourceConfiguration {
|
|
|
79
80
|
* <br/> - All sources will use the time server. Alternatively, for one source use {@link BaseSource.timeServer}.
|
|
80
81
|
*/
|
|
81
82
|
timeServer?: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Describes the metadata of a source.
|
|
86
|
+
*
|
|
87
|
+
* @public
|
|
88
|
+
*/
|
|
89
|
+
metadata?: MetadataDescription;
|
|
82
90
|
}
|
|
83
91
|
|
|
84
92
|
/**
|
package/src/api/source/barrel.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MetadataDescription';
|