Constructor
new Bitmapsub(player, optionsopt)
TODO: passthrough subtitle
TODO: don't display subtitle if player won't play
Create a Bitmapsub plugin instance.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
player |
Player | A Video.js Player instance. | |
options |
Object |
<optional> |
An optional options object. While not a core part of the Video.js plugin architecture, a second argument of options is a convenient way to accept inputs from your plugin's caller. |
Methods
adjustSubtitleBottom()
adding extra bottom space based on arbitrary video height fraction
changeTrack(id)
change track to track id
Parameters:
| Name | Type | Description |
|---|---|---|
id |
int | vjstrack id |
disableSubtitle()
unselected all bitmap subtitle entries
select 'subtitle off' in menu
TODO: test if other subtitle available
handleBitmapSubtitle()
display bitmap subtitle by creating a window arround on a big tile image of subtitles
handlePlayerResize()
handle bitmap subtitle component size on player resize
init()
Initialize plugin: search against track if plugin can handle one
append bitmap subtitle component
create corresponding menu subtitles entries and click handlers
handle default track if exists
append event listeners, on screen size change, fullscreen change, and cue change
selectItem(item)
select a bitmap subtitle into the menu
Parameters:
| Name | Type | Description |
|---|---|---|
item |
int | need to be completed todo |