mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 19:02:15 +00:00
Shall service api unified with Chromecast
This commit is contained in:
parent
215bd79144
commit
53e8399bd3
1 changed files with 12 additions and 8 deletions
|
|
@ -6,6 +6,7 @@ function Shell() {
|
||||||
let active = false;
|
let active = false;
|
||||||
let error = null;
|
let error = null;
|
||||||
let starting = false;
|
let starting = false;
|
||||||
|
|
||||||
const events = new EventEmitter();
|
const events = new EventEmitter();
|
||||||
events.on('error', () => { });
|
events.on('error', () => { });
|
||||||
|
|
||||||
|
|
@ -17,12 +18,10 @@ function Shell() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
starting = true;
|
active = false;
|
||||||
setTimeout(() => {
|
error = new Error('Stremio shell not available');
|
||||||
error = new Error('Unable to init stremio shell');
|
starting = false;
|
||||||
starting = false;
|
onStateChanged();
|
||||||
onStateChanged();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
function stop() {
|
function stop() {
|
||||||
active = false;
|
active = false;
|
||||||
|
|
@ -58,6 +57,13 @@ function Shell() {
|
||||||
get: function() {
|
get: function() {
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
starting: {
|
||||||
|
configurable: false,
|
||||||
|
enumerable: true,
|
||||||
|
get: function() {
|
||||||
|
return starting;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -66,8 +72,6 @@ function Shell() {
|
||||||
this.on = on;
|
this.on = on;
|
||||||
this.off = off;
|
this.off = off;
|
||||||
this.dispatch = dispatch;
|
this.dispatch = dispatch;
|
||||||
|
|
||||||
Object.freeze(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Shell;
|
module.exports = Shell;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue