Skip to content

Commit

Permalink
Merge pull request #387 from THEOplayer/release/v8.0.2
Browse files Browse the repository at this point in the history
Release/v8.0.2
  • Loading branch information
tvanlaerhoven committed Sep 14, 2024
2 parents b890e7f + 9e3b02d commit 02c47a4
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 22 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ 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, 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}"
Expand Down
23 changes: 7 additions & 16 deletions android/src/main/java/com/theoplayer/source/SourceAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 02c47a4

Please sign in to comment.