Skip to content

Commit

Permalink
fix(ios): disables subtitles for none and empty track types (#4319)
Browse files Browse the repository at this point in the history
  • Loading branch information
proohit authored Dec 4, 2024
1 parent d757a44 commit 1033c9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/Video/Features/RCTPlayerOperations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ enum RCTPlayerOperations {

var selectedTrackIndex: Int = RCTVideoUnset

if type == "disabled" {
if (type == "disabled") || (type == "none") || (type == "") {
// Select the last text index which is the disabled text track
selectedTrackIndex = trackCount - firstTextIndex
} else if type == "language" {
Expand Down Expand Up @@ -92,7 +92,7 @@ enum RCTPlayerOperations {
return
}

if type == "disabled" {
if (type == "disabled") || (type == "none") || (type == "") {
// Do nothing. We want to ensure option is nil
} else if (type == "language") || (type == "title") {
let value = criteria?.value as? String
Expand Down

0 comments on commit 1033c9d

Please sign in to comment.