Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4c809b7
Update NativeAd implementation to changed Ad API
wvanhaevre Apr 1, 2026
58537c4
Use adBreak as an optional property
wvanhaevre Apr 1, 2026
bd0e9e9
Bump wrapper
rbnbtns Apr 10, 2026
3b42ad0
Update android version
rbnbtns Apr 10, 2026
29cb051
Fix Ad deprecations
tvanlaerhoven Apr 13, 2026
18e91d7
Fix ImaSdkSettings properties
tvanlaerhoven Apr 13, 2026
cf9491e
Fix trivial warning
tvanlaerhoven Apr 13, 2026
2b4be31
Drop deprecated reactNativeHost
tvanlaerhoven Apr 13, 2026
78a42cd
Merge remote-tracking branch 'origin/feature/prepare-v11-rb' into fea…
tvanlaerhoven Apr 13, 2026
542c24b
Upgrade dependencies
tvanlaerhoven Apr 13, 2026
68b46b5
Fix trivial warnings
tvanlaerhoven Apr 13, 2026
e49d1b3
Add desugaring for e2e app
tvanlaerhoven Apr 13, 2026
187ed99
Drop deprecated ResizeEvent
tvanlaerhoven Apr 13, 2026
5a353ad
Remove deprecated theolive property
tvanlaerhoven Apr 13, 2026
03d8a9a
Drop deprecated integration property
tvanlaerhoven Apr 13, 2026
d83bb1a
Run prettier
tvanlaerhoven Apr 13, 2026
07e3b76
Add favicon
tvanlaerhoven Apr 13, 2026
8257cfa
Update TheoLiveSource
tvanlaerhoven Apr 13, 2026
75eb408
Update web peerDependency version
tvanlaerhoven Apr 13, 2026
3ccab4e
Update deprecated node version constraint
tvanlaerhoven Apr 13, 2026
2738e38
Update changelog
tvanlaerhoven Apr 13, 2026
fb47c39
Update podspec file
tvanlaerhoven Apr 13, 2026
eefb559
Add changelog entry
tvanlaerhoven Apr 13, 2026
45607cf
Add migration guide
tvanlaerhoven Apr 16, 2026
74e3965
Bump package versions
tvanlaerhoven Apr 16, 2026
9f927af
Update DRM package
tvanlaerhoven Apr 16, 2026
3abc3d9
Drop unused imports
tvanlaerhoven Apr 16, 2026
2851301
Update cmcd connector
tvanlaerhoven Apr 16, 2026
c518b20
Update lock files
tvanlaerhoven Apr 16, 2026
2150d82
Drop Sideloaded texttracks feature for e2e tests.
wvanhaevre Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added

- Added support for player SDK v11. More info on the [migration documentation](./doc/migrating-to-react-native-theoplayer-11.md) page.
- Enabled core library desugaring for Android to support version 3.39.0 of the Google IMA SDK.

### Changed

- Upgraded example app to React-Native v0.84.1.
- Changed the minimum supported iOS/tvOS version to 15.0, dropping support for iOS/tvOS 13 and 14.

### Fixed

- Fixed an issue on Web where Google IMA could fail to initialize when used with `react-reverse-portal` due to the player container not being attached to the document yet.

### Removed

- Removed deprecated `ResizeEvent` in favor of `DimensionChangeEvent`.
- Removed deprecated `player.theolive` property in favor of `player.theoLive`.
- Removed deprecated `source.integration` property in favor of `source.type`.

## [10.13.0] - 26-03-27

### Fixed
Expand Down
17 changes: 10 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}

