fix(ios): disables subtitles for none and empty track types (#4319)

This commit is contained in:
proohit 2024-12-04 15:35:51 +01:00 committed by GitHub
parent d757a44bb1
commit 1033c9d4f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,7 @@ enum RCTPlayerOperations {
var selectedTrackIndex: Int = RCTVideoUnset var selectedTrackIndex: Int = RCTVideoUnset
if type == "disabled" { if (type == "disabled") || (type == "none") || (type == "") {
// Select the last text index which is the disabled text track // Select the last text index which is the disabled text track
selectedTrackIndex = trackCount - firstTextIndex selectedTrackIndex = trackCount - firstTextIndex
} else if type == "language" { } else if type == "language" {
@ -92,7 +92,7 @@ enum RCTPlayerOperations {
return return
} }
if type == "disabled" { if (type == "disabled") || (type == "none") || (type == "") {
// 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") {
let value = criteria?.value as? String let value = criteria?.value as? String