Skip to content

Instantly share code, notes, and snippets.

@gauntface
Created February 19, 2013 15:52
Show Gist options
  • Select an option

  • Save gauntface/4987077 to your computer and use it in GitHub Desktop.

Select an option

Save gauntface/4987077 to your computer and use it in GitHub Desktop.
The constructor of GenericVideoPlayerController
/**
* This class is meant to be inherited to control Video playback and then
* each class handles a different method of playback
*
* @constructor
*/
function GenericVideoPlayerController() {
var playerCallback = null;
var videoUrl = null;
/**
* Set a callback method for the player
* @param {function} callback
*/
this.setPlayerCallback = function (callback) {
playerCallback = callback;
};
/**
* Get a player callback
*/
this.getPlayerCallback = function () {
return playerCallback;
};
/**
* Set the video url
* @param {String} url
*/
this.setVideoUrl = function (url) {
videoUrl = url;
this.onVideoUrlChange(url);
};
/**
* Get the video url
*/
this.getVideoUrl = function () {
return videoUrl;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment