External VLC on Windows

Turns out we can't use vlc --version because it pops up a command prompt :/
This commit is contained in:
DC
2016-05-04 04:33:35 -07:00
parent 1e487a3c2a
commit 8ebb2349dd
3 changed files with 11 additions and 30 deletions

View File

@@ -306,13 +306,12 @@ function dispatch (action, ...args) {
if (action === 'mediaError') {
if (state.location.current().url === 'player') {
state.playing.location = 'error'
ipcRenderer.send('vlcVersion')
ipcRenderer.once('vlcVersion', function (e, version) {
console.log('vlcVersion', version)
ipcRenderer.send('checkForVLC')
ipcRenderer.once('checkForVLC', function (e, isInstalled) {
state.modal = {
id: 'unsupported-media-modal',
error: args[0],
vlcInstalled: !!version
vlcInstalled: isInstalled
}
})
}