File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -209,13 +209,15 @@ class ObsSwitcher extends _events.default {
209209
210210 case "srt-live-server" :
211211 try {
212+ var _stream$rtt ;
213+
212214 var _srtresponse = yield ( 0 , _nodeFetch . default ) ( stats ) ;
213215
214216 var _srtdata = yield _srtresponse . json ( ) ;
215217
216218 var stream = _srtdata . publishers [ publisher ] ;
217219 _this2 . bitrate = ( stream === null || stream === void 0 ? void 0 : stream . bitrate ) || null ;
218- _this2 . rtt = ( stream === null || stream === void 0 ? void 0 : stream . rtt ) || null ;
220+ _this2 . rtt = ( _stream$rtt = stream === null || stream === void 0 ? void 0 : stream . rtt ) !== null && _stream$rtt !== void 0 ? _stream$rtt : null ;
219221 } catch ( e ) {
220222 log . error ( "[SLS] Error fetching stats: " + e ) ;
221223 }
Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ class ObsSwitcher extends EventEmitter {
284284 const stream = srtdata . publishers [ publisher ] ;
285285
286286 this . bitrate = stream ?. bitrate || null ;
287- this . rtt = stream ?. rtt || null ;
287+ this . rtt = stream ?. rtt ?? null ;
288288 } catch ( e ) {
289289 log . error ( "[SLS] Error fetching stats: " + e ) ;
290290 }
You can’t perform that action at this time.
0 commit comments