Guard against setting text tracks before player is initialized
This commit is contained in:
parent
95b297df62
commit
a39dca28a8
@ -132,6 +132,8 @@ enum RCTPlayerOperations {
|
|||||||
let type = criteria?.type
|
let type = criteria?.type
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user