From 1033c9d4f3db7042a96e7108a7fe9f1567d69ded Mon Sep 17 00:00:00 2001 From: proohit <46965017+proohit@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:35:51 +0100 Subject: [PATCH] fix(ios): disables subtitles for `none` and `empty` track types (#4319) --- ios/Video/Features/RCTPlayerOperations.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Video/Features/RCTPlayerOperations.swift b/ios/Video/Features/RCTPlayerOperations.swift index d1ca88a9..4b579a05 100644 --- a/ios/Video/Features/RCTPlayerOperations.swift +++ b/ios/Video/Features/RCTPlayerOperations.swift @@ -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" { @@ -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