Created
February 19, 2013 15:52
-
-
Save gauntface/4987077 to your computer and use it in GitHub Desktop.
The constructor of GenericVideoPlayerController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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