From 9e756f6a959ca96c8ed12b23416bdeea5839671f Mon Sep 17 00:00:00 2001 From: Tom Van Laerhoven Date: Sat, 14 Sep 2024 11:26:51 +0200 Subject: [PATCH 1/5] Fix version range --- android/build.gradle | 4 ++-- example/android/gradle.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 7f64d5464..5cb09b6d0 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -113,8 +113,8 @@ dependencies { implementation "androidx.core:core-ktx:${safeExtGet('corektxVersion', '1.10.1')}" // The minimum supported THEOplayer version is 7.12.0 - def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[7.12.0, 8.0.0)') - def theoplayer_mediasession_version = safeExtGet('THEOplayer_mediasession', '[7.12.0, 8.0.0)') + def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[7.12.0, 9.0.0)') + def theoplayer_mediasession_version = safeExtGet('THEOplayer_mediasession', '[7.12.0, 9.0.0)') println("Using THEOplayer (${versionString(theoplayer_sdk_version)})") implementation "com.theoplayer.theoplayer-sdk-android:core:${theoplayer_sdk_version}" diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 02c192d56..b6a481c49 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -41,7 +41,7 @@ newArchEnabled=false hermesEnabled=true # Version of the THEOplayer SDK, if not specified, the latest available version within bounds is set. -#THEOplayer_sdk=[7.12.0, 8.0.0) +#THEOplayer_sdk=[7.12.0, 9.0.0) # Override Android sdk versions #THEOplayer_compileSdkVersion = 34 From 5e1aa47f3e7996b193ef357c114578da7263728a Mon Sep 17 00:00:00 2001 From: Tom Van Laerhoven Date: Sat, 14 Sep 2024 11:34:27 +0200 Subject: [PATCH 2/5] Add gson dependency --- android/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/android/build.gradle b/android/build.gradle index 5cb09b6d0..477b51056 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -111,6 +111,7 @@ dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${safeExtGet('coroutinesVersion', '1.7.3')}" implementation "androidx.appcompat:appcompat:${safeExtGet('appcompatVersion', '1.6.1')}" implementation "androidx.core:core-ktx:${safeExtGet('corektxVersion', '1.10.1')}" + implementation "com.google.code.gson:gson:2.11.0" // The minimum supported THEOplayer version is 7.12.0 def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[7.12.0, 9.0.0)') From 9d6902486d83c7dfe1388e627830ea32d75f57ce Mon Sep 17 00:00:00 2001 From: Tom Van Laerhoven Date: Sat, 14 Sep 2024 11:46:43 +0200 Subject: [PATCH 3/5] Remove default ad integration --- .../com/theoplayer/source/SourceAdapter.kt | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/android/src/main/java/com/theoplayer/source/SourceAdapter.kt b/android/src/main/java/com/theoplayer/source/SourceAdapter.kt index ec85bd8a5..a037d8cbd 100644 --- a/android/src/main/java/com/theoplayer/source/SourceAdapter.kt +++ b/android/src/main/java/com/theoplayer/source/SourceAdapter.kt @@ -13,12 +13,12 @@ import com.theoplayer.android.api.source.addescription.AdDescription import com.theoplayer.android.api.source.TextTrackDescription import com.theoplayer.android.api.source.SourceType import com.theoplayer.android.api.source.hls.HlsPlaybackConfiguration -import com.theoplayer.android.api.event.ads.AdIntegrationKind import com.theoplayer.android.api.source.addescription.GoogleImaAdDescription import com.theoplayer.android.api.player.track.texttrack.TextTrackKind import com.theoplayer.android.api.source.metadata.ChromecastMetadataImage import com.theoplayer.BuildConfig import com.theoplayer.android.api.error.ErrorCode +import com.theoplayer.android.api.source.AdIntegration import com.theoplayer.android.api.source.dash.DashPlaybackConfiguration import com.theoplayer.drm.ContentProtectionAdapter import com.theoplayer.util.BridgeUtils @@ -246,36 +246,27 @@ class SourceAdapter { @Throws(JSONException::class, THEOplayerException::class) fun parseAdFromJS(jsonAdDescription: JSONObject): AdDescription { - val integrationKindStr = jsonAdDescription.optString(PROP_INTEGRATION) - return if (!TextUtils.isEmpty(integrationKindStr)) { - when (AdIntegrationKind.from(integrationKindStr)) { - AdIntegrationKind.GOOGLE_IMA -> parseImaAdFromJS( + val integrationStr = jsonAdDescription.optString(PROP_INTEGRATION) + return if (!TextUtils.isEmpty(integrationStr)) { + when (integrationStr) { + AdIntegration.GOOGLE_IMA.adIntegration -> parseImaAdFromJS( jsonAdDescription ) - - AdIntegrationKind.DEFAULT -> { - throw THEOplayerException( - ErrorCode.AD_ERROR, - "$ERROR_UNSUPPORTED_CSAI_INTEGRATION: $integrationKindStr" - ) - } - else -> { throw THEOplayerException( ErrorCode.AD_ERROR, - "$ERROR_UNSUPPORTED_CSAI_INTEGRATION: $integrationKindStr" + "$ERROR_UNSUPPORTED_CSAI_INTEGRATION: $integrationStr" ) } } } else { throw THEOplayerException( ErrorCode.AD_ERROR, - "$ERROR_MISSING_CSAI_INTEGRATION: $integrationKindStr" + "$ERROR_MISSING_CSAI_INTEGRATION: $integrationStr" ) } } - @Throws(THEOplayerException::class) private fun parseImaAdFromJS(jsonAdDescription: JSONObject): GoogleImaAdDescription { if (!BuildConfig.EXTENSION_GOOGLE_IMA) { From 8bbd036a9facbd81593dd2396366e2ceeff8cd62 Mon Sep 17 00:00:00 2001 From: Tom Van Laerhoven Date: Sat, 14 Sep 2024 11:47:49 +0200 Subject: [PATCH 4/5] Add changelog entry --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a181b1f2..3f46d68ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [8.0.1] - 24-09-14 + +### Fixed + +- Fixed an issue on Android where not all dependencies would be correctly resolved. + ## [8.0.1] - 24-09-11 ### Fixed From 9e3b02d71d4753da0630474a00a587921329bf34 Mon Sep 17 00:00:00 2001 From: Tom Van Laerhoven Date: Sat, 14 Sep 2024 11:51:06 +0200 Subject: [PATCH 5/5] 8.0.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index d8cca8373..19211d67e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-native-theoplayer", - "version": "8.0.1", + "version": "8.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "react-native-theoplayer", - "version": "8.0.1", + "version": "8.0.2", "license": "SEE LICENSE AT https://www.theoplayer.com/terms", "dependencies": { "buffer": "^6.0.3" diff --git a/package.json b/package.json index b5a0143ec..ae6cde241 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-theoplayer", - "version": "8.0.1", + "version": "8.0.2", "description": "A THEOplayer video component for react-native.", "main": "lib/commonjs/index", "module": "lib/module/index",