Path: rsConf.cb
The callback API can be used to trigger custom functions when certain pre-defined events occur. Inside the callback functions the context (the this keyword) is always set to the player element that triggered the event. Optionally, some events provide arguments as well.
Example:

window.rsConf = {
	cb: {
		ui: {
			open: function() {
				doSomething();
			}
		}
	}
};
  • ui.beforeclose

    Path: rsConf.cb.ui.beforeclose

    Default value: None

    Description: Fires immediately after the user clicks on the close button in the player before any native close events have taken place. Note that opening a new player while the previous player is playing does not trigger this event, it only responds to direct user interaction. The this keyword will refer to the container element of the closed player.

  • ui.close

    Path: rsConf.cb.ui.close

    Default value: None

    Description: Fires when the user clicks on the close button in the player and after all native close events have taken place. Note that opening a new player while the previous player is playing does not trigger this event, it only responds to direct user interaction. The this keyword will refer to the container element of the closed player.

  • ui.open

    Path: rsConf.cb.ui.open

    Default value: None

    Description: This event fires when the user opens a player, which happens when the user clicks on a listen button, it always fire before rsConf.cb.ui.play. The reference to this will refer to the container element of the current player.

  • ui.pause

    Path: rsConf.cb.ui.pause

    Default value: None

    Description: Fires when the user clicks on the pause button. The this keyword will refer to the container element of the current player.

  • ui.play

    Path: rsConf.cb.ui.play

    Default value: None

    Description: Fires when the user clicks on a listen button, right after rsConf.cb.ui.open if the player was previously closed. Note that this event also fires when playback starts after the player has been paused or stopped. The this keyword will refer to the container element of the current player.

  • ui.progresschanged

    Path: rsConf.cb.ui.progresschanged

    Default value: None

    Description: Fires when everytime the progressbar is updated, either because the audio is playing or because the user drag’n’dropped the playhead to a new position. The new value (in percent) is provided as the only parameter.

  • ui.settingsopened

    Path: rsConf.cb.ui.settingsopened

    Default value: None

    Description: Fires when the user clicks on the settings button. In this case the this keyword will refer to the container element of the settings panel.

  • ui.stop

    Path: rsConf.cb.ui.stop

    Default value: hlon

    Description: Fires when the user clicks on the stop button. The this keyword will refer to the container element of the current player.

  • ui.timeupdated

    Path: rsConf.cb.ui.timeupdated

    Default value: None

    Description: Fires continuously during audio playback.. The this keyword refers to the player’s container element.

  • ui.volumechanged

    Path: rsConf.cb.ui.volumechanged

    Default value: None

    Description: Fires when the user changes the volume.