VOPlayer Class

Matt Karl edited this page Dec 17, 2015 · 9 revisions

The VOPlayer class lives within the Sound Module and uses the Sound Class (and optionally the Captions Module) to play voice-over audio. This is great for paying instructions.


var app = new springroll.Application();

app.on('init', function()
	// voPlayer is ready when the application inits
	this.voPlayer.play('IntroLine', function(){
		// Line is finished


###play(idOrList, [callback, [cancelledCallback]])


  • idOrList array|string The alias of the audio file to play or the array of items to play/call in order. Acceptable items in the list include int (millisecond delays), audio alias strings, and functions.
  • callback function (optional) The callback function when play completes.
  • cancelledCallback function (optional) The callback when stop is called before the audio is finished playing.


In this example a sound "WouldYouLike" is played, followed by 400 milliseconds of silence, then a sound "Sandwich", then a function call, finally the sound "ForLunch";

var startAnimation = function()
	// Show the sandwich on stage!
// Great for creating dynamic/templated audio

API Documentation

To see the full list of methods available to springroll.VOPlayer please see the full documentation.