react-native-theoplayer 1.0.0 → 1.1.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/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.md +54 -18
- package/android/build.gradle +90 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradlew +185 -0
- package/android/gradlew.bat +89 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/theoplayer/PlayerConfigHelper.java +30 -0
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerPackage.java +27 -0
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.java +420 -0
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerViewManager.java +114 -0
- package/android/src/main/java/com/theoplayer/SourceHelper.java +224 -0
- package/android/src/main/java/com/theoplayer/TimeUpdateRate.java +8 -0
- package/android/src/main/java/com/theoplayer/VideoEventEmitter.java +410 -0
- package/android/src/main/java/com/theoplayer/track/TextTrackCueEventType.java +11 -0
- package/android/src/main/java/com/theoplayer/track/TrackEventType.java +11 -0
- package/android/src/main/java/com/theoplayer/track/TrackListInfo.java +204 -0
- package/ios/THEOplayerRCTBridge.m +46 -0
- package/ios/THEOplayerRCTDebug.swift +16 -0
- package/ios/THEOplayerRCTMetadataAggregator.swift +169 -0
- package/ios/THEOplayerRCTView.swift +422 -0
- package/ios/THEOplayerRCTViewEventHandler.swift +493 -0
- package/ios/THEOplayerRCTViewManager.swift +23 -0
- package/ios/Theoplayer-Bridging-Header.h +5 -0
- package/ios/Theoplayer.xcodeproj/project.pbxproj +296 -0
- package/lib/commonjs/api/THEOplayerView.js +6 -0
- package/lib/commonjs/api/THEOplayerView.js.map +1 -0
- package/lib/commonjs/api/barrel.js +97 -0
- package/lib/commonjs/api/barrel.js.map +1 -0
- package/lib/commonjs/api/config/PlayerConfiguration.js +2 -0
- package/lib/commonjs/api/config/PlayerConfiguration.js.map +1 -0
- package/lib/commonjs/api/config/barrel.js +19 -0
- package/lib/commonjs/api/config/barrel.js.map +1 -0
- package/lib/commonjs/api/error/PlayerError.js +2 -0
- package/lib/commonjs/api/error/PlayerError.js.map +1 -0
- package/lib/commonjs/api/error/barrel.js +19 -0
- package/lib/commonjs/api/error/barrel.js.map +1 -0
- package/lib/commonjs/api/event/PlayerEvent.js +6 -0
- package/lib/commonjs/api/event/PlayerEvent.js.map +1 -0
- package/lib/commonjs/api/event/TrackEvent.js +22 -0
- package/lib/commonjs/api/event/TrackEvent.js.map +1 -0
- package/lib/commonjs/api/event/barrel.js +32 -0
- package/lib/commonjs/api/event/barrel.js.map +1 -0
- package/lib/commonjs/api/source/SourceDescription.js +6 -0
- package/lib/commonjs/api/source/SourceDescription.js.map +1 -0
- package/lib/commonjs/api/source/ads/Ads.js +2 -0
- package/lib/commonjs/api/source/ads/Ads.js.map +1 -0
- package/lib/commonjs/api/source/barrel.js +58 -0
- package/lib/commonjs/api/source/barrel.js.map +1 -0
- package/lib/commonjs/api/source/dash/DashPlaybackConfiguration.js +2 -0
- package/lib/commonjs/api/source/dash/DashPlaybackConfiguration.js.map +1 -0
- package/lib/commonjs/api/source/dash/barrel.js +19 -0
- package/lib/commonjs/api/source/dash/barrel.js.map +1 -0
- package/lib/commonjs/api/source/drm/DRMConfiguration.js +2 -0
- package/lib/commonjs/api/source/drm/DRMConfiguration.js.map +1 -0
- package/lib/commonjs/api/source/drm/barrel.js +19 -0
- package/lib/commonjs/api/source/drm/barrel.js.map +1 -0
- package/lib/commonjs/api/source/hls/HlsPlaybackConfiguration.js +2 -0
- package/lib/commonjs/api/source/hls/HlsPlaybackConfiguration.js.map +1 -0
- package/lib/commonjs/api/source/hls/barrel.js +19 -0
- package/lib/commonjs/api/source/hls/barrel.js.map +1 -0
- package/lib/commonjs/api/timeranges/TimeRange.js +2 -0
- package/lib/commonjs/api/timeranges/TimeRange.js.map +1 -0
- package/lib/commonjs/api/timeranges/barrel.js +19 -0
- package/lib/commonjs/api/timeranges/barrel.js.map +1 -0
- package/lib/commonjs/api/track/MediaTrack.js +6 -0
- package/lib/commonjs/api/track/MediaTrack.js.map +1 -0
- package/lib/commonjs/api/track/Quality.js +2 -0
- package/lib/commonjs/api/track/Quality.js.map +1 -0
- package/lib/commonjs/api/track/TextTrack.js +72 -0
- package/lib/commonjs/api/track/TextTrack.js.map +1 -0
- package/lib/commonjs/api/track/TextTrackCue.js +2 -0
- package/lib/commonjs/api/track/TextTrackCue.js.map +1 -0
- package/lib/commonjs/api/track/Track.js +2 -0
- package/lib/commonjs/api/track/Track.js.map +1 -0
- package/lib/commonjs/api/track/barrel.js +71 -0
- package/lib/commonjs/api/track/barrel.js.map +1 -0
- package/lib/commonjs/index.js +31 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/internal/THEOplayerView.js +274 -0
- package/lib/commonjs/internal/THEOplayerView.js.map +1 -0
- package/lib/commonjs/internal/THEOplayerView.style.js +22 -0
- package/lib/commonjs/internal/THEOplayerView.style.js.map +1 -0
- package/lib/commonjs/internal/THEOplayerView.web.js +512 -0
- package/lib/commonjs/internal/THEOplayerView.web.js.map +1 -0
- package/lib/commonjs/internal/web/TrackUtils.js +68 -0
- package/lib/commonjs/internal/web/TrackUtils.js.map +1 -0
- package/lib/module/api/THEOplayerView.js +2 -0
- package/lib/module/api/THEOplayerView.js.map +1 -0
- package/lib/module/api/barrel.js +8 -0
- package/lib/module/api/barrel.js.map +1 -0
- package/lib/module/api/config/PlayerConfiguration.js +2 -0
- package/lib/module/api/config/PlayerConfiguration.js.map +1 -0
- package/lib/module/api/config/barrel.js +2 -0
- package/lib/module/api/config/barrel.js.map +1 -0
- package/lib/module/api/error/PlayerError.js +2 -0
- package/lib/module/api/error/PlayerError.js.map +1 -0
- package/lib/module/api/error/barrel.js +2 -0
- package/lib/module/api/error/barrel.js.map +1 -0
- package/lib/module/api/event/PlayerEvent.js +2 -0
- package/lib/module/api/event/PlayerEvent.js.map +1 -0
- package/lib/module/api/event/TrackEvent.js +14 -0
- package/lib/module/api/event/TrackEvent.js.map +1 -0
- package/lib/module/api/event/barrel.js +3 -0
- package/lib/module/api/event/barrel.js.map +1 -0
- package/lib/module/api/source/SourceDescription.js +2 -0
- package/lib/module/api/source/SourceDescription.js.map +1 -0
- package/lib/module/api/source/ads/Ads.js +2 -0
- package/lib/module/api/source/ads/Ads.js.map +1 -0
- package/lib/module/api/source/barrel.js +5 -0
- package/lib/module/api/source/barrel.js.map +1 -0
- package/lib/module/api/source/dash/DashPlaybackConfiguration.js +2 -0
- package/lib/module/api/source/dash/DashPlaybackConfiguration.js.map +1 -0
- package/lib/module/api/source/dash/barrel.js +2 -0
- package/lib/module/api/source/dash/barrel.js.map +1 -0
- package/lib/module/api/source/drm/DRMConfiguration.js +2 -0
- package/lib/module/api/source/drm/DRMConfiguration.js.map +1 -0
- package/lib/module/api/source/drm/barrel.js +2 -0
- package/lib/module/api/source/drm/barrel.js.map +1 -0
- package/lib/module/api/source/hls/HlsPlaybackConfiguration.js +2 -0
- package/lib/module/api/source/hls/HlsPlaybackConfiguration.js.map +1 -0
- package/lib/module/api/source/hls/barrel.js +2 -0
- package/lib/module/api/source/hls/barrel.js.map +1 -0
- package/lib/module/api/timeranges/TimeRange.js +2 -0
- package/lib/module/api/timeranges/TimeRange.js.map +1 -0
- package/lib/module/api/timeranges/barrel.js +2 -0
- package/lib/module/api/timeranges/barrel.js.map +1 -0
- package/lib/module/api/track/MediaTrack.js +2 -0
- package/lib/module/api/track/MediaTrack.js.map +1 -0
- package/lib/module/api/track/Quality.js +2 -0
- package/lib/module/api/track/Quality.js.map +1 -0
- package/lib/module/api/track/TextTrack.js +47 -0
- package/lib/module/api/track/TextTrack.js.map +1 -0
- package/lib/module/api/track/TextTrackCue.js +2 -0
- package/lib/module/api/track/TextTrackCue.js.map +1 -0
- package/lib/module/api/track/Track.js +2 -0
- package/lib/module/api/track/Track.js.map +1 -0
- package/lib/module/api/track/barrel.js +6 -0
- package/lib/module/api/track/barrel.js.map +1 -0
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/internal/THEOplayerView.js +256 -0
- package/lib/module/internal/THEOplayerView.js.map +1 -0
- package/lib/module/internal/THEOplayerView.style.js +12 -0
- package/lib/module/internal/THEOplayerView.style.js.map +1 -0
- package/lib/module/internal/THEOplayerView.web.js +495 -0
- package/lib/module/internal/THEOplayerView.web.js.map +1 -0
- package/lib/module/internal/web/TrackUtils.js +57 -0
- package/lib/module/internal/web/TrackUtils.js.map +1 -0
- package/lib/typescript/babel.config.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/THEOplayerView.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/config/PlayerConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/config/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/error/PlayerError.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/error/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/event/PlayerEvent.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/event/TrackEvent.d.ts +5 -0
- package/lib/typescript/lib/commonjs/api/event/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/SourceDescription.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/ads/Ads.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/source/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/dash/DashPlaybackConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/source/dash/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/drm/DRMConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/source/drm/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/source/hls/HlsPlaybackConfiguration.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/source/hls/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/timeranges/TimeRange.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/timeranges/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/track/MediaTrack.d.ts +1 -0
- package/lib/typescript/lib/commonjs/api/track/Quality.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/track/TextTrack.d.ts +21 -0
- package/lib/typescript/lib/commonjs/api/track/TextTrackCue.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/track/Track.d.ts +0 -0
- package/lib/typescript/lib/commonjs/api/track/barrel.d.ts +1 -0
- package/lib/typescript/lib/commonjs/index.d.ts +3 -0
- package/lib/typescript/lib/commonjs/internal/THEOplayerView.d.ts +14 -0
- package/lib/typescript/lib/commonjs/internal/THEOplayerView.style.d.ts +12 -0
- package/lib/typescript/lib/commonjs/internal/THEOplayerView.web.d.ts +17 -0
- package/lib/typescript/lib/commonjs/internal/web/TrackUtils.d.ts +30 -0
- package/lib/typescript/lib/module/api/THEOplayerView.d.ts +1 -0
- package/lib/typescript/lib/module/api/barrel.d.ts +7 -0
- package/lib/typescript/lib/module/api/config/PlayerConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/config/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/api/error/PlayerError.d.ts +0 -0
- package/lib/typescript/lib/module/api/error/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/api/event/PlayerEvent.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 -0
- package/lib/typescript/lib/module/api/source/SourceDescription.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/ads/Ads.d.ts +0 -0
- package/lib/typescript/lib/module/api/source/barrel.d.ts +4 -0
- package/lib/typescript/lib/module/api/source/dash/DashPlaybackConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/source/dash/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/drm/DRMConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/source/drm/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/api/source/hls/HlsPlaybackConfiguration.d.ts +0 -0
- package/lib/typescript/lib/module/api/source/hls/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/api/timeranges/TimeRange.d.ts +0 -0
- package/lib/typescript/lib/module/api/timeranges/barrel.d.ts +1 -0
- package/lib/typescript/lib/module/api/track/MediaTrack.d.ts +1 -0
- package/lib/typescript/lib/module/api/track/Quality.d.ts +0 -0
- package/lib/typescript/lib/module/api/track/TextTrack.d.ts +20 -0
- package/lib/typescript/lib/module/api/track/TextTrackCue.d.ts +0 -0
- package/lib/typescript/lib/module/api/track/Track.d.ts +0 -0
- package/lib/typescript/lib/module/api/track/barrel.d.ts +2 -0
- package/lib/typescript/lib/module/index.d.ts +2 -0
- package/lib/typescript/lib/module/internal/THEOplayerView.d.ts +9 -0
- package/lib/typescript/lib/module/internal/THEOplayerView.style.d.ts +11 -0
- package/lib/typescript/lib/module/internal/THEOplayerView.web.d.ts +10 -0
- package/lib/typescript/lib/module/internal/web/TrackUtils.d.ts +29 -0
- package/lib/typescript/src/api/THEOplayerView.d.ts +178 -0
- package/lib/typescript/src/api/barrel.d.ts +7 -0
- package/lib/typescript/src/api/config/PlayerConfiguration.d.ts +14 -0
- package/lib/typescript/src/api/config/barrel.d.ts +1 -0
- package/lib/typescript/src/api/error/PlayerError.d.ts +4 -0
- package/lib/typescript/src/api/error/barrel.d.ts +1 -0
- package/lib/typescript/src/api/event/PlayerEvent.d.ts +56 -0
- package/lib/typescript/src/api/event/TrackEvent.d.ts +46 -0
- package/lib/typescript/src/api/event/barrel.d.ts +2 -0
- package/lib/typescript/src/api/source/SourceDescription.d.ts +268 -0
- package/lib/typescript/src/api/source/ads/Ads.d.ts +94 -0
- package/lib/typescript/src/api/source/barrel.d.ts +4 -0
- package/lib/typescript/src/api/source/dash/DashPlaybackConfiguration.d.ts +44 -0
- package/lib/typescript/src/api/source/dash/barrel.d.ts +1 -0
- package/lib/typescript/src/api/source/drm/DRMConfiguration.d.ts +262 -0
- package/lib/typescript/src/api/source/drm/barrel.d.ts +1 -0
- package/lib/typescript/src/api/source/hls/HlsPlaybackConfiguration.d.ts +37 -0
- package/lib/typescript/src/api/source/hls/barrel.d.ts +1 -0
- package/lib/typescript/src/api/timeranges/TimeRange.d.ts +4 -0
- package/lib/typescript/src/api/timeranges/barrel.d.ts +1 -0
- package/lib/typescript/src/api/track/MediaTrack.d.ts +55 -0
- package/lib/typescript/src/api/track/Quality.d.ts +79 -0
- package/lib/typescript/src/api/track/TextTrack.d.ts +86 -0
- package/lib/typescript/src/api/track/TextTrackCue.d.ts +38 -0
- package/lib/typescript/src/api/track/Track.d.ts +43 -0
- package/lib/typescript/src/api/track/barrel.d.ts +5 -0
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/internal/THEOplayerView.d.ts +71 -0
- package/lib/typescript/src/internal/THEOplayerView.style.d.ts +11 -0
- package/lib/typescript/src/internal/THEOplayerView.web.d.ts +22 -0
- package/lib/typescript/src/internal/web/TrackUtils.d.ts +5 -0
- package/package.json +115 -9
- package/react-native-theoplayer.podspec +20 -0
- package/src/api/THEOplayerView.ts +221 -0
- package/src/api/barrel.ts +7 -0
- package/src/api/config/PlayerConfiguration.ts +16 -0
- package/src/api/config/barrel.ts +1 -0
- package/src/api/error/PlayerError.ts +4 -0
- package/src/api/error/barrel.ts +1 -0
- package/src/api/event/PlayerEvent.ts +66 -0
- package/src/api/event/TrackEvent.ts +55 -0
- package/src/api/event/barrel.ts +2 -0
- package/src/api/source/SourceDescription.ts +292 -0
- package/src/api/source/ads/Ads.ts +101 -0
- package/src/api/source/barrel.ts +4 -0
- package/src/api/source/dash/DashPlaybackConfiguration.ts +45 -0
- package/src/api/source/dash/barrel.ts +1 -0
- package/src/api/source/drm/DRMConfiguration.ts +287 -0
- package/src/api/source/drm/barrel.ts +1 -0
- package/src/api/source/hls/HlsPlaybackConfiguration.ts +38 -0
- package/src/api/source/hls/barrel.ts +1 -0
- package/src/api/timeranges/TimeRange.ts +5 -0
- package/src/api/timeranges/barrel.ts +1 -0
- package/src/api/track/MediaTrack.ts +65 -0
- package/src/api/track/Quality.ts +91 -0
- package/src/api/track/TextTrack.ts +133 -0
- package/src/api/track/TextTrackCue.ts +42 -0
- package/src/api/track/Track.ts +47 -0
- package/src/api/track/barrel.ts +5 -0
- package/src/index.tsx +2 -0
- package/src/internal/THEOplayerView.style.ts +12 -0
- package/src/internal/THEOplayerView.tsx +301 -0
- package/src/internal/THEOplayerView.web.tsx +399 -0
- package/src/internal/web/TrackUtils.ts +44 -0
- package/.gitattributes +0 -1
- package/index.js +0 -5
- package/ios/IOSNativeToast.h +0 -18
- package/ios/IOSNativeToast.m +0 -49
- package/ios/RNTheoplayer.h +0 -11
- package/ios/RNTheoplayer.m +0 -15
- package/ios/RNTheoplayer.podspec +0 -23
- package/ios/RNTheoplayer.xcodeproj/project.pbxproj +0 -417
- package/ios/RNTheoplayer.xcworkspace/contents.xcworkspacedata +0 -9
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import type { SourceDescription } from './source/SourceDescription';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type {
|
|
4
|
+
DurationChangeEvent,
|
|
5
|
+
ErrorEvent,
|
|
6
|
+
LoadedMetadataEvent,
|
|
7
|
+
ReadyStateChangeEvent,
|
|
8
|
+
TimeUpdateEvent,
|
|
9
|
+
ProgressEvent,
|
|
10
|
+
SegmentNotFoundEvent,
|
|
11
|
+
} from './event/PlayerEvent';
|
|
12
|
+
import type { TextTrackEvent, TextTrackListEvent } from './event/TrackEvent';
|
|
13
|
+
import type { HostComponent } from 'react-native';
|
|
14
|
+
import type { PlayerConfiguration } from './config/PlayerConfiguration';
|
|
15
|
+
|
|
16
|
+
export interface THEOplayerViewProps {
|
|
17
|
+
/**
|
|
18
|
+
* The player configuration with THEOplayer license.
|
|
19
|
+
*/
|
|
20
|
+
config?: PlayerConfiguration;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* A source description that determines the current media resource.
|
|
24
|
+
*/
|
|
25
|
+
source: SourceDescription;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Used to set the player's paused state.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* <br/> - If paused is initially set to `true`, play-out will start once the source is set.
|
|
32
|
+
*/
|
|
33
|
+
paused?: boolean;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Used to set the playback rate of the media.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* <br/> - `playbackRate = 0.70` will slow down the playback rate of the media by 30%.
|
|
40
|
+
* <br/> - `playbackRate = 1.25` will speed up the playback rate of the media by 25%.
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* <br/> - Playback rate is represented by a number where `1` is default playback speed.
|
|
44
|
+
* <br/> - Playback rate must be a positive number.
|
|
45
|
+
* <br/> - It is recommended that you limit the range to between 0.5 and 4.
|
|
46
|
+
*/
|
|
47
|
+
playbackRate?: number;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Used to set the volume of the audio.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* <br/> - Volume is represented by a floating point number between `0.0` and `1.0`.
|
|
54
|
+
*/
|
|
55
|
+
volume?: number;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Determines whether audio is muted.
|
|
59
|
+
*/
|
|
60
|
+
muted?: boolean;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Determines whether the player is currently playing in fullscreen.
|
|
64
|
+
*/
|
|
65
|
+
fullscreen?: boolean;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Used to set the current selected text track by passing its `uid`, or `null` to select none.
|
|
69
|
+
*/
|
|
70
|
+
selectedTextTrack?: number | null;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Used to set the current selected video track by passing its `uid`, or `null` to select none.
|
|
74
|
+
*/
|
|
75
|
+
selectedVideoTrack?: number | null;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Used to set the current selected audio track by passing its `uid`, or `null` to select none.
|
|
79
|
+
*/
|
|
80
|
+
selectedAudioTrack?: number | null;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The style applied to the player view.
|
|
84
|
+
*/
|
|
85
|
+
style?: StyleProp<ViewStyle>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Invoked before the player goes to fullscreen.
|
|
89
|
+
*/
|
|
90
|
+
onFullscreenPlayerWillPresent?: () => void;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Invoked after the player went to fullscreen.
|
|
94
|
+
*/
|
|
95
|
+
onFullscreenPlayerDidPresent?: () => void;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Invoked before the player returns from fullscreen.
|
|
99
|
+
*/
|
|
100
|
+
onFullscreenPlayerWillDismiss?: () => void;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Invoked after the player returned from fullscreen.
|
|
104
|
+
*/
|
|
105
|
+
onFullscreenPlayerDidDismiss?: () => void;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Invoked when the player's buffering state has changed.
|
|
109
|
+
*
|
|
110
|
+
* @remarks
|
|
111
|
+
* <br/> - The `isBuffering` value is typically coupled to showing/hiding a loading indicator.
|
|
112
|
+
*
|
|
113
|
+
* @param isBuffering A value that indicates whether the player is buffering.
|
|
114
|
+
*/
|
|
115
|
+
onBufferingStateChange?: (isBuffering: boolean) => void;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Invoked when the player receives a new source description.
|
|
119
|
+
*/
|
|
120
|
+
onSourceChange?: () => void;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Invoked when the player starts loading the manifest.
|
|
124
|
+
*/
|
|
125
|
+
onLoadStart?: () => void;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Invoked when the player has determined the duration and dimensions of the
|
|
129
|
+
* media resource, and the text and media tracks are ready.
|
|
130
|
+
*/
|
|
131
|
+
onLoadedMetadata?: (event: LoadedMetadataEvent) => void;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Invoked when the player can render the media data at the current playback position for the first time.
|
|
135
|
+
*/
|
|
136
|
+
onLoadedData?: () => void;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Invoked when the player's readyState has changed.
|
|
140
|
+
*/
|
|
141
|
+
onReadyStateChange?: (event: ReadyStateChangeEvent) => void;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Invoked when an error occurs.
|
|
145
|
+
*/
|
|
146
|
+
onError?: (event: ErrorEvent) => void;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Invoked each time the player has loaded media data.
|
|
150
|
+
*/
|
|
151
|
+
onProgress?: (event: ProgressEvent) => void;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Invoked when the player's internal paused state changes to `false`.
|
|
155
|
+
*/
|
|
156
|
+
onPlay?: () => void;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Invoked when playback is ready to start after having been paused or delayed due to
|
|
160
|
+
* lack of media data.
|
|
161
|
+
*/
|
|
162
|
+
onPlaying?: () => void;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Invoked when the player's internal paused state changes to `true`.
|
|
166
|
+
*/
|
|
167
|
+
onPause?: () => void;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Invoked when a seek operation starts and the player is seeking a new position.
|
|
171
|
+
*/
|
|
172
|
+
onSeeking?: () => void;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Invoked when a seek operation completed and the current playback position has changed
|
|
176
|
+
*/
|
|
177
|
+
onSeeked?: () => void;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Invoked when playback has stopped because the end of the media was reached or because
|
|
181
|
+
* no further data is available.
|
|
182
|
+
*/
|
|
183
|
+
onEnded?: () => void;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Invoked when the current playback position changed.
|
|
187
|
+
*/
|
|
188
|
+
onTimeUpdate?: (event: TimeUpdateEvent) => void;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Invoked when the player's duration attribute has been updated.
|
|
192
|
+
*/
|
|
193
|
+
onDurationChange?: (event: DurationChangeEvent) => void;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Invoked when a segment can not be found.
|
|
197
|
+
*
|
|
198
|
+
* @remarks
|
|
199
|
+
* <br/> - Only dispatched on DASH streams.
|
|
200
|
+
*/
|
|
201
|
+
onSegmentNotFound?: (event: SegmentNotFoundEvent) => void;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Invoked when a text track list event occurs.
|
|
205
|
+
*/
|
|
206
|
+
onTextTrackListEvent?: (event: TextTrackListEvent) => void;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Invoked when a text track event occurs.
|
|
210
|
+
*/
|
|
211
|
+
onTextTrackEvent?: (event: TextTrackEvent) => void;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface THEOplayerViewComponent extends HostComponent<THEOplayerViewProps> {
|
|
215
|
+
/**
|
|
216
|
+
* Seek to a new position.
|
|
217
|
+
*
|
|
218
|
+
* @param seekTime - new time, in milliseconds.
|
|
219
|
+
*/
|
|
220
|
+
seek: (seekTime: number) => void;
|
|
221
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface PlayerConfiguration {
|
|
2
|
+
/**
|
|
3
|
+
* The license for the player
|
|
4
|
+
*/
|
|
5
|
+
readonly license?: string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The url to fetch the license for the player
|
|
9
|
+
*/
|
|
10
|
+
readonly licenseUrl?: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Sets whether the native player is chromeless (without UI).
|
|
14
|
+
*/
|
|
15
|
+
readonly chromeless?: boolean;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PlayerConfiguration';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PlayerError';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { MediaTrack, PlayerError, TextTrack } from 'react-native-theoplayer';
|
|
2
|
+
import type { TimeRange } from '../timeranges/TimeRange';
|
|
3
|
+
|
|
4
|
+
export interface ErrorEvent {
|
|
5
|
+
error: PlayerError;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface LoadedMetadataEvent {
|
|
9
|
+
textTracks: TextTrack[];
|
|
10
|
+
audioTracks: MediaTrack[];
|
|
11
|
+
videoTracks: MediaTrack[];
|
|
12
|
+
duration: number;
|
|
13
|
+
selectedTextTrack: number | undefined;
|
|
14
|
+
selectedVideoTrack: number | undefined;
|
|
15
|
+
selectedAudioTrack: number | undefined;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface TimeUpdateEvent {
|
|
19
|
+
/**
|
|
20
|
+
* The player's current time, in msecs.
|
|
21
|
+
*/
|
|
22
|
+
readonly currentTime: number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The player's current program date time, in msecs.
|
|
26
|
+
*/
|
|
27
|
+
readonly currentProgramDateTime?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface DurationChangeEvent {
|
|
31
|
+
/**
|
|
32
|
+
* The player's new duration, in msecs.
|
|
33
|
+
*/
|
|
34
|
+
readonly duration: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ReadyStateChangeEvent {
|
|
38
|
+
/**
|
|
39
|
+
* The player's new ready state.
|
|
40
|
+
*/
|
|
41
|
+
readonly readyState: number;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ProgressEvent {
|
|
45
|
+
/**
|
|
46
|
+
* The ranges of the media resource that are seekable by the player.
|
|
47
|
+
*/
|
|
48
|
+
readonly seekable: TimeRange[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface SegmentNotFoundEvent {
|
|
52
|
+
/**
|
|
53
|
+
* Start time of the segment.
|
|
54
|
+
*/
|
|
55
|
+
readonly segmentStartTime: number;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Descriptive error message.
|
|
59
|
+
*/
|
|
60
|
+
readonly error: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Number of times the segment was retried.
|
|
64
|
+
*/
|
|
65
|
+
readonly retryCount: number;
|
|
66
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { TextTrack } from '../track/TextTrack';
|
|
2
|
+
import type { TextTrackCue } from '../track/TextTrackCue';
|
|
3
|
+
|
|
4
|
+
export enum TrackListEventType {
|
|
5
|
+
/**
|
|
6
|
+
* Dispatched when track has been added to the track list.
|
|
7
|
+
*/
|
|
8
|
+
AddTrack,
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Dispatched when track has been removed from the track list.
|
|
12
|
+
*/
|
|
13
|
+
RemoveTrack,
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface TextTrackListEvent {
|
|
17
|
+
/**
|
|
18
|
+
* The type of text track list event.
|
|
19
|
+
*/
|
|
20
|
+
readonly type: TrackListEventType;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The relevant text track.
|
|
24
|
+
*/
|
|
25
|
+
readonly track: TextTrack;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export enum TextTrackEventType {
|
|
29
|
+
/**
|
|
30
|
+
* Dispatched when cue has been added to the text track.
|
|
31
|
+
*/
|
|
32
|
+
AddCue,
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Dispatched when cue has been removed from the text track.
|
|
36
|
+
*/
|
|
37
|
+
RemoveCue,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface TextTrackEvent {
|
|
41
|
+
/**
|
|
42
|
+
* The type of text track event.
|
|
43
|
+
*/
|
|
44
|
+
readonly type: TextTrackEventType;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The text track's uid to which this cue belongs.
|
|
48
|
+
*/
|
|
49
|
+
readonly trackUid: number;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The text track's cue.
|
|
53
|
+
*/
|
|
54
|
+
readonly cue: TextTrackCue;
|
|
55
|
+
}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a media resource.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* <br/> - Can be a string value representing the URL of a media resource, a {@link TypedSource}.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
import type { DashPlaybackConfiguration } from './dash/DashPlaybackConfiguration';
|
|
10
|
+
import type { DRMConfiguration } from './drm/DRMConfiguration';
|
|
11
|
+
import type { HlsPlaybackConfiguration } from './hls/HlsPlaybackConfiguration';
|
|
12
|
+
import type { AdDescription } from './ads/Ads';
|
|
13
|
+
|
|
14
|
+
export type Source = TypedSource;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* A media resource or list of media resources.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* <br/> - The order of sources when using a list determines their priority when attempting playback.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export type Sources = Source | Source[];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The cross-origin setting of a source, represented by a value from the following list:
|
|
28
|
+
* <br/> - `'anonymous'`: CORS requests will have the credentials flag set to 'same-origin'.
|
|
29
|
+
* <br/> - `'use-credentials'`: CORS requests will have the credentials flag set to 'include'.
|
|
30
|
+
* <br/> - `''`: Setting the empty string is the same as `'anonymous'`
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* <br/> - See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes | The crossorigin attribute: Requesting CORS access to content}
|
|
34
|
+
*
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
37
|
+
export type CrossOriginSetting = '' | 'anonymous' | 'use-credentials';
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Describes the configuration of a player's source.
|
|
41
|
+
*
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
export interface SourceConfiguration {
|
|
45
|
+
/**
|
|
46
|
+
* List of {@link AdDescription}s to be queued for playback.
|
|
47
|
+
*/
|
|
48
|
+
ads?: AdDescription[];
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Content protection configuration.
|
|
52
|
+
*/
|
|
53
|
+
contentProtection?: DRMConfiguration;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The poster of the media source.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* <br/> - An empty string (`''`) clears the current poster.
|
|
60
|
+
* <br/> - This poster has priority over {@link ChromelessPlayer.poster}.
|
|
61
|
+
*/
|
|
62
|
+
poster?: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* List of text tracks to be side-loaded with the media source.
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
* <br/> - A source change will reset side-loaded text tracks.
|
|
69
|
+
*/
|
|
70
|
+
textTracks?: TextTrackDescription[];
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The URL of a time server used by the player to synchronise the time in DASH sources.
|
|
74
|
+
*
|
|
75
|
+
* @remarks
|
|
76
|
+
* <br/> - The time server should return time in ISO-8601 format.
|
|
77
|
+
* <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.
|
|
78
|
+
* <br/> - All sources will use the time server. Alternatively, for one source use {@link BaseSource.timeServer}.
|
|
79
|
+
*/
|
|
80
|
+
timeServer?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Describes the configuration of a player's source.
|
|
85
|
+
*
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
export interface SourceDescription extends SourceConfiguration {
|
|
89
|
+
/**
|
|
90
|
+
* One or more media resources for playback.
|
|
91
|
+
*
|
|
92
|
+
* @remarks
|
|
93
|
+
* <br/> - Multiple media sources should be used to increase platform compatibility. See examples below for important use cases.
|
|
94
|
+
* <br/> - The player will try each source in the provided order.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* In this example, the player will first try to play the DASH source.
|
|
98
|
+
* This might fail if the browser does not support the {@link https://www.widevine.com/ | Widevine} or {@link https://www.microsoft.com/playready/ | PlayReady} CDM, for example on Safari.
|
|
99
|
+
* In that case, the player will try to play the HLS source instead.
|
|
100
|
+
*
|
|
101
|
+
* ```
|
|
102
|
+
* [{
|
|
103
|
+
* src: 'dash-source-with-drm.mpd'
|
|
104
|
+
* contentProtection: {
|
|
105
|
+
* widevine: {
|
|
106
|
+
* licenseAcquisitionURL: 'https://license.company.com/wv'
|
|
107
|
+
* },
|
|
108
|
+
* playready: {
|
|
109
|
+
* licenseAcquisitionURL: 'https://license.company.com/pr'
|
|
110
|
+
* }
|
|
111
|
+
* }
|
|
112
|
+
* },{
|
|
113
|
+
* src: 'hls-source-with-drm.m3u8',
|
|
114
|
+
* contentProtection: {
|
|
115
|
+
* fairplay: {
|
|
116
|
+
* certificateURL: 'https://license.company.com/fp'
|
|
117
|
+
* }
|
|
118
|
+
* }
|
|
119
|
+
* }]
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* In this example, the player will first try to play the DASH source.
|
|
124
|
+
* This might fail if the browser does not support the {@link https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API | Media Source Extensions API}.
|
|
125
|
+
* In that case, the player will try to play the MP4 source instead, though without features such as adaptive bitrate switching.
|
|
126
|
+
*
|
|
127
|
+
* ```
|
|
128
|
+
* [{
|
|
129
|
+
* src: 'source.mpd'
|
|
130
|
+
* },{
|
|
131
|
+
* src: 'source.mp4'
|
|
132
|
+
* }]
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
sources?: Sources;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Describes the configuration of a side-loaded text track.
|
|
140
|
+
*
|
|
141
|
+
* @public
|
|
142
|
+
*/
|
|
143
|
+
export interface TextTrackDescription {
|
|
144
|
+
/**
|
|
145
|
+
* Whether the text track should be enabled by default.
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* <br/> - Only one text track per {@link TextTrack.kind} may be marked as default.
|
|
149
|
+
*
|
|
150
|
+
* @defaultValue `false`
|
|
151
|
+
*/
|
|
152
|
+
default?: boolean;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* The kind of the text track, represented by a value from the following list:
|
|
156
|
+
* <br/> - `'subtitles'`: The track provides subtitles, used to display subtitles in a video.
|
|
157
|
+
* <br/> - `'captions'`: The track provides a translation of dialogue and sound effects (suitable for users with a hearing impairment).
|
|
158
|
+
* <br/> - `'descriptions'`: The track provides a textual description of the video (suitable for users with a vision impairment).
|
|
159
|
+
* <br/> - `'chapters'`: The track provides chapter titles (suitable for navigating the media resource).
|
|
160
|
+
* <br/> - `'metadata'`: The track provides content used by scripts and is not visible for users.
|
|
161
|
+
*
|
|
162
|
+
* @remarks
|
|
163
|
+
* <br/> - If an unrecognized value is provided, the player will interpret it as `'metadata'`.
|
|
164
|
+
*
|
|
165
|
+
* @defaultValue `'subtitles'`
|
|
166
|
+
*/
|
|
167
|
+
kind?: string;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* The format of the track, represented by a value from the following list:
|
|
171
|
+
* <br/> - `'srt'`
|
|
172
|
+
* <br/> - `'ttml'`
|
|
173
|
+
* <br/> - `'webvtt'`
|
|
174
|
+
* <br/> - `'emsg'`
|
|
175
|
+
* <br/> - `'eventstream'`
|
|
176
|
+
* <br/> - `'id3'`
|
|
177
|
+
* <br/> - `'cea608'`
|
|
178
|
+
* <br/> - `'daterange'`
|
|
179
|
+
*
|
|
180
|
+
* @defaultValue `''`
|
|
181
|
+
*/
|
|
182
|
+
format?: string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The source URL of the text track.
|
|
186
|
+
*/
|
|
187
|
+
src: string;
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* The language of the text track.
|
|
191
|
+
*/
|
|
192
|
+
srclang?: string;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* A label for the text track.
|
|
196
|
+
*
|
|
197
|
+
* @remarks
|
|
198
|
+
* <br/> - This will be used as an identifier on the player API and in the UI.
|
|
199
|
+
*/
|
|
200
|
+
label?: string;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* The identifier of this text track.
|
|
204
|
+
*
|
|
205
|
+
* @internal
|
|
206
|
+
*/
|
|
207
|
+
// Note: This works for HLS, but not for DASH.
|
|
208
|
+
id?: string;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Represents the common properties of a media resource.
|
|
213
|
+
*
|
|
214
|
+
* @public
|
|
215
|
+
*/
|
|
216
|
+
export interface BaseSource {
|
|
217
|
+
/**
|
|
218
|
+
* The URL of a time server used by the player to synchronise the time in DASH sources.
|
|
219
|
+
*
|
|
220
|
+
* @remarks
|
|
221
|
+
* <br/> - Available since v2.47.0.
|
|
222
|
+
* <br/> - The time server should return time in ISO-8601 format.
|
|
223
|
+
* <br/> - Overrides the time server provided the DASH manifest's `<UTCTiming>`.
|
|
224
|
+
* <br/> - Only this source will use the time server. Alternatively, for all source use {@link SourceConfiguration.timeServer}.
|
|
225
|
+
*/
|
|
226
|
+
timeServer?: string;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Whether the source should be played in the low-latency-mode of the player.
|
|
230
|
+
*
|
|
231
|
+
* @defaultValue `false`
|
|
232
|
+
*
|
|
233
|
+
* @remarks
|
|
234
|
+
* <br/> - This setting must be `true` when using Low-Latency CMAF with ABR.
|
|
235
|
+
* <br/> - Available since v2.62.0.
|
|
236
|
+
*/
|
|
237
|
+
lowLatency?: boolean;
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* The configuration for controlling playback of an MPEG-DASH stream.
|
|
241
|
+
*
|
|
242
|
+
* @remarks
|
|
243
|
+
* <br/> - Available since v2.79.0.
|
|
244
|
+
* <br/> - Ignored for non-DASH streams.
|
|
245
|
+
*/
|
|
246
|
+
dash?: DashPlaybackConfiguration;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* The configuration for controlling playback of an HLS stream.
|
|
250
|
+
*
|
|
251
|
+
* @remarks
|
|
252
|
+
* <br/> - Available since v2.82.0.
|
|
253
|
+
* <br/> - Ignored for non-HLS streams.
|
|
254
|
+
*/
|
|
255
|
+
hls?: HlsPlaybackConfiguration;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Represents a media resource characterized by a URL to the resource and optionally information about the resource.
|
|
260
|
+
*
|
|
261
|
+
* @public
|
|
262
|
+
*/
|
|
263
|
+
export interface TypedSource extends BaseSource {
|
|
264
|
+
/**
|
|
265
|
+
* The source URL of the media resource.
|
|
266
|
+
*
|
|
267
|
+
* @remarks
|
|
268
|
+
* <br/> - Required if the `ssai` property is absent.
|
|
269
|
+
* <br/> - Available since v2.4.0.
|
|
270
|
+
*/
|
|
271
|
+
src?: string;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* The content type (MIME type) of the media resource, represented by a value from the following list:
|
|
275
|
+
* <br/> - `'application/dash+xml'`: The media resource is an MPEG-DASH stream.
|
|
276
|
+
* <br/> - `'application/x-mpegURL'` or `'application/vnd.apple.mpegurl'`: The media resource is an HLS stream.
|
|
277
|
+
* <br/> - `'video/mp4'`, `'video/webm'` and other formats: The media resource should use native HTML5 playback if supported by the browser.
|
|
278
|
+
* <br/> - `'application/vnd.theo.hesp+json'`: The media resource is an HESP stream.
|
|
279
|
+
*
|
|
280
|
+
* @remarks
|
|
281
|
+
* <br/> - Available since v2.4.0.
|
|
282
|
+
*/
|
|
283
|
+
type?: string;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* The content protection parameters for the media resource.
|
|
287
|
+
*
|
|
288
|
+
* @remarks
|
|
289
|
+
* <br/> - Available since v2.15.0.
|
|
290
|
+
*/
|
|
291
|
+
contentProtection?: DRMConfiguration;
|
|
292
|
+
}
|