File tree Expand file tree Collapse file tree 5 files changed +4
-7
lines changed Expand file tree Collapse file tree 5 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 8
8
"refreshScene" : " REFRESH" ,
9
9
"lowBitrateTrigger" : 1000 ,
10
10
"refreshSceneInterval" : 10000 ,
11
- "requestMs" : 2000
11
+ "requestMs" : 2000 ,
12
+ "onlySwitchWhenStreaming" : true
12
13
},
13
14
"nginx" : {
14
15
"rtmp" : " rtmp://localhost/publish/live"
Original file line number Diff line number Diff line change @@ -146,8 +146,6 @@ function () {
146
146
this [ commandName ] ( parse [ 1 ] ) ;
147
147
log . success ( "" . concat ( parsed . username , " Executed " ) . concat ( commandName , " command" ) ) ;
148
148
this . setWait ( ) ;
149
- } else {
150
- log . error ( "" . concat ( parsed . username , " Executed unknown command " ) . concat ( commandName ) ) ;
151
149
}
152
150
}
153
151
} else if ( parsed . command === "PING" ) {
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ function (_EventEmitter) {
128
128
while ( 1 ) {
129
129
switch ( _context . prev = _context . next ) {
130
130
case 0 :
131
- if ( _this2 . obsStreaming ) {
131
+ if ( ! ( ! _this2 . obsStreaming && ( _config . default . obs . onlySwitchWhenStreaming == null || _config . default . obs . onlySwitchWhenStreaming ) ) ) {
132
132
_context . next = 2 ;
133
133
break ;
134
134
}
Original file line number Diff line number Diff line change @@ -138,8 +138,6 @@ class Chat {
138
138
139
139
log . success ( `${ parsed . username } Executed ${ commandName } command` ) ;
140
140
this . setWait ( ) ;
141
- } else {
142
- log . error ( `${ parsed . username } Executed unknown command ${ commandName } ` ) ;
143
141
}
144
142
}
145
143
} else if ( parsed . command === "PING" ) {
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class ObsSwitcher extends EventEmitter {
58
58
this . getSceneList ( ) ;
59
59
60
60
this . interval = setInterval ( async ( ) => {
61
- if ( ! this . obsStreaming ) return ;
61
+ if ( ! this . obsStreaming && ( config . obs . onlySwitchWhenStreaming == null || config . obs . onlySwitchWhenStreaming ) ) return ;
62
62
63
63
const bitrate = await this . getBitrate ( ) ;
64
64
const { currentScene, canSwitch } = await this . canSwitch ( ) ;
You can’t perform that action at this time.
0 commit comments