# Player

# Instances

  • Audio: AudioPlayer extends AbstractPlayer

  • Video: VideoPlayer extends AbstractPlayer

# Parameters

  • element Element

  • options Object null

  new Player.Audio(element, options);
1

# dispatch

Dispatch a player event.

# Parameters

  • event Event

# Return Value

void

  player.dispatch(event);
1

# listen

Handle a player event.

# Parameters

  • event string

  • callback Function

# Return Value

void

  player.listen(event, callback);
1

# enableKeyboard

Enable keyboard support.

# Return Value

void

  player.enableKeyboard();
1

# disableKeyboard

Disable keyboard support.

# Return Value

void

  player.disableKeyboard();
1

# switchMute

Toggle the mute state.

# Return Value

void

  player.switchMute();
1

# switchPlay

Toggle the play state.

# Return Value

void

  player.switchPlay();
1

# setTime

Update the current time.

# Parameters

  • time number

# Return Value

void

  player.setTime(time);
1

# incrementTime

Increment the current time by 5 seconds.

# Return Value

void

  player.incrementTime();
1

# decrementTime

Decrement the current time by 5 seconds.

# Return Value

void

  player.decrementTime();
1

# setVolume

Update the current volume.

# Parameters

  • volume number

# Return Value

void

  player.setVolume(Volume);
1

# incrementVolume

Increment the current Volume.

# Return Value

void

  player.incrementVolume();
1

# decrementVolume

Decrement the current Volume.

# Return Value

void

  player.decrementVolume();
1