﻿FLVPlayer = {
};

FLVPlayer.play = function(playerId, timeout) {
	if (timeout != null && timeout > 0) {
		setTimeout("document.getElementById('" + playerId + "').sendEvent('PLAY', 'true');", timeout);
	} else {
		document.getElementById(playerId).sendEvent('PLAY', 'true');
	}
};

FLVPlayer.stop = function(playerId) {
	document.getElementById(playerId).sendEvent('PLAY', 'false');
};

FLVPlayer.readyCallback = function(obj) {
};

FLVPlayer.readyAutoPlayCallback = function(obj) {
	FLVPlayer.play(obj.id, 1000);
};
