Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EventConfig

A mapping of PlayerEvent values to event handler callback functions.

Events can also be dynamically added and removed through PlayerAPI.on and PlayerAPI.off.

Example:

events : {
  [PlayerEvent.SourceLoaded]: (data) => {
    console.log('version: ' + this.getVersion() + ', onReady Event data: ', data);
  },
  [PlayerEvent.Play]: (data) => {
    // do awesome stuff
  },
  [PlayerEvent.Error]: (data) => {
    console.error('An error occurred:', data);
  }
}

Hierarchy

  • EventConfig

Indexable

[event: string]: PlayerEventCallback

A mapping of PlayerEvent values to event handler callback functions.

Events can also be dynamically added and removed through PlayerAPI.on and PlayerAPI.off.

Example:

events : {
  [PlayerEvent.SourceLoaded]: (data) => {
    console.log('version: ' + this.getVersion() + ', onReady Event data: ', data);
  },
  [PlayerEvent.Play]: (data) => {
    // do awesome stuff
  },
  [PlayerEvent.Error]: (data) => {
    console.error('An error occurred:', data);
  }
}

Generated using TypeDoc