Methods
(static) availSubtitleTrackIdx(video, sub_idx) → {integer}
Roku translates the info provided in subtitleTracks into availableSubtitleTracks Including ignoring tracks, if they are not understood, thus making indexing unpredictable. This function translates between our internel selected subtitle index and the corresponding index in availableSubtitleTracks.
Parameters:Name | Type | Description |
---|
video | dynamic | |
sub_idx | dynamic | |
(static) changeSubtitleDuringPlayback(newid) → {void}
Parameters:Name | Type | Description |
---|
newid | dynamic | |
(static) defaultSubtitleTrack(sorted_subtitles, require_textopt) → {integer}
Identify the default subtitle track if "requires_text" is true, only return a track if it is textual This allows forcing text subs, since roku requires transcoding of non-text subs returns the server-side track index for the appriate subtitle
Parameters:Name | Type | Attributes | Default | Description |
---|
sorted_subtitles | dynamic | | | |
require_text | dynamic | <optional>
| false | |
(static) defaultSubtitleTrackFromVid(video_id) → {integer}
Identify the default subtitle track for a given video id returns the server-side track index for the appriate subtitle
Parameters:Name | Type | Description |
---|
video_id | dynamic | |
(static) getSubtitleLanguages() → {dynamic}
(static) getSubtitleSelIdxFromSubIdx(subtitles, sub_idx) → {integer}
The subtitle index on the server differs from the index we track locally This function converts the former into the latter
Parameters:Name | Type | Description |
---|
subtitles | dynamic | |
sub_idx | dynamic | |
(static) selectSubtitleTrack(tracks, currentopt) → {integer}
Parameters:Name | Type | Attributes | Default | Description |
---|
tracks | dynamic | | | |
current | dynamic | <optional>
| -1 | |
(static) selectSubtitleTrackDialog(tracks, currentTrackopt) → {dynamic}
Present Dialog to user to select subtitle track
Parameters:Name | Type | Attributes | Default | Description |
---|
tracks | dynamic | | | |
currentTrack | dynamic | <optional>
| -1 | |
(static) setupSubtitle(video, subtitles, subtitle_idxopt) → {integer}
Given a set of subtitles, and a subtitle index (the index on the server, not in the list provided) this will set all relevant settings for roku (mainly closed captions) and return the index of the subtitle track specified, but indexed based on the provided list of subtitles
Parameters:Name | Type | Attributes | Default | Description |
---|
video | dynamic | | | |
subtitles | dynamic | | | |
subtitle_idx | dynamic | <optional>
| -1 | |
(static) sortSubtitles(id, MediaStreams) → {dynamic}
Checks available subtitle tracks and puts subtitles in forced, default, and non-default/forced but preferred language at the top
Parameters:Name | Type | Description |
---|
id | string | |
MediaStreams | dynamic | |
(static) turnoffSubtitles() → {void}