dependencies {
classpath "com.android.tools.build:gradle:${safeExtGet('gradlePluginVersion', '8.12.3')}"
classpath "com.android.tools.build:gradle:${safeExtGet('gradlePluginVersion', '8.13.0')}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '2.2.10')}"
}
}
Expand Down Expand Up @@ -98,6 +98,7 @@ android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
coreLibraryDesugaringEnabled true
}
packagingOptions {
exclude 'META-INF/kotlin-stdlib.kotlin_module'
Expand All @@ -122,15 +123,16 @@ repositories {
mavenLocal()
}

// The minimum supported THEOplayer version is 10.12.0
def theoVersion = safeExtGet('THEOplayer_sdk', '[10.12.0, 11.0.0)')
def theoMediaSessionVersion = safeExtGet('THEOplayer_mediasession', '[8.0.0, 11.0.0)')
def theoAdsWrapperVersion = "10.12.0"
// The minimum supported THEOplayer version is 11.0.0
def theoVersion = safeExtGet('THEOplayer_sdk', '[11.0.0, 12.0.0)')
def theoMediaSessionVersion = safeExtGet('THEOplayer_mediasession', '[11.0.0, 12.0.0)')
def theoAdsWrapperVersion = "11.0.0"
def coroutinesVersion = safeExtGet('coroutinesVersion', '1.10.2')
def appcompatVersion = safeExtGet('appcompatVersion', '1.7.1')
def corektxVersion = safeExtGet('corektxVersion', '1.16.0')
def gsonVersion = safeExtGet('gsonVersion', '2.13.1')
def corektxVersion = safeExtGet('corektxVersion', '1.17.0')
def gsonVersion = safeExtGet('gsonVersion', '2.13.2')
def activityktxVersion = safeExtGet('activityktxVersion', '1.10.1')
def coreLibraryDesugaringVersion = safeExtGet('coreLibraryDesugaringVersion', '2.1.5')

dependencies {
def addOptiViewIntegration = { enabled, notation, additional = null ->
Expand All @@ -156,6 +158,7 @@ dependencies {
implementation("androidx.core:core-ktx:$corektxVersion")
implementation("androidx.activity:activity-ktx:$activityktxVersion")
implementation("com.google.code.gson:gson:$gsonVersion")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:$coreLibraryDesugaringVersion")

println("Using THEOplayer (${versionString(theoVersion)})")
implementation("com.theoplayer.theoplayer-sdk-android:core:$theoVersion")
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>10.12.0</modelVersion>
<modelVersion>11.0.0</modelVersion>
<groupId>com.theoplayer.theoplayer-sdk-android</groupId>
<artifactId>ads-wrapper</artifactId>
<version>10.12.0</version>
<version>11.0.0</version>
<packaging>aar</packaging>
<dependencies>
<!-- Include transitive dependencies -->
<dependency>
<groupId>com.theoplayer.theoplayer-sdk-android</groupId>
<artifactId>integration-ads-ima</artifactId>
<version>[10.0.0,11.0.0)</version>
<version>[11.0.0,12.0.0)</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<groupId>com.theoplayer.theoplayer-sdk-android</groupId>
<artifactId>ads-wrapper</artifactId>
<versioning>
<latest>10.12.0</latest>
<release>10.12.0</release>
<latest>11.0.0</latest>
<release>11.0.0</release>
<versions>
<version>10.12.0</version>
<version>11.0.0</version>
</versions>
<lastUpdated>20260318164412</lastUpdated>
<lastUpdated>20260410095400</lastUpdated>
</versioning>
</metadata>
14 changes: 7 additions & 7 deletions android/src/main/java/com/theoplayer/PlayerConfigAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,24 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
getMap(PROP_FEATURE_FLAGS)?.toHashMap()?.forEach { (key, value) ->
convertedMap[key] = value as String
}
featureFlags = convertedMap
setFeatureFlags(convertedMap)
}
// The maximum number of VAST redirects.
if (hasKey(PROP_MAX_REDIRECTS)) {
maxRedirects = getInt(PROP_MAX_REDIRECTS)
}
// The partner provided player type.
playerType = "THEOplayer"
setPlayerType("THEOplayer")
// The partner provided player version.
playerVersion = THEOplayerGlobal.getVersion()
setPlayerVersion(THEOplayerGlobal.getVersion())
// The Publisher Provided Identification (PPID) sent with ads request.
if (hasKey(PROP_PPID)) {
ppid = getString(PROP_PPID) ?: ""
setPpid(getString(PROP_PPID) ?: "")
}
// The session ID to identify a single user session. This should be a UUID. It
// is used exclusively for frequency capping across the user session.
if (hasKey(PROP_SESSION_ID)) {
sessionId = getString(PROP_PPID) ?: ""
setSessionId(getString(PROP_PPID) ?: "")
}
// Toggles debug mode which will output detailed log information to the console.
if (hasKey(PROP_ENABLE_DEBUG_MODE)) {
Expand All @@ -177,11 +177,11 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
enablePreloading = preloadTypeString !== "none"
}
if (hasKey(PROP_ALLOWED_MIMETYPES)) {
mimeTypes = ArrayList<String>().apply {
setMimeTypes(ArrayList<String>().apply {
getArray(PROP_ALLOWED_MIMETYPES)?.toArrayList()?.forEach {
add(it as String)
}
}
})
}
}
// bitrate and timeout are configured under the ima config
Expand Down
19 changes: 7 additions & 12 deletions android/src/main/java/com/theoplayer/ads/AdAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ object AdAdapter {
adPayload.putDouble(PROP_AD_HEIGHT, ad.imaAd.vastMediaHeight.toDouble())
adPayload.putString(PROP_AD_CONTENT_TYPE, ad.imaAd.contentType)
adPayload.putString(PROP_AD_DESCRIPTION, ad.imaAd.description)
} catch (ignore: Exception) {
} catch (_: Exception) {
// googleImaAd.getImaAd() is not known yet
}
val universalAdIdsPayload = Arguments.createArray()
Expand Down Expand Up @@ -142,7 +142,7 @@ object AdAdapter {
return adbreakPayload
}
adbreakPayload.putString(PROP_ADBREAK_INTEGRATION, adbreak.integration.type)
adbreakPayload.putString(PROP_ADBREAK_ID, adbreak.idAsString)
adbreakPayload.putString(PROP_ADBREAK_ID, adbreak.id)
adbreakPayload.putInt(PROP_ADBREAK_MAXDURATION,adbreak.maxDuration)
adbreakPayload.putInt(PROP_ADBREAK_TIMEOFFSET, adbreak.timeOffset)
adbreakPayload.putDouble(PROP_ADBREAK_MAXREMAININGDURATION, adbreak.maxRemainingDuration)
Expand Down Expand Up @@ -288,10 +288,15 @@ object AdAdapter {
return adBreak.getString(PROP_AD_CUSTOM_INTEGRATION)
}

@Deprecated("Deprecated in favor of getIdAsString()")
override fun getIdAsString(): String? {
return if (adBreak.hasKey(PROP_ADBREAK_ID)) adBreak.getString(PROP_ADBREAK_ID) else null
}

override fun getId(): String? {
return if (adBreak.hasKey(PROP_ADBREAK_ID)) adBreak.getString(PROP_ADBREAK_ID) else null
}

override fun getCustomData(): Any? {
// Not supported yet
return null
Expand Down Expand Up @@ -415,16 +420,6 @@ object AdAdapter {
return ad?.getString(PROP_AD_TRAFFICKING_PARAMETERS) ?: ""
}

@Deprecated("Deprecated in Java")
override fun getUniversalAdIdRegistry(): String {
return ""
}

@Deprecated("Deprecated in Java")
override fun getUniversalAdIdValue(): String {
return ad?.getString(PROP_UNIVERSAL_AD_ID_VALUE) ?: ""
}

override fun getCompanionAds(): List<com.google.ads.interactivemedia.v3.api.CompanionAd> {
return emptyList()
}
Expand Down
1 change: 0 additions & 1 deletion android/src/main/java/com/theoplayer/cast/CastModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class CastModule(context: ReactApplicationContext) : ReactContextBaseJavaModule(
PlayerCastState.AVAILABLE -> "available"
PlayerCastState.CONNECTED -> "connected"
PlayerCastState.CONNECTING -> "connecting"
PlayerCastState.UNAVAILABLE -> "unavailable"
else -> "unavailable"
}
}
Expand Down
27 changes: 10 additions & 17 deletions android/src/main/java/com/theoplayer/track/TrackListAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ private const val PROP_ENDDATE = "endDate"
private const val PROP_DURATION = "duration"
private const val PROP_PLANNED_DURATION = "plannedDuration"
private const val PROP_END_ON_NEXT = "endOnNext"
private const val PROP_SCTE35CMD = "scte35Cmd"
private const val PROP_SCTE35OUT = "scte35Out"
private const val PROP_SCTE35IN = "scte35In"
private const val PROP_CUSTOM_ATTRIBUTES = "customAttributes"

object TrackListAdapter {
Expand Down Expand Up @@ -167,13 +164,12 @@ object TrackListAdapter {
audioTrackPayload.putString(PROP_LABEL, audioTrack.label)
audioTrackPayload.putString(PROP_LANGUAGE, audioTrack.language)
audioTrackPayload.putBoolean(PROP_ENABLED, audioTrack.isEnabled)
val qualityList = audioTrack.qualities
val qualities = Arguments.createArray()
try {
qualityList?.forEach { quality ->
audioTrack.qualities.forEach { quality ->
qualities.pushMap(fromAudioQuality(quality))
}
} catch (ignore: NullPointerException) {
} catch (_: NullPointerException) {
}
audioTrackPayload.putArray(PROP_QUALITIES, qualities)
val activeQuality = audioTrack.activeQuality
Expand Down Expand Up @@ -214,18 +210,15 @@ object TrackListAdapter {
videoTrackPayload.putBoolean(PROP_ENABLED, videoTrack.isEnabled)
val qualities = Arguments.createArray()
try {
val qualityList = videoTrack.qualities
if (qualityList != null) {
// Sort qualities according to (height, bandwidth)
val sortedQualityList = QualityListAdapter(qualityList)
sortedQualityList.sort { o: VideoQuality, t1: VideoQuality ->
if (o.height == t1.height) t1.bandwidth.compareTo(o.bandwidth) else t1.height.compareTo(o.height)
}
for (quality in sortedQualityList) {
qualities.pushMap(fromVideoQuality(quality as VideoQuality))
}
// Sort qualities according to (height, bandwidth)
val sortedQualityList = QualityListAdapter(videoTrack.qualities)
sortedQualityList.sort { o: VideoQuality, t1: VideoQuality ->
if (o.height == t1.height) t1.bandwidth.compareTo(o.bandwidth) else t1.height.compareTo(o.height)
}
for (quality in sortedQualityList) {
qualities.pushMap(fromVideoQuality(quality as VideoQuality))
}
} catch (ignore: java.lang.NullPointerException) {
} catch (_: java.lang.NullPointerException) {
}
videoTrackPayload.putArray(PROP_QUALITIES, qualities)
val activeQuality = videoTrack.activeQuality
Expand Down
41 changes: 41 additions & 0 deletions doc/migrating-to-react-native-theoplayer-11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Migrating to THEOplayer React Native SDK 11.x

This article will guide you through updating to THEOplayer React Native SDK version 11 (from version 10),
and the changes needed in your code.

## Update React Native THEOplayer

Run the following command to install THEOplayer React Native SDK version 11:

```bash
npm install react-native-theoplayer@11
```

## Breaking API changes

- Removed deprecated `ResizeEvent` in favor of `DimensionChangeEvent`.
- Removed deprecated `player.theolive` property in favor of `player.theoLive`.
- Removed deprecated `source.integration` property in favor of `source.type`.

## Breaking Changes on Web

The breaking changes for the native Web SDK are listed in the v11 [changelog](https://optiview.dolby.com/docs/theoplayer/changelog/#-breaking-changes),
none of which impact the React Native SDK on Web.

## Breaking Changes on iOS

The breaking changes for the native Web SDK are listed in the v11 [changelog](https://optiview.dolby.com/docs/theoplayer/changelog/#-breaking-changes-2).

The following updates in particular impact the React Native SDK on iOS.

- The minimum supported iOS/tvOS version is now 15.0, dropping support for iOS/tvOS 13 and 14.

## Breaking Changes on Android

The breaking changes for the native Android SDK are listed in the v11 [changelog](https://optiview.dolby.com/docs/theoplayer/changelog/#-breaking-changes-1).

The following updates in particular impact the React Native SDK on Android.

- The Google IMA SDK integration now requires [core library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) to be enabled.
See [our updated guide for Google IMA](https://optiview.dolby.com/docs/theoplayer/how-to-guides/ads/google-ima/#android-sdk) for instructions, or the
React Native THEOplayer [example app](https://github.com/THEOplayer/react-native-theoplayer/tree/develop/example) for a sample implementation.
5 changes: 5 additions & 0 deletions e2e/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ android {
keyPassword 'android'
}
}
compileOptions {
coreLibraryDesugaringEnabled true
}
buildTypes {
debug {
signingConfig signingConfigs.debug
Expand All @@ -119,6 +122,8 @@ dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")

if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,20 @@ import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader
import com.theoplayer.ReactTHEOplayerPackage

class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost =
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
override val reactHost: ReactHost by lazy {
getDefaultReactHost(
context = applicationContext,
packageList =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
add(ReactTHEOplayerPackage())
}

override fun getJSMainModuleName(): String = "index"

override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG

override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}

override val reactHost: ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
},
)
}

override fun onCreate() {
super.onCreate()
Expand Down
4 changes: 2 additions & 2 deletions e2e/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ buildscript {
ndkVersion = "29.0.14033849"
castFrameworkVersion = "22.0.0"
kotlinVersion = "2.2.10"
agpVersion = "8.12.3"
rnrepoVersion = "0.2.1"
agpVersion = "8.13.0"
rnrepoVersion = "0.2.2"
}
repositories {
google()
Expand Down
6 changes: 3 additions & 3 deletions e2e/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ newArchEnabled=true
hermesEnabled=true

# Version of the THEOplayer SDK, if not specified, the latest available version within bounds is set.
#THEOplayer_sdk=[10.10.0, 11.0.0)
#THEOplayer_sdk=[11.0.0, 12.0.0)

# Override Android sdk versions
#THEOplayer_compileSdkVersion = 34
#THEOplayer_compileSdkVersion = 36
#THEOplayer_minSdkVersion = 21
#THEOplayer_targetSdkVersion = 34
#THEOplayer_targetSdkVersion = 36

# Toggle player event logging using tag 'VideoPlayer' (default: false)
#THEOplayer_logPlayerEvents = true
Expand Down
Loading
Loading