Fix default behavior for captions in ExoPlayer

This commit is contained in:
Alec Winograd 2020-10-15 11:17:49 -05:00 committed by GitHub
parent faf8aed29b
commit 5f1ec04cef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1134,7 +1134,7 @@ class ReactExoplayerView extends FrameLayout implements
} }
} }
} }
} else if (rendererIndex == C.TRACK_TYPE_TEXT && Util.SDK_INT > 18) { // Text default } else if (trackType == C.TRACK_TYPE_TEXT && Util.SDK_INT > 18) { // Text default
// Use system settings if possible // Use system settings if possible
CaptioningManager captioningManager CaptioningManager captioningManager
= (CaptioningManager)themedReactContext.getSystemService(Context.CAPTIONING_SERVICE); = (CaptioningManager)themedReactContext.getSystemService(Context.CAPTIONING_SERVICE);