react-native-theoplayer 2.11.0 → 2.12.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 +16 -0
- package/README.md +1 -0
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerContext.kt +14 -0
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.kt +1 -3
- package/android/src/main/java/com/theoplayer/audio/AudioFocusManager.kt +145 -0
- package/android/src/main/java/com/theoplayer/drm/ContentProtectionModule.kt +1 -1
- package/ios/THEOplayerRCTPlayerAPI.swift +14 -2
- package/ios/THEOplayerRCTSourceDescriptionBuilder.swift +2 -0
- package/ios/THEOplayerRCTTextTrackEventHandler.swift +32 -4
- package/ios/backgroundAudio/THEOplayerRCTRemoteCommandsManager.swift +51 -36
- package/lib/commonjs/api/source/SourceDescription.js.map +1 -1
- package/lib/commonjs/api/source/analytics/AnalyticsDescription.js +2 -0
- package/lib/commonjs/api/source/analytics/AnalyticsDescription.js.map +1 -0
- package/lib/commonjs/api/source/analytics/barrel.js +17 -0
- package/lib/commonjs/api/source/analytics/barrel.js.map +1 -0
- package/lib/commonjs/api/source/barrel.js +15 -4
- package/lib/commonjs/api/source/barrel.js.map +1 -1
- package/lib/commonjs/api/track/TextTrack.js +1 -1
- package/lib/commonjs/api/track/TextTrack.js.map +1 -1
- package/lib/commonjs/internal/adapter/THEOplayerWebAdapter.js.map +1 -1
- package/lib/module/api/source/SourceDescription.js.map +1 -1
- package/lib/module/api/source/analytics/AnalyticsDescription.js +2 -0
- package/lib/module/api/source/analytics/AnalyticsDescription.js.map +1 -0
- package/lib/module/api/source/analytics/barrel.js +2 -0
- package/lib/module/api/source/analytics/barrel.js.map +1 -0
- package/lib/module/api/source/barrel.js +1 -0
- package/lib/module/api/source/barrel.js.map +1 -1
- package/lib/module/api/track/TextTrack.js +1 -1
- package/lib/module/api/track/TextTrack.js.map +1 -1
- package/lib/module/internal/adapter/THEOplayerWebAdapter.js.map +1 -1
- package/lib/typescript/api/source/SourceDescription.d.ts +5 -0
- package/lib/typescript/api/source/analytics/AnalyticsDescription.d.ts +15 -0
- package/lib/typescript/api/source/analytics/barrel.d.ts +1 -0
- package/lib/typescript/api/source/barrel.d.ts +1 -0
- package/lib/typescript/api/track/TextTrack.d.ts +1 -1
- package/package.json +1 -1
- package/react-native-theoplayer.json +2 -1
- package/react-native-theoplayer.podspec +5 -1
- package/src/api/source/SourceDescription.ts +6 -0
- package/src/api/source/analytics/AnalyticsDescription.ts +16 -0
- package/src/api/source/analytics/barrel.ts +1 -0
- package/src/api/source/barrel.ts +1 -0
- package/src/api/track/TextTrack.ts +2 -2
- package/src/internal/adapter/THEOplayerWebAdapter.ts +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes the configuration of an analytics integration as part of the SourceDescription.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface AnalyticsDescription {
|
|
7
|
+
/**
|
|
8
|
+
* The identifier of the analytics integration.
|
|
9
|
+
*/
|
|
10
|
+
integration: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Analytics extensions can define any custom set of fields.
|
|
14
|
+
*/
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AnalyticsDescription';
|
package/src/api/source/barrel.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface TextTrack extends Track {
|
|
|
38
38
|
/**
|
|
39
39
|
* The label of the text track.
|
|
40
40
|
*/
|
|
41
|
-
label: string;
|
|
41
|
+
readonly label: string;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* The language of the text track.
|
|
@@ -122,7 +122,7 @@ export function hasTextTrackCue(textTrack: TextTrack, cue: TextTrackCue): boolea
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
export function removeTextTrackCue(textTrack?: TextTrack, cue?: TextTrackCue) {
|
|
125
|
-
if (textTrack && textTrack.cues && cue &&
|
|
125
|
+
if (textTrack && textTrack.cues && cue && hasTextTrackCue(textTrack, cue)) {
|
|
126
126
|
textTrack.cues = textTrack.cues.filter((c) => c.uid !== cue.uid);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -71,7 +71,7 @@ export class THEOplayerWebAdapter extends DefaultEventDispatcher<PlayerEventMap>
|
|
|
71
71
|
set source(source: SourceDescription | undefined) {
|
|
72
72
|
this._targetVideoQuality = undefined;
|
|
73
73
|
if (this._player) {
|
|
74
|
-
this._player.source = source;
|
|
74
|
+
this._player.source = source as THEOplayerWeb.SourceDescription;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|