Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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,32 +181,42 @@ 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,
)
fun Map<String, Any?>.toTweaksConfig(): TweaksConfig {
val renewRetry = this["enableDrmLicenseRenewRetry"] as? Boolean
val cfg = if (renewRetry != null) {
// enableDrmLicenseRenewRetry is a val in the SDK, so it must be set via constructor
TweaksConfig(enableDrmLicenseRenewRetry = renewRetry)
} else {
TweaksConfig()
}
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()

return cfg.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()
}
}
}

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
Loading