Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xbmc streaming support #84

Merged
merged 1 commit into from Sep 12, 2014
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -2,6 +2,7 @@

var airplay = require('airplay-js')
var chromecast = require('chromecast-js')
var xbmc = require('nodebmc')
var clivas = require('clivas')
var cp = require('child_process')
var debug = require('debug')('webtorrent:cmd')
@@ -40,6 +41,7 @@ var argv = minimist(process.argv.slice(2), {
'mpv',
'airplay',
'chromecast',
'xbmc',
'list',
'no-quit',
'remove',
@@ -77,6 +79,7 @@ if (argv.help || !torrentId) {
--airplay stream to Apple TV (AirPlay)
--chromecast stream to Chromecast
--xbmc stream to XBMC
--vlc stream in VLC
--mplayer stream in MPlayer
--mpv stream in MPV
@@ -234,6 +237,7 @@ function onTorrent (torrent) {
var cmd, player
var playerName = argv.airplay ? 'Airplay'
: argv.chromecast ? 'Chromecast'
: argv.xbmc ? 'XBMC'
: argv.vlc ? 'VLC'
: argv.mplayer ? 'MPlayer'
: argv.mpv ? 'mpv'
@@ -299,6 +303,13 @@ function onTorrent (torrent) {
})
}

if (argv.xbmc) {
;(new xbmc.Browser())
.on('deviceOn', function (device) {
device.play(href, function () {})
})
}

var hotswaps = 0
torrent.on('hotswap', function () {
hotswaps += 1
@@ -27,6 +27,7 @@
"mkdirp": "^0.5.0",
"moment": "^2.8.2",
"network-address": "0.0.4",
"nodebmc": "^0.0.3",
"numeral": "^1.5.3",
"once": "^1.3.0",
"parse-torrent": "^2.1.2",
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.