react-native-theoplayer 2.11.0 → 2.12.1
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 +23 -0
- package/README.md +6 -3
- package/android/build.gradle +2 -2
- 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/THEOplayerRCTBridge.m +0 -1
- package/ios/THEOplayerRCTNetworkUtils.swift +0 -2
- package/ios/THEOplayerRCTPlayerAPI.swift +14 -2
- package/ios/THEOplayerRCTPrintUtils.swift +0 -3
- package/ios/THEOplayerRCTSourceDescriptionBuilder.swift +2 -0
- package/ios/THEOplayerRCTTextTrackEventHandler.swift +32 -4
- package/ios/THEOplayerRCTViewManager.swift +0 -3
- package/ios/ads/THEOplayerRCTAdsAPI.swift +0 -4
- package/ios/backgroundAudio/THEOplayerRCTRemoteCommandsManager.swift +51 -36
- package/ios/casting/THEOplayerRCTCastAPI.swift +0 -3
- package/ios/contentprotection/THEOplayerRCTContentProtectionAPI.swift +0 -3
- package/ios/contentprotection/THEOplayerRCTProxyContentProtectionIntegration.swift +0 -2
- package/ios/contentprotection/THEOplayerRCTProxyContentProtectionIntegrationFactory.swift +0 -2
- 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 +7 -3
- 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
|
@@ -12,6 +12,7 @@ import type { HlsPlaybackConfiguration } from './hls/HlsPlaybackConfiguration';
|
|
|
12
12
|
import type { AdDescription } from './ads/Ads';
|
|
13
13
|
import type { MetadataDescription } from './metadata/MetadataDescription';
|
|
14
14
|
import type { ServerSideAdInsertionConfiguration } from "./ads/ssai/ServerSideAdInsertionConfiguration";
|
|
15
|
+
import type { AnalyticsDescription } from "./analytics/AnalyticsDescription";
|
|
15
16
|
export declare type Source = TypedSource;
|
|
16
17
|
/**
|
|
17
18
|
* A media resource or list of media resources.
|
|
@@ -78,6 +79,10 @@ export interface SourceConfiguration {
|
|
|
78
79
|
* @public
|
|
79
80
|
*/
|
|
80
81
|
metadata?: MetadataDescription;
|
|
82
|
+
/**
|
|
83
|
+
* List of {@link AnalyticsDescription}s to configure source-related properties for analytics connectors.
|
|
84
|
+
*/
|
|
85
|
+
analytics?: AnalyticsDescription[];
|
|
81
86
|
}
|
|
82
87
|
/**
|
|
83
88
|
* Describes the configuration of a player's source.
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
* Analytics extensions can define any custom set of fields.
|
|
13
|
+
*/
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AnalyticsDescription';
|
package/package.json
CHANGED
|
@@ -36,14 +36,18 @@ Pod::Spec.new do |s|
|
|
|
36
36
|
}
|
|
37
37
|
else
|
|
38
38
|
puts "Using THEOplayer-core SDK"
|
|
39
|
-
s.dependency "THEOplayerSDK-core", "~> 5.
|
|
39
|
+
s.dependency "THEOplayerSDK-core", "~> 5.11"
|
|
40
40
|
if theofeatures.include?("GOOGLE_IMA")
|
|
41
41
|
puts "Adding THEOplayer-Integration-GoogleIMA"
|
|
42
|
-
s.dependency "THEOplayer-Integration-GoogleIMA"
|
|
42
|
+
s.dependency "THEOplayer-Integration-GoogleIMA", "~> 5.11"
|
|
43
43
|
end
|
|
44
44
|
if theofeatures.include?("CHROMECAST")
|
|
45
45
|
puts "Adding THEOplayer-Integration-GoogleCast"
|
|
46
|
-
s.ios.dependency "THEOplayer-Integration-GoogleCast"
|
|
46
|
+
s.ios.dependency "THEOplayer-Integration-GoogleCast", "~> 5.11"
|
|
47
|
+
end
|
|
48
|
+
if theofeatures.include?("SIDELOADED_TEXTTRACKS")
|
|
49
|
+
puts "Adding THEOplayer-Connector-SideloadedSubtitle"
|
|
50
|
+
s.dependency "THEOplayer-Connector-SideloadedSubtitle", "~> 5.11"
|
|
47
51
|
end
|
|
48
52
|
end
|
|
49
53
|
|
|
@@ -12,6 +12,7 @@ import type { HlsPlaybackConfiguration } from './hls/HlsPlaybackConfiguration';
|
|
|
12
12
|
import type { AdDescription } from './ads/Ads';
|
|
13
13
|
import type { MetadataDescription } from './metadata/MetadataDescription';
|
|
14
14
|
import type { ServerSideAdInsertionConfiguration } from "./ads/ssai/ServerSideAdInsertionConfiguration";
|
|
15
|
+
import type { AnalyticsDescription } from "./analytics/AnalyticsDescription";
|
|
15
16
|
|
|
16
17
|
export type Source = TypedSource;
|
|
17
18
|
|
|
@@ -87,6 +88,11 @@ export interface SourceConfiguration {
|
|
|
87
88
|
* @public
|
|
88
89
|
*/
|
|
89
90
|
metadata?: MetadataDescription;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* List of {@link AnalyticsDescription}s to configure source-related properties for analytics connectors.
|
|
94
|
+
*/
|
|
95
|
+
analytics?: AnalyticsDescription[];
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
/**
|
|
@@ -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
|
|