react-native-theoplayer 8.0.1 → 8.0.3

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,18 @@ 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
+ ## [8.0.3] - 24-09-14
9
+
10
+ ### Fixed
11
+
12
+ - Fixed an issue on Android where the THEO Maven repository would not be picked up by all dependencies.
13
+
14
+ ## [8.0.2] - 24-09-14
15
+
16
+ ### Fixed
17
+
18
+ - Fixed an issue on Android where not all dependencies would be correctly resolved.
19
+
8
20
  ## [8.0.1] - 24-09-11
9
21
 
10
22
  ### Fixed
@@ -89,6 +89,7 @@ android {
89
89
 
90
90
  rootProject.allprojects {
91
91
  repositories {
92
+ maven { url "https://maven.theoplayer.com/releases" }
92
93
  maven { url("$rootDir/../node_modules/react-native-theoplayer/android/local") }
93
94
  }
94
95
  }
@@ -111,10 +112,11 @@ dependencies {
111
112
  implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${safeExtGet('coroutinesVersion', '1.7.3')}"
112
113
  implementation "androidx.appcompat:appcompat:${safeExtGet('appcompatVersion', '1.6.1')}"
113
114
  implementation "androidx.core:core-ktx:${safeExtGet('corektxVersion', '1.10.1')}"
115
+ implementation "com.google.code.gson:gson:2.11.0"
114
116
 
115
117
  // The minimum supported THEOplayer version is 7.12.0
116
- def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[7.12.0, 8.0.0)')
117
- def theoplayer_mediasession_version = safeExtGet('THEOplayer_mediasession', '[7.12.0, 8.0.0)')
118
+ def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[7.12.0, 9.0.0)')
119
+ def theoplayer_mediasession_version = safeExtGet('THEOplayer_mediasession', '[7.12.0, 9.0.0)')
118
120
 
119
121
  println("Using THEOplayer (${versionString(theoplayer_sdk_version)})")
120
122
  implementation "com.theoplayer.theoplayer-sdk-android:core:${theoplayer_sdk_version}"
@@ -13,12 +13,12 @@ import com.theoplayer.android.api.source.addescription.AdDescription
13
13
  import com.theoplayer.android.api.source.TextTrackDescription
14
14
  import com.theoplayer.android.api.source.SourceType
15
15
  import com.theoplayer.android.api.source.hls.HlsPlaybackConfiguration
16
- import com.theoplayer.android.api.event.ads.AdIntegrationKind
17
16
  import com.theoplayer.android.api.source.addescription.GoogleImaAdDescription
18
17
  import com.theoplayer.android.api.player.track.texttrack.TextTrackKind
19
18
  import com.theoplayer.android.api.source.metadata.ChromecastMetadataImage
20
19
  import com.theoplayer.BuildConfig
21
20
  import com.theoplayer.android.api.error.ErrorCode
21
+ import com.theoplayer.android.api.source.AdIntegration
22
22
  import com.theoplayer.android.api.source.dash.DashPlaybackConfiguration
23
23
  import com.theoplayer.drm.ContentProtectionAdapter
24
24
  import com.theoplayer.util.BridgeUtils
@@ -246,36 +246,27 @@ class SourceAdapter {
246
246
 
247
247
  @Throws(JSONException::class, THEOplayerException::class)
248
248
  fun parseAdFromJS(jsonAdDescription: JSONObject): AdDescription {
249
- val integrationKindStr = jsonAdDescription.optString(PROP_INTEGRATION)
250
- return if (!TextUtils.isEmpty(integrationKindStr)) {
251
- when (AdIntegrationKind.from(integrationKindStr)) {
252
- AdIntegrationKind.GOOGLE_IMA -> parseImaAdFromJS(
249
+ val integrationStr = jsonAdDescription.optString(PROP_INTEGRATION)
250
+ return if (!TextUtils.isEmpty(integrationStr)) {
251
+ when (integrationStr) {
252
+ AdIntegration.GOOGLE_IMA.adIntegration -> parseImaAdFromJS(
253
253
  jsonAdDescription
254
254
  )
255
-
256
- AdIntegrationKind.DEFAULT -> {
257
- throw THEOplayerException(
258
- ErrorCode.AD_ERROR,
259
- "$ERROR_UNSUPPORTED_CSAI_INTEGRATION: $integrationKindStr"
260
- )
261
- }
262
-
263
255
  else -> {
264
256
  throw THEOplayerException(
265
257
  ErrorCode.AD_ERROR,
266
- "$ERROR_UNSUPPORTED_CSAI_INTEGRATION: $integrationKindStr"
258
+ "$ERROR_UNSUPPORTED_CSAI_INTEGRATION: $integrationStr"
267
259
  )
268
260
  }
269
261
  }
270
262
  } else {
271
263
  throw THEOplayerException(
272
264
  ErrorCode.AD_ERROR,
273
- "$ERROR_MISSING_CSAI_INTEGRATION: $integrationKindStr"
265
+ "$ERROR_MISSING_CSAI_INTEGRATION: $integrationStr"
274
266
  )
275
267
  }
276
268
  }
277
269
 
278
-
279
270
  @Throws(THEOplayerException::class)
280
271
  private fun parseImaAdFromJS(jsonAdDescription: JSONObject): GoogleImaAdDescription {
281
272
  if (!BuildConfig.EXTENSION_GOOGLE_IMA) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-theoplayer",
3
- "version": "8.0.1",
3
+ "version": "8.0.3",
4
4
  "description": "A THEOplayer video component for react-native.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",