Don't load cast module when seeking

This commit is contained in:
DC
2016-04-05 18:21:46 -07:00
parent d2b95163fb
commit b31281c35e
2 changed files with 14 additions and 12 deletions

View File

@@ -14,8 +14,7 @@ module.exports = {
stopCasting,
playPause,
seek,
setVolume,
isCasting
setVolume
}
// Callback to notify module users when state has changed
@@ -285,13 +284,6 @@ function stoppedCasting () {
update()
}
// Checks whether we are connected and already casting
// Returns false if we not casting (state.playing.location === 'local')
// or if we're trying to connect but haven't yet ('chromecast-pending', etc)
function isCasting () {
return state.playing.location === 'chromecast' || state.playing.location === 'airplay' || state.playing.location === 'dlna'
}
function getDevice (location) {
if (location && state.devices[location]) {
return state.devices[location]