Class: Context
VxdkContext class that manages the overall context of the video player
Extends
EventController
Constructors
new Context()
new Context(
$selector,options):Context
Constructor for VxdkContext
Parameters
• $selector: HTMLElement
The HTML element to attach the player to
• options: Partial<Options>
The initial options for the player
Returns
Overrides
EventController.constructor
Defined in
modules/context/context.ts:61 (opens in a new tab)
Properties
bridge
readonlybridge:PlatformBridgeController
Platform bridge controller
Defined in
modules/context/context.ts:29 (opens in a new tab)
id
readonlyid:string
Unique identifier for this context
Defined in
modules/context/context.ts:32 (opens in a new tab)
Accessors
$uiContainer
get$uiContainer():HTMLElement
Gets the UI container element
Returns
HTMLElement
The UI container element
Defined in
modules/context/context.ts:185 (opens in a new tab)
controller
getcontroller():Controller
Gets the VxdkController instance
Returns
The VxdkController instance
Defined in
modules/context/context.ts:102 (opens in a new tab)
options
getoptions():OptionsController
Gets the current options
Returns
OptionsController
The current options controller
Defined in
modules/context/context.ts:86 (opens in a new tab)
playback
getplayback():Playback<any>
Gets the current playback instance
Returns
Playback<any>
The current playback instance
Defined in
modules/context/context.ts:177 (opens in a new tab)
plugins
getplugins():Plugin<any>[]
Gets all loaded plugins
Returns
Plugin<any>[]
An array of all loaded plugins
Defined in
modules/context/context.ts:193 (opens in a new tab)
state
getstate():State
Gets the current state of the player
Returns
The current state
Defined in
modules/context/context.ts:250 (opens in a new tab)
storage
getstorage():StorageController
Gets the storage controller
Returns
StorageController
The storage controller
Defined in
modules/context/context.ts:94 (opens in a new tab)
uiPlugins
getuiPlugins():UiPlugin<any>[]
Gets all UI plugins
Returns
UiPlugin<any>[]
An array of all UI plugins
Defined in
modules/context/context.ts:201 (opens in a new tab)
version
getversion():string
Gets the version of the player
Returns
string
The version string
Defined in
modules/context/context.ts:258 (opens in a new tab)
Methods
destroy()
destroy():
void
Destroys the player instance
Returns
void
Defined in
modules/context/context.ts:239 (opens in a new tab)
emit()
emit(
name,data?):void
Parameters
• name: string | number
• data?: undefined
Returns
void
Inherited from
EventController.emit
Defined in
modules/events/event.controller.ts:20 (opens in a new tab)
emitIfChanged()
emitIfChanged(
name,data):void
Parameters
• name: string | number
• data: any
Returns
void
Inherited from
EventController.emitIfChanged
Defined in
modules/events/event.controller.ts:27 (opens in a new tab)
getPlugin()
getPlugin<
T>(pluginClass):T
Gets a plugin by its class
Type Parameters
• T extends Plugin<any>
Parameters
• pluginClass: ModuleClass<T>
The class of the plugin
Returns
T
The plugin instance
Throws
If the plugin is not found
Defined in
modules/context/context.ts:289 (opens in a new tab)
getPluginByName()
getPluginByName<
T>(name):T
Gets a plugin by its name
Type Parameters
• T extends Plugin<any>
Parameters
• name: string
The name of the plugin
Returns
T
The plugin instance
Throws
If the plugin is not found
Defined in
modules/context/context.ts:269 (opens in a new tab)
off()
off(
name,listener):void
Parameters
• name: string | number
• listener: Listener<void>
Returns
void
Inherited from
EventController.off
Defined in
modules/events/event.controller.ts:31 (opens in a new tab)
on()
on(
name,listener):Disposable
Parameters
• name: string | number
• listener: Listener<void>
Returns
Inherited from
EventController.on
Defined in
modules/events/event.controller.ts:35 (opens in a new tab)
once()
once(
name,listener):void
Parameters
• name: string | number
• listener: Listener<void>
Returns
void
Inherited from
EventController.once
Defined in
modules/events/event.controller.ts:39 (opens in a new tab)
registerEvents()
registerEvents(
eventNames):void
Parameters
• eventNames: string[]
Returns
void
Inherited from
EventController.registerEvents
Defined in
modules/events/event.controller.ts:43 (opens in a new tab)
setOptions()
setOptions(
options):void
Sets new options for the player
Parameters
• options: Partial<Options>
The new options to set
Returns
void
Defined in
modules/context/context.ts:163 (opens in a new tab)
unregisterEvents()
protectedunregisterEvents():void
Returns
void
Inherited from
EventController.unregisterEvents
Defined in
modules/events/event.controller.ts:49 (opens in a new tab)
init()
staticinit(element,options):Context
Initializes a new VxdkContext
Parameters
• element: HTMLElement
The HTML element to attach the player to
• options: Partial<Options>
The initial options for the player
Returns
A new VxdkContext instance