Skip to content

Instantly share code, notes, and snippets.

@k1ng440
Created August 25, 2014 20:36
Show Gist options
  • Save k1ng440/9b1abb9a67ce43a2a883 to your computer and use it in GitHub Desktop.
Save k1ng440/9b1abb9a67ce43a2a883 to your computer and use it in GitHub Desktop.
Device.prototype.play = function(resource, n, callback){
var self = this
var media = {
contentId: resource,
contentType: 'video/mp4'
};
options = { autoplay: true }
if(n){
options['currentTime'] = n
}
self.player.load(media, options, function(err, status) {
self.playing = true
console.log("calling callback")
if(callback){
callback(err,status)
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment