Created
October 10, 2014 21:43
-
-
Save xat/f4a743fd824e8d2b2d56 to your computer and use it in GitHub Desktop.
This file contains 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
var localfiles = function(opts, player, type, next) { | |
if (type !== 'launch') return next(); | |
if (isUrl(opts.path)) return next(); | |
// start local webserver, change the path to an url | |
}; | |
var defaultmedia = function(opts, player, type, next) { | |
player.on('app-launch-pre', function(err, app) { | |
// add player api, if namespace ist default player | |
}); | |
}; | |
player | |
.use(localfiles()) | |
.use(torrents()) | |
.use(defaultmedia()); | |
player.launch('http://whatever.mp4', function(err, p) { | |
p.pause(); | |
p.stop(); | |
p.volume(0.5); | |
}); | |
player('http://whatever.mp4'); | |
player.join(function() { | |
}); | |
player(function(err, p) { | |
p.stop(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment