auto fade out
This commit is contained in:
22
lib/ghobs.js
22
lib/ghobs.js
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user