react-native-theoplayer 10.6.1 → 10.7.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 CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [10.7.0] - 25-12-19
9
+
10
+ ### Added
11
+
12
+ - Added a webrtc configuration property `webrtc` in `TheoLiveSource`, to enable configuring the playout delay for Millicast streams consumed through OptiView Live.
13
+
8
14
  ## [10.6.1] - 25-12-18
9
15
 
10
16
  ### Fixed
@@ -24,7 +24,9 @@ import com.theoplayer.android.api.cmcd.CMCDTransmissionMode
24
24
  import com.theoplayer.android.api.error.ErrorCode
25
25
  import com.theoplayer.android.api.source.AdIntegration
26
26
  import com.theoplayer.android.api.source.dash.DashPlaybackConfiguration
27
+ import com.theoplayer.android.api.theolive.PlayoutDelay
27
28
  import com.theoplayer.android.api.theolive.TheoLiveSource
29
+ import com.theoplayer.android.api.theolive.WebRTCOptions
28
30
  import com.theoplayer.cmcd.CmcdTransmissionMode
29
31
  import com.theoplayer.drm.ContentProtectionAdapter
30
32
  import com.theoplayer.latency.parseLatencyConfiguration
@@ -72,6 +74,10 @@ private const val PROP_SSE_ENDPOINT = "sseEndpoint"
72
74
  private const val PROP_STREAM_ACTIVITY_MONITOR_ID = "streamActivityMonitorId"
73
75
  private const val PROP_LATENCY_CONFIGURATION = "latencyConfiguration"
74
76
  private const val PROP_PROFILE = "profile"
77
+ private const val PROP_WEBRTC: String = "webrtc"
78
+ private const val PROP_PLAYOUT_DELAY: String = "playoutDelayMs"
79
+ private const val PROP_PLAYOUT_DELAY_MIN: String = "minimum"
80
+ private const val PROP_PLAYOUT_DELAY_MAX: String = "maximum"
75
81
 
76
82
  private const val ERROR_IMA_NOT_ENABLED = "Google IMA support not enabled."
77
83
  private const val ERROR_THEOADS_NOT_ENABLED = "THEOads support not enabled."
@@ -183,10 +189,23 @@ class SourceAdapter {
183
189
  drm=jsonTypedSource.optJSONObject(PROP_CONTENT_PROTECTION)?.let {
184
190
  ContentProtectionAdapter.drmConfigurationFromJson(it)
185
191
  },
186
- profile=jsonTypedSource.optString(PROP_PROFILE)
192
+ profile=jsonTypedSource.optString(PROP_PROFILE),
193
+ webrtc=parseWebRTCOptions(jsonTypedSource)
187
194
  )
188
195
  }
189
196
 
197
+ @Throws(THEOplayerException::class)
198
+ private fun parseWebRTCOptions(jsonWebrtcOptions: JSONObject): WebRTCOptions? {
199
+ val webrtc = jsonWebrtcOptions.optJSONObject(PROP_WEBRTC)
200
+ val playoutDelay = webrtc?.optJSONObject(PROP_PLAYOUT_DELAY)
201
+ val playoutDelayMin = playoutDelay?.optInt(PROP_PLAYOUT_DELAY_MIN)
202
+ val playoutDelayMax = playoutDelay?.optInt(PROP_PLAYOUT_DELAY_MAX)
203
+
204
+ if (playoutDelayMin == null || playoutDelayMax == null) return null
205
+
206
+ return WebRTCOptions(playoutDelayMs = PlayoutDelay(playoutDelayMin, playoutDelayMax))
207
+ }
208
+
190
209
  @Throws(THEOplayerException::class)
