Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Update Bitmovin's native Android SDK version to `3.142.0+jason`

### Added

- Android: TweaksConfig option `enableDrmLicenseRenewRetry` to retry renewing a DRM license when the first renewal attempt fails

## [1.9.0] - 2026-02-13

### Changed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,34 +181,40 @@ private fun String.toForceReuseVideoCodecReason(): ForceReuseVideoCodecReason? =
else -> null
}

fun Map<String, Any?>.toTweaksConfig(): TweaksConfig = TweaksConfig().apply {
withDouble("timeChangedInterval") { timeChangedInterval = it }
withInt("bandwidthEstimateWeightLimit") {
bandwidthMeterType = BandwidthMeterType.Default(
bandwidthEstimateWeightLimit = it,
)
}
withMap("devicesThatRequireSurfaceWorkaround") { devices ->
val deviceNames = devices.withStringArray("deviceNames") {
it.filterNotNull().map(::DeviceName)
} ?: emptyList()
val modelNames = devices.withStringArray("modelNames") {
it.filterNotNull().map(::DeviceName)
} ?: emptyList()
devicesThatRequireSurfaceWorkaround = deviceNames + modelNames
}
withBoolean("languagePropertyNormalization") { languagePropertyNormalization = it }
withDouble("localDynamicDashWindowUpdateInterval") { localDynamicDashWindowUpdateInterval = it }
withBoolean("useDrmSessionForClearPeriods") { useDrmSessionForClearPeriods = it }
withBoolean("useDrmSessionForClearSources") { useDrmSessionForClearSources = it }
withBoolean("useFiletypeExtractorFallbackForHls") { useFiletypeExtractorFallbackForHls = it }
withStringArray("forceReuseVideoCodecReasons") {
forceReuseVideoCodecReasons = it
.filterNotNull()
.mapNotNull(String::toForceReuseVideoCodecReason)
.toSet()
}
}
fun Map<String, Any?>.toTweaksConfig(): TweaksConfig =
TweaksConfig.Builder().apply {
withBoolean("enableDrmLicenseRenewRetry") { setEnableDrmLicenseRenewRetry(it) }
withDouble("timeChangedInterval") { setTimeChangedInterval(it) }
withInt("bandwidthEstimateWeightLimit") {
setBandwidthMeterType(
BandwidthMeterType.Default(
bandwidthEstimateWeightLimit = it,
)
)
}
withMap("devicesThatRequireSurfaceWorkaround") { devices ->
val deviceNames = devices.withStringArray("deviceNames") {
it.filterNotNull().map(::DeviceName)
} ?: emptyList()
val modelNames = devices.withStringArray("modelNames") {
it.filterNotNull().map(::DeviceName)
} ?: emptyList()
setDevicesThatRequireSurfaceWorkaround(deviceNames + modelNames)
}
withBoolean("languagePropertyNormalization") { setLanguagePropertyNormalization(it) }
withDouble("localDynamicDashWindowUpdateInterval") { setLocalDynamicDashWindowUpdateInterval(it) }
withBoolean("useDrmSessionForClearPeriods") { setUseDrmSessionForClearPeriods(it) }
withBoolean("useDrmSessionForClearSources") { setUseDrmSessionForClearSources(it) }
withBoolean("useFiletypeExtractorFallbackForHls") { setUseFiletypeExtractorFallbackForHls(it) }
withStringArray("forceReuseVideoCodecReasons") {
setForceReuseVideoCodecReasons(
it
.filterNotNull()
.mapNotNull(String::toForceReuseVideoCodecReason)
.toSet()
)
}
}.build()

fun Map<String, Any?>.toAdvertisingConfig(): AdvertisingConfig? {
val schedule = getArray("schedule")?.toMapList()?.mapNotNull { it?.toAdItem() } ?: emptyList()
Expand Down
8 changes: 8 additions & 0 deletions src/tweaksConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ export interface TweaksConfig {
* @platform Android
*/
useFiletypeExtractorFallbackForHls?: boolean;
/**
* If enabled, the player will retry renewing a DRM license in case the first renewal attempt fails.
* This can help maintain playback for long-running sessions where the license might expire.
*
* @defaultValue `false`
* @platform Android
*/
enableDrmLicenseRenewRetry?: boolean;
/**
* Determines whether `AVKit` should update Now Playing information automatically when using System UI.
*
Expand Down