auto fade out

This commit is contained in:
Chris Ham
2018-10-27 09:50:05 -07:00
parent 886a5f8b27
commit f3a4159823
5 changed files with 160 additions and 17 deletions

View File

@@ -28,6 +28,28 @@ function GHOBS(config) {
});
};
this.startStream = () => {
return this.websocket.startStreaming();
};
this.stopStream = () => {
return this.websocket.stopStreaming();
};
this.setVolume = (source, volume) => {
return this.websocket.setVolume({source: source, volume: volume});
}
this.getVolume = (source) => {
return new Promise((resolve, reject) => {
this.websocket.getVolume({source: source})
.then(res => {
resolve(res.volume);
})
.catch(reject);
});
}
// Plays a video in the current scene and hides when finished
this.playVideo = (video, callback) => {
return new Promise((resolve, reject) => {