- Source:
Methods
-
<static> availSubtitleTrackIdx(video, sub_idx)
-
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 - Source:
Returns:
- Type
- integer
-
<static> changeSubtitleDuringPlayback(newid)
-
Parameters:
Name Type Description newid
dynamic - Source:
Returns:
- Type
- void
-
<static> defaultSubtitleTrack(sorted_subtitles [, require_text])
-
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 subtitleParameters:
Name Type Argument Default Description sorted_subtitles
dynamic require_text
dynamic <optional>
false - Source:
Returns:
- Type
- integer
-
<static> defaultSubtitleTrackFromVid(video_id)
-
Identify the default subtitle track for a given video id
returns the server-side track index for the appriate subtitleParameters:
Name Type Description video_id
dynamic - Source:
Returns:
- Type
- integer
-
<static> getSubtitleLanguages()
-
- Source:
Returns:
- Type
- dynamic
-
<static> getSubtitleSelIdxFromSubIdx(subtitles, sub_idx)
-
The subtitle index on the server differs from the index we track locally
This function converts the former into the latterParameters:
Name Type Description subtitles
dynamic sub_idx
dynamic - Source:
Returns:
- Type
- integer
-
<static> selectSubtitleTrack(tracks [, current])
-
Parameters:
Name Type Argument Default Description tracks
dynamic current
dynamic <optional>
-1 - Source:
Returns:
- Type
- integer
-
<static> selectSubtitleTrackDialog(tracks [, currentTrack])
-
Present Dialog to user to select subtitle track
Parameters:
Name Type Argument Default Description tracks
dynamic currentTrack
dynamic <optional>
-1 - Source:
Returns:
- Type
- dynamic
-
<static> setupSubtitle(video, subtitles [, subtitle_idx])
-
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 subtitlesParameters:
Name Type Argument Default Description video
dynamic subtitles
dynamic subtitle_idx
dynamic <optional>
-1 - Source:
Returns:
- Type
- integer
-
<static> sortSubtitles(id, MediaStreams)
-
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 - Source:
Returns:
- Type
- dynamic
-
<static> turnoffSubtitles()
-
- Source:
Returns:
- Type
- void