diff --git a/config/custom-environment-variables.yml b/config/custom-environment-variables.yml index 38d4e767..b0367939 100644 --- a/config/custom-environment-variables.yml +++ b/config/custom-environment-variables.yml @@ -75,6 +75,9 @@ videoSubscriberSpecSlave: screenshareSubscriberSpecSlave: __name: SCREENSHARE_SUBSCRIBER_SLAVE __format: json +screensharePlayStartEnabled: + __name: SCREENSHARE_PLAY_START_ENABLED + __format: json kurentoAllowedCandidateIps: __name: KURENTO_ALLOWED_CANDIDATE_IPS diff --git a/config/default.example.yml b/config/default.example.yml index 3d224d4b..4815c213 100644 --- a/config/default.example.yml +++ b/config/default.example.yml @@ -45,6 +45,7 @@ common-message-version: 2.x screenshareKeyframeInterval: 0 screenshareEnableFlashRTPBridge: false screenshareSubscriberSpecSlave: false +screensharePlayStartEnabled: false videoSubscriberSpecSlave: false recordScreenSharing: true diff --git a/lib/screenshare/screenshare.js b/lib/screenshare/screenshare.js index b0a6211a..74b5843c 100644 --- a/lib/screenshare/screenshare.js +++ b/lib/screenshare/screenshare.js @@ -27,6 +27,9 @@ const SUBSCRIBER_SPEC_SLAVE = config.has('videoSubscriberSpecSlave') ? config.get('videoSubscriberSpecSlave') : false; const KURENTO_REMB_PARAMS = config.util.cloneDeep(config.get('kurentoRembParams')); +const SCREENSHARE_PLAY_START_ENABLED = config.has(`screensharePlayStartEnabled`) + ? config.get(`screensharePlayStartEnabled`) + : false; const LOG_PREFIX = "[screenshare]"; @@ -187,12 +190,14 @@ module.exports = class Screenshare extends BaseProvider { } sendPlayStart (role, connectionId) { - this.bbbGW.publish(JSON.stringify({ - type: C.SCREENSHARE_APP, - id : 'playStart', - connectionId, - role, - }), C.FROM_SCREENSHARE); + if (SCREENSHARE_PLAY_START_ENABLED) { + this.bbbGW.publish(JSON.stringify({ + type: C.SCREENSHARE_APP, + id : 'playStart', + connectionId, + role, + }), C.FROM_SCREENSHARE); + } } _onViewerWebRTCMediaFlowing (connectionId) {