191
210
  private fun parseTypedSource(jsonTypedSource: JSONObject, cmcdTransmissionMode: CMCDTransmissionMode? = null): TypedSource {
192
211
  // Property `integration` will be replaced with `type`.
@@ -9,9 +9,22 @@ import THEOplayerTHEOliveIntegration
9
9
  #endif
10
10
 
11
11
  let SD_PROP_PROFILE: String = "profile"
12
+ let SD_PROP_WEBRTC: String = "webrtc"
13
+ let SD_PROP_PLAYOUT_DELAY: String = "playoutDelayMs"
14
+ let SD_PROP_PLAYOUT_DELAY_MIN: String = "minimum"
15
+ let SD_PROP_PLAYOUT_DELAY_MAX: String = "maximum"
12
16
 
13
17
  extension THEOplayerRCTSourceDescriptionBuilder {
14
18
 
19
+ private static func buildWebrtcOptions(_ theoliveData: [String: Any]) -> WebrtcOptions? {
20
+ let webrtc = theoliveData[SD_PROP_WEBRTC] as? NSDictionary
21
+ let playoutDelay = webrtc?[SD_PROP_PLAYOUT_DELAY] as? NSDictionary
22
+ let playoutDelayMin = playoutDelay?[SD_PROP_PLAYOUT_DELAY_MIN] as? Int
23
+ let playoutDelayMax = playoutDelay?[SD_PROP_PLAYOUT_DELAY_MAX] as? Int
24
+ guard let playoutDelayMin, let playoutDelayMax else { return nil }
25
+ return WebrtcOptions(playoutDelayMs: PlayoutDelay(minimum: playoutDelayMin, maximum: playoutDelayMax))
26
+ }
27
+
15
28
  /**
16
29
  Builds a THEOplayer SourceDescription that can be passed as a source for the THEOplayer.
17
30
  - returns: a THEOlive TypedSource.
@@ -20,7 +33,8 @@ extension THEOplayerRCTSourceDescriptionBuilder {
20
33
  #if canImport(THEOplayerTHEOliveIntegration)
21
34
  if let src = theoliveData[SD_PROP_SRC] as? String {
22
35
  let profile = theoliveData[SD_PROP_PROFILE] as? String;
23
- return TheoLiveSource(channelId: src, drm: contentProtection, profile: profile)
36
+ let webrtc = buildWebrtcOptions(theoliveData)
37
+ return TheoLiveSource(channelId: src, drm: contentProtection, profile: profile, webrtc: webrtc)
24
38
  }
25
39
  #endif
26
40
  return nil
@@ -1,2 +1,6 @@
1
1
  "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
2
6
  //# sourceMappingURL=TheoLiveEndpoint.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=WebrtcOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["api/theolive/WebrtcOptions.ts"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":"10.6.1","buildDate":"2025-12-18T12:17:06.899Z"}
1
+ {"version":"10.7.0","buildDate":"2025-12-19T10:48:13.465Z"}
@@ -1,2 +1,4 @@
1
1
  "use strict";
2
+
3
+ export {};
2
4
  //# sourceMappingURL=TheoLiveEndpoint.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=WebrtcOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["api/theolive/WebrtcOptions.ts"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":"10.6.1","buildDate":"2025-12-18T12:17:06.899Z"}
1
+ {"version":"10.7.0","buildDate":"2025-12-19T10:48:13.465Z"}
@@ -1,8 +1,10 @@
1
+ import { WebrtcOptions } from "./WebrtcOptions";
1
2
  export interface EndpointMillicastSource {
2
3
  name: string;
3
4
  accountId: string;
4
5
  subscriberToken?: string;
5
6
  directorUrl?: string;
7
+ webrtc?: WebrtcOptions;
6
8
  }
7
9
  /**
8
10
  * Description of a THEOlive Endpoint.
@@ -1 +1 @@
1
- {"version":3,"file":"TheoLiveEndpoint.d.ts","sourceRoot":"","sources":["../../../../src/api/theolive/TheoLiveEndpoint.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,uBAAuB,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,SAAS,CAAC,EAAE;QACV,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH"}
1
+ {"version":3,"file":"TheoLiveEndpoint.d.ts","sourceRoot":"","sources":["../../../../src/api/theolive/TheoLiveEndpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,aAAa,CAAA;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,EAAE,uBAAuB,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,SAAS,CAAC,EAAE;QACV,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH"}
@@ -1,4 +1,5 @@
1
1
  import { SourceIntegrationId, TypedSource } from 'react-native-theoplayer';
2
+ import { WebrtcOptions } from './WebrtcOptions';
2
3
  /**
3
4
  * Represents a source for the THEOlive integration.
4
5
  *
@@ -18,5 +19,9 @@ export interface TheoLiveSource extends TypedSource {
18
19
  * The profile identifier is included as a query parameter in the discovery request to obtain a response specific to that profile.
19
20
  */
20
21
  profile?: string;
22
+ /**
23
+ * WebRTC configuration for a THEOlive Millicast source.
24
+ */
25
+ webrtc?: WebrtcOptions;
21
26
  }
22
27
  //# sourceMappingURL=TheoLiveSource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TheoLiveSource.d.ts","sourceRoot":"","sources":["../../../../src/api/theolive/TheoLiveSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IAC/C;;OAEG;IACH,WAAW,EAAE,mBAAmB,CAAC,SAAS,CAAC;IAE3C;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"TheoLiveSource.d.ts","sourceRoot":"","sources":["../../../../src/api/theolive/TheoLiveSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IAC/C;;OAEG;IACH,WAAW,EAAE,mBAAmB,CAAC,SAAS,CAAC;IAE3C;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;CAC1B"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Webrtc playout delay configuration.
3
+ *
4
+ * This is used to configure the playout delay for a Millicast Source. This hints Webrtc
5
+ * to increase the jitter buffer size.
6
+ *
7
+ * @category THEOlive
8
+ * @remark This is a hint, and factors like network jitter and audio/video sync latency affect the actual delay applied.
9
+ * @public
10
+ */
11
+ export interface WebrtcPlayoutDelay {
12
+ minimum: number;
13
+ maximum: number;
14
+ }
15
+ /**
16
+ * WebRTC configuration for a THEOlive Millicast source.
17
+ *
18
+ * @category THEOlive
19
+ * @public
20
+ */
21
+ export interface WebrtcOptions {
22
+ /**
23
+ * Webrtc playout delay configuration for the Webrtc media.
24
+ */
25
+ playoutDelayMs?: WebrtcPlayoutDelay;
26
+ }
27
+ //# sourceMappingURL=WebrtcOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebrtcOptions.d.ts","sourceRoot":"","sources":["../../../../src/api/theolive/WebrtcOptions.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;CACrC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-theoplayer",
3
- "version": "10.6.1",
3
+ "version": "10.7.0",
4
4
  "description": "A THEOplayer video component for react-native.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -43,37 +43,37 @@ Pod::Spec.new do |s|
43
43
 
44
44
  # THEOplayer Dependency
45
45
  puts "Adding THEOplayerSDK-core"
46
- s.dependency "THEOplayerSDK-core", "~> 10.6"
46
+ s.dependency "THEOplayerSDK-core", "~> 10.7"
47
47
 
48
48
  # THEOlive Dependency
49
49
  puts "Adding THEOplayer-Integration-THEOlive"
50
- s.dependency "THEOplayer-Integration-THEOlive", "~> 10.6"
50
+ s.dependency "THEOplayer-Integration-THEOlive", "~> 10.7"
51
51
 
52
52
  # Feature based integration dependencies
53
53
  if theofeatures.include?("GOOGLE_IMA")
54
54
  puts "Adding THEOplayer-Integration-GoogleIMA"
55
- s.dependency "THEOplayer-Integration-GoogleIMA", "~> 10.6"
55
+ s.dependency "THEOplayer-Integration-GoogleIMA", "~> 10.7"
56
56
  end
57
57
 
58
58
  if theofeatures.include?("CHROMECAST")
59
59
  puts "Adding THEOplayer-Integration-GoogleCast"
60
- s.ios.dependency "THEOplayer-Integration-GoogleCast", "~> 10.6"
60
+ s.ios.dependency "THEOplayer-Integration-GoogleCast", "~> 10.7"
61
61
  end
62
62
 
63
63
  if theofeatures.include?("THEO_ADS")
64
64
  puts "Adding THEOplayer-Integration-THEOads"
65
- s.dependency "THEOplayer-Integration-THEOads", "~> 10.6"
65
+ s.dependency "THEOplayer-Integration-THEOads", "~> 10.7"
66
66
  end
67
67
 
68
68
  if theofeatures.include?("MILLICAST")
69
69
  puts "Adding THEOplayer-Integration-Millicast"
70
- s.dependency "THEOplayer-Integration-Millicast", "~> 10.6"
70
+ s.dependency "THEOplayer-Integration-Millicast", "~> 10.7"
71
71
  end
72
72
 
73
73
  # Feature based connector dependencies
74
74
  if theofeatures.include?("SIDELOADED_TEXTTRACKS")
75
75
  puts "Adding THEOplayer-Connector-SideloadedSubtitle"
76
- s.dependency "THEOplayer-Connector-SideloadedSubtitle", "~> 10.6"
76
+ s.dependency "THEOplayer-Connector-SideloadedSubtitle", "~> 10.7"
77
77
  end
78
78
 
79
79
  end
@@ -1,8 +1,11 @@
1
+ import { WebrtcOptions } from "./WebrtcOptions";
2
+
1
3
  export interface EndpointMillicastSource {
2
4
  name: string;
3
5
  accountId: string;
4
6
  subscriberToken?: string;
5
7
  directorUrl?: string;
8
+ webrtc?: WebrtcOptions
6
9
  }
7
10
 
8
11
  /**
@@ -1,4 +1,5 @@
1
1
  import { SourceIntegrationId, TypedSource } from 'react-native-theoplayer';
2
+ import { WebrtcOptions } from './WebrtcOptions';
2
3
 
3
4
  /**
4
5
  * Represents a source for the THEOlive integration.
@@ -21,4 +22,9 @@ export interface TheoLiveSource extends TypedSource {
21
22
  * The profile identifier is included as a query parameter in the discovery request to obtain a response specific to that profile.
22
23
  */
23
24
  profile?: string;
25
+
26
+ /**
27
+ * WebRTC configuration for a THEOlive Millicast source.
28
+ */
29
+ webrtc?: WebrtcOptions;
24
30
  }
@@ -0,0 +1,28 @@
1
+
2
+ /**
3
+ * Webrtc playout delay configuration.
4
+ *
5
+ * This is used to configure the playout delay for a Millicast Source. This hints Webrtc
6
+ * to increase the jitter buffer size.
7
+ *
8
+ * @category THEOlive
9
+ * @remark This is a hint, and factors like network jitter and audio/video sync latency affect the actual delay applied.
10
+ * @public
11
+ */
12
+ export interface WebrtcPlayoutDelay {
13
+ minimum: number;
14
+ maximum: number;
15
+ }
16
+
17
+ /**
18
+ * WebRTC configuration for a THEOlive Millicast source.
19
+ *
20
+ * @category THEOlive
21
+ * @public
22
+ */
23
+ export interface WebrtcOptions {
24
+ /**
25
+ * Webrtc playout delay configuration for the Webrtc media.
26
+ */
27
+ playoutDelayMs?: WebrtcPlayoutDelay;
28
+ }
package/src/manifest.json CHANGED
@@ -1 +1 @@
1
- {"version":"10.6.1","buildDate":"2025-12-18T12:17:06.899Z"}
1
+ {"version":"10.7.0","buildDate":"2025-12-19T10:48:13.465Z"}