Merge pull request #2935 from jemise111/fix-ios-text-tracks
Guard against setting text tracks before player is initialized
This commit is contained in:
commit
394c43165a
@ -11,6 +11,7 @@
|
|||||||
- Added "homepage" to package.json [#2882](https://github.com/react-native-video/react-native-video/pull/2882)
|
- Added "homepage" to package.json [#2882](https://github.com/react-native-video/react-native-video/pull/2882)
|
||||||
- Fix regression when fullscreen prop is used combined with controls [#2911](https://github.com/react-native-video/react-native-video/pull/2911)
|
- Fix regression when fullscreen prop is used combined with controls [#2911](https://github.com/react-native-video/react-native-video/pull/2911)
|
||||||
- Fix: memory leak issue on iOS [#2907](https://github.com/react-native-video/react-native-video/pull/2907)
|
- Fix: memory leak issue on iOS [#2907](https://github.com/react-native-video/react-native-video/pull/2907)
|
||||||
|
- Fix setting text tracks before player is initialized on iOS [#2935](https://github.com/react-native-video/react-native-video/pull/2935)
|
||||||
|
|
||||||
### Version 6.0.0-alpha.3
|
### Version 6.0.0-alpha.3
|
||||||
|
|
||||||
|
@ -133,6 +133,8 @@ enum RCTPlayerOperations {
|
|||||||
let group:AVMediaSelectionGroup! = player?.currentItem?.asset.mediaSelectionGroup(forMediaCharacteristic: characteristic)
|
let group:AVMediaSelectionGroup! = player?.currentItem?.asset.mediaSelectionGroup(forMediaCharacteristic: characteristic)
|
||||||
var mediaOption:AVMediaSelectionOption!
|
var mediaOption:AVMediaSelectionOption!
|
||||||
|
|
||||||
|
guard group != nil else { return }
|
||||||
|
|
||||||
if (type == "disabled") {
|
if (type == "disabled") {
|
||||||
// Do nothing. We want to ensure option is nil
|
// Do nothing. We want to ensure option is nil
|
||||||
} else if (type == "language") || (type == "title") {
|
} else if (type == "language") || (type == "title") {
|
||||||
|
Loading…
Reference in New Issue
Block a user