Class: CustomEvents

@bldr/vue-plugin-media~CustomEvents

A simple wrapper class for a custom event system. Used in the classes Sample() and Player().

new CustomEvents ()

Members

callbacks_ Object

An object of callback functions

Methods

on (name, callback)

Register callbacks for specific custom event.

Name Type Description
name String

The name of the event. Should be in lowercase, for example fadeoutbegin.

callback function

A function which gets called when the event is triggered.

trigger (name, args)

Trigger a custom event.

Name Type Description
name String

The name of the event. Should be in lowercase, for example fadeoutbegin.

args Mixed

One ore more additonal arguments to pass through the callbacks.