getStopped

 

Provides a means to determine if the player is:

- playing = 0
- paused = 1
- stopped = 2
- disabled = 3

Provides more information than what getPlaying provides, but does so inversely as it distinguishs between paused, stopped, or if the player is disabled. In addition, when it returns 0, the player is playing.

 

getStopped()

 

Parameters

none

 

Return Value

int

0 = playing
1 = paused
2 = stopped
3 = player is disabled

 

 

See Also

 

Examples

 

<!-- Create a player -->
<div id="player1" data-wimpyplayer data-media="../song1.mp3|../song2.mp3"></div>


<!-- A simple button to ping the "doit" function. -->
<button onclick="checkPlaying()">Check Playing</button>

<script>

// Put variable on the window scope so all function have access to the var.
var player;

// The function to edit the "live" playlist
function checkPlaying(){

	if( ! player ){
		player = wimpy.getPlayer("player1");
	}
	
	// The alert should show a 1 or a 0, where 1=playing and 0 = paused/stopped/not playing
	alert ( player.getPlaying() );

}

</script>