Merge pull request #2181 from awinograd/patch-1

Fix default behavior for captions in ExoPlayer
This commit is contained in:
Eran Hammer 2022-04-19 15:31:43 -07:00 committed by GitHub
commit ed6ff41971
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@
### Version 5.1.0-alpha9 ### Version 5.1.0-alpha9
- Add ARM64 support for windows [#2137](https://github.com/react-native-community/react-native-video/pull/2137) - Add ARM64 support for windows [#2137](https://github.com/react-native-community/react-native-video/pull/2137)
- Fix default closed captioning behavior for Android ExoPlayer [#2181](https://github.com/react-native-video/react-native-video/pull/2181)
- Fix deprecated API bug for windows [#2119](https://github.com/react-native-video/react-native-video/pull/2119) - Fix deprecated API bug for windows [#2119](https://github.com/react-native-video/react-native-video/pull/2119)
- Added `rate` property and autolinking support for windows [#2206](https://github.com/react-native-video/react-native-video/pull/2206) - Added `rate` property and autolinking support for windows [#2206](https://github.com/react-native-video/react-native-video/pull/2206)

View File

@ -1193,7 +1193,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);