Skip to content

Commit

Permalink
[screenshare] Add configuration flag for playStart response, disabled…
Browse files Browse the repository at this point in the history
… by default (experimental)
  • Loading branch information
prlanzarin committed Oct 27, 2020
1 parent 2464665 commit 5c2fbb5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
3 changes: 3 additions & 0 deletions config/custom-environment-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions config/default.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ common-message-version: 2.x
screenshareKeyframeInterval: 0
screenshareEnableFlashRTPBridge: false
screenshareSubscriberSpecSlave: false
screensharePlayStartEnabled: false
videoSubscriberSpecSlave: false

recordScreenSharing: true
Expand Down
17 changes: 11 additions & 6 deletions lib/screenshare/screenshare.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]";

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 5c2fbb5

Please sign in to comment.