Show which cast device you're connected to
This commit is contained in:
@@ -371,6 +371,7 @@ function selectDevice (index) {
|
|||||||
|
|
||||||
// Show the Connecting... screen
|
// Show the Connecting... screen
|
||||||
state.devices.castMenu = null
|
state.devices.castMenu = null
|
||||||
|
state.playing.castName = devices[index].name
|
||||||
state.playing.location = location + '-pending'
|
state.playing.location = location + '-pending'
|
||||||
update()
|
update()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1068,9 +1068,11 @@ function openPlayerFromActiveTorrent (torrentSummary, index, timeout, cb) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function closePlayer (cb) {
|
function closePlayer (cb) {
|
||||||
|
console.log('closePlayer')
|
||||||
|
|
||||||
// Quit any external players, like Chromecast/Airplay/etc or VLC
|
// Quit any external players, like Chromecast/Airplay/etc or VLC
|
||||||
if (isCasting()) {
|
if (isCasting()) {
|
||||||
Cast.close()
|
Cast.stop()
|
||||||
}
|
}
|
||||||
if (state.playing.location === 'vlc') {
|
if (state.playing.location === 'vlc') {
|
||||||
ipcRenderer.send('vlcQuit')
|
ipcRenderer.send('vlcQuit')
|
||||||
|
|||||||
@@ -280,8 +280,10 @@ function renderCastScreen (state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var isStarting = state.playing.location.endsWith('-pending')
|
var isStarting = state.playing.location.endsWith('-pending')
|
||||||
|
var castName = state.playing.castName
|
||||||
var castStatus
|
var castStatus
|
||||||
if (isCast) castStatus = isStarting ? 'Connecting...' : 'Connected'
|
if (isCast && isStarting) castStatus = 'Connecting to ' + castName + '...'
|
||||||
|
else if (isCast && !isStarting) castStatus = 'Connected to ' + castName
|
||||||
else castStatus = ''
|
else castStatus = ''
|
||||||
|
|
||||||
// Show a nice title image, if possible
|
// Show a nice title image, if possible
|
||||||
|
|||||||
Reference in New Issue
Block a user