Constructor
new Title(player, parent, optionsopt)
Creates an instance of the Title component.
| Name | Type | Attributes | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
player |
Player |
Reference to the VisionPlayer instance. |
|||||||||
parent |
Controller |
Reference to the parent instance. |
|||||||||
options |
Object | optional |
Additional options.
|
Members
private #config :Object
Configuration options for the Title component.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
showSecondary
|
boolean | optional | true | Shows the secondary title. |
private #player :Player
private #subscriptions :Array<number>
Holds tokens of subscriptions to player events, for later unsubscribe.
private #subSecondary :Array<number>
private #apiKey :symbol
Secret key only known to the player instance and initialized components. Used to be able to restrict access to API methods in conjunction with secure mode.
private #dom :DomSmith
private #title :string
private #titleSecondary
private #resizeId :number
Methods
private #onDataReady(mediaItem)
Called once the media data is available. Extracts title and secondary title, and sets up UI show/hide if needed.
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mediaItem |
Data~mediaItem |
Object containing media info.
|
- Listens
- data/ready
- Source
- Title.js, line 128
private #onMediaReady()
Called when the media is ready for playback. Translates and displays the title if not hidden.
- Listens
- media/ready
- Source
- Title.js, line 153
private #show()
private #hide()
private #resize()
Called on UI resize events. Adjusts a CSS variable to place other UI elements below the title.