Skip to main content

Functions

isSignIsocode

static func isSignIsocode(_ isocode: String?) -> Bool

A sign rendition is identified by its isocode: a known ISO 639-3 sign language (shared-module map, web parity) or the legacy RFC 5646 "sgn-…" form used by packages created before the backend switched to bare 639-3 tags (#19499).

isSignTrackId

static func isSignTrackId(_ id: String?) -> Bool

True if a track id denotes a sign rendition.

matchSignTrack

static func matchSignTrack(_ idOrIsocode: String, in tracks: [VideoTrack]) -> VideoTrack?

Match a sign track by exact id OR exact (case-insensitive) isocode — never a substring, so "sgn" / "s" don't spuriously match the first sign track. Backs the public setSignLanguage API (callApiMethod(.setsignlanguage)); not used by the SDK's own chrome.

playoutAllowsButton

static func playoutAllowsButton(_ flag: String?) -> Bool

The sign button/menu is shown unless the playout explicitly hides it (web parity: != "Hide").

publicVideoTracks

static func publicVideoTracks(_ tracks: [VideoTrack]) -> [VideoTrack]?

Web parity: the public videoTracks list is meaningful only when there's a real choice (main + at least one sign track). Returns nil when there are <= 1 tracks.

shouldAnnounce

static func shouldAnnounce(wasActive: Bool, nowActive: Bool) -> Bool

Announce only when the sign-active state actually flips — avoids double-announce on the button path and spurious announcements on non-sign video-track changes.

signIsoToRestore

static func signIsoToRestore(lastActive: String?, available availableSignIsos: [String], first firstSignIso: String?) -> String?

Which sign-language isocode the on/off toggle should restore (#19486): the last-active one when it's still available on the current clip, otherwise the first available sign isocode. Case-insensitive. Returns nil only when there is no sign track at all.

trackId

static func trackId(forIsocode isocode: String?) -> String

The track id for a sign rendition with the given isocode (e.g. "sgn-NL" -> "sgn-NL_sign").