YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.fcast.FCastTrackChoices Class Reference

What the sheet of a version 4 receiver offers for tracks, subtitles and capabilities (task 7.4): the choices of the audio and the subtitle picker, the label of a track, the text of the formats the receiver can play, and which address a subtitle may have. More...

Collaboration diagram for de.yaacc.fcast.FCastTrackChoices:
Collaboration graph

Classes

class  Choice
 One line of a picker: the track's id, or null for "off".
 
enum  Group
 The lines of capabilityLines. More...
 
interface  Labels
 The words of the user's language. More...
 

Static Public Member Functions

static List< Choice > audio (List< FCastTrack > tracks, Labels labels)
 The audio tracks, in the order of the receiver; empty if there is none (then the sheet has no audio row).
 
static List< Choice > subtitles (List< FCastTrack > tracks, Labels labels)
 "Off" and the subtitle tracks.
 
static int selectedIndex (List< Choice > choices, Long selectedId)
 The index of the selected track; for no selection the index of "off" (0) if there is one, else -1.
 
static String label (FCastTrack track, Labels labels)
 The title if there is one (with the language in brackets when it adds something), else the language, else "Track n".
 
static List< String > capabilityLines (FCastCapabilities caps, Labels labels)
 The lines of "what the receiver can play", only the groups that have something.
 
static boolean isAcceptableSubtitleUrl (String text)
 Is this text an address the receiver may fetch a subtitle from: http or https, a host, no spaces or control characters, at most {@value MAX_SUBTITLE_URL} characters.
 

Static Public Attributes

static final int MAX_SUBTITLE_URL = 2048
 The most characters of a subtitle address (the same limit as a URL of an item).
 

Detailed Description

What the sheet of a version 4 receiver offers for tracks, subtitles and capabilities (task 7.4): the choices of the audio and the subtitle picker, the label of a track, the text of the formats the receiver can play, and which address a subtitle may have.

Pure: the words come from Labels.

Member Function Documentation

◆ isAcceptableSubtitleUrl()

static boolean de.yaacc.fcast.FCastTrackChoices.isAcceptableSubtitleUrl ( String text)
static

Is this text an address the receiver may fetch a subtitle from: http or https, a host, no spaces or control characters, at most {@value MAX_SUBTITLE_URL} characters.

The receiver fetches it itself, so nothing else (no file, content or script scheme) is let through.


The documentation for this class was generated from the following file: