File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3074,6 +3074,13 @@ JitsiConference.prototype._updateProperties = function(properties = {}) {
3074
3074
} ) ;
3075
3075
}
3076
3076
} ) ;
3077
+
3078
+ const oldValue = this . _hasVisitors ;
3079
+
3080
+ this . _hasVisitors = this . properties [ 'visitor-count' ] > 0 ;
3081
+
3082
+ // as this is visitor leaving, consider it leaving for _maybeStartOrStopP2P
3083
+ oldValue && ! this . _hasVisitors && this . _maybeStartOrStopP2P ( true ) ;
3077
3084
}
3078
3085
} ;
3079
3086
@@ -3266,7 +3273,8 @@ JitsiConference.prototype._maybeStartOrStopP2P = function(userLeftEvent) {
3266
3273
if ( ! this . isP2PEnabled ( )
3267
3274
|| this . isP2PTestModeEnabled ( )
3268
3275
|| ( browser . isFirefox ( ) && ! this . _firefoxP2pEnabled )
3269
- || this . isE2EEEnabled ( ) ) {
3276
+ || this . isE2EEEnabled ( )
3277
+ || this . _hasVisitors ) {
3270
3278
logger . info ( 'Auto P2P disabled' ) ;
3271
3279
3272
3280
return ;
You can’t perform that action at this time.
0 commit comments