vrmode timer, user skip voting
This commit is contained in:
14
lib/fgfm.js
14
lib/fgfm.js
@@ -157,7 +157,8 @@ function FGFM(config) {
|
||||
// Also handles "commercial breaks" if enabled
|
||||
this.nextVideo = () => {
|
||||
// @TODO: Validate this.state.showStatus -- make sure the "show" hasn't been paused or stopped
|
||||
if (this.state.showStatus === 'ENDING' || this.state.showStatus === 'ENDED') {
|
||||
let ignoreStates = ['ENDING', 'ENDED', 'PAUSED'];
|
||||
if (ignoreStates.includes(this.state.showStatus)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -282,7 +283,16 @@ function FGFM(config) {
|
||||
// Clears.. the... queue
|
||||
this.clearQueue = () => {
|
||||
this.state.videoQueue = [];
|
||||
}
|
||||
};
|
||||
|
||||
this.pause = () => {
|
||||
this.state.showStatus = 'PAUSED';
|
||||
};
|
||||
|
||||
this.resume = () => {
|
||||
this.state.showStatus = 'RUNNING';
|
||||
this.nextVideo();
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = FGFM;
|
||||
|
||||
Reference in New Issue
Block a user