Constructor
new UITextDisplayer(video, videoContainer)
Constructor.
Parameters:
Name | Type | Description |
---|---|---|
video |
HTMLMediaElement | |
videoContainer |
HTMLElement |
- Implements:
- Source:
Members
Methods
convertLengthValue_(lengthValue, cuenon-null, videoContainer) → {string}
Converts length value to an absolute value in pixels.
If lengthValue is already an absolute value it will not
be modified. Relative lengthValue will be converted to an
absolute value in pixels based on Computed Cell Size
Parameters:
Name | Type | Description |
---|---|---|
lengthValue |
string | |
cue |
shaka.extern.Cue | |
videoContainer |
HTMLElement |
- Source:
Returns:
- Type
- string
getAbsoluteLengthInPixels_(value, cuenon-null, videoContainer) → {string}
Returns computed absolute length value in pixels based on cell
and a video container size
Parameters:
Name | Type | Description |
---|---|---|
value |
number | |
cue |
shaka.extern.Cue | |
videoContainer |
HTMLElement |
- Source:
Returns:
- Type
- string
getLengthValueInfo_(lengthValuenullable) → {?{ value: number, unit: string }}
Returns info about provided lengthValue
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
lengthValue |
string |
<nullable> |
- Source:
Returns:
- Type
- ?{ value: number, unit: string }
Example
100px => { value: 100, unit: 'px' }
append(cuesnon-null)
Append given text cues to the list of cues to be displayed.
Parameters:
Name | Type | Description |
---|---|---|
cues |
Array.<!shaka.text.Cue> | Text cues to be appended. |
- Implements:
- Source:
displayCue_(container, cuenon-null)
Displays a cue
Parameters:
Name | Type | Description |
---|---|---|
container |
Element | |
cue |
shaka.extern.Cue |
- Source:
displayLeafCue_(container, cuenon-null, isNested) → {Element}
Displays a nested cue
Parameters:
Name | Type | Description |
---|---|---|
container |
Element | |
cue |
shaka.extern.Cue | |
isNested |
boolean |
- Source:
Returns:
the created captions container
- Type
- Element
isTextVisible() → {boolean}
Returns true if text is currently visible.
- Implements:
- Source:
Returns:
- Type
- boolean
remove(startTime, endTime) → {boolean}
Remove all cues that are fully contained by the given time range (relative
to the presentation).
endTime
will be greater to equal to
startTime
. remove
should only return
false
if the displayer has been destroyed. If the displayer
has not been destroyed remove
should return true
.
Parameters:
Name | Type | Description |
---|---|---|
startTime |
number | |
endTime |
number |
- Implements:
- Source:
Returns:
- Type
- boolean
setCaptionStyles_(captionsnon-null, cuenon-null, isNested)
Parameters:
Name | Type | Description |
---|---|---|
captions |
HTMLElement | |
cue |
shaka.extern.Cue | |
isNested |
boolean |
- Source:
setTextVisibility(on)
Set text visibility.
Parameters:
Name | Type | Description |
---|---|---|
on |
boolean |
- Implements:
- Source:
updateCaptions_(forceUpdateopt)
Display the current captions.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
forceUpdate |
boolean |
<optional> |
false |
- Source: