Fix subtitle outline width not applying in release builds (#1687)
## Description Fix applying the subtitle outline width in ExoPlayer for release builds The outline width field isn't public, so reflection is used to bypass and modify it. Since proguard/r8 renames all of the classes and fields, this meant the field was no longer found. The fix is to have proguard preserve the necessary field names. ### Related issues Fixes #1681 ### Testing Emulator w/ release build ## Screenshots N/a ## AI or LLM usage None
This commit is contained in:
parent
26124a5348
commit
f74306a12c
2 changed files with 14 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
package com.github.damontecres.wholphin.util
|
||||
|
||||
import androidx.annotation.OptIn
|
||||
import androidx.media3.common.util.UnstableApi
|
||||
import androidx.media3.ui.SubtitleView
|
||||
import timber.log.Timber
|
||||
import java.lang.reflect.Field
|
||||
|
|
@ -7,6 +9,7 @@ import java.lang.reflect.Field
|
|||
/**
|
||||
* Utility class to override private fields in media3's [SubtitleView]
|
||||
*/
|
||||
@OptIn(UnstableApi::class)
|
||||
class Media3SubtitleOverride(
|
||||
val outlineThicknessPx: Float,
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue