diff options
Diffstat (limited to 'src/utils/webrtc/webrtc.js')
-rw-r--r-- | src/utils/webrtc/webrtc.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/utils/webrtc/webrtc.js b/src/utils/webrtc/webrtc.js index 9d2635255..14ea740b5 100644 --- a/src/utils/webrtc/webrtc.js +++ b/src/utils/webrtc/webrtc.js @@ -914,7 +914,7 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local }) } - const reconnectOnPublishingPermissionsChange = (users) => { + const reconnectOnPermissionsChange = (users) => { const currentParticipant = users.find(user => { const sessionId = user.sessionId || user.sessionid return sessionId === signaling.getSessionId() @@ -928,25 +928,25 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local return } - if (currentParticipant.publishingPermissions === undefined) { + if (currentParticipant.participantPermissions === undefined) { return } - if ((currentParticipant.publishingPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_AUDIO) - && (currentParticipant.publishingPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_VIDEO) + if ((currentParticipant.participantPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_AUDIO) + && (currentParticipant.participantPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_VIDEO) && webrtc.webrtc.isLocalMediaActive()) { return } - if (!(currentParticipant.publishingPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_AUDIO) - && !(currentParticipant.publishingPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_VIDEO) + if (!(currentParticipant.participantPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_AUDIO) + && !(currentParticipant.participantPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_VIDEO) && !webrtc.webrtc.isLocalMediaActive()) { return } // FIXME handle case where only one of the permissions is given - if (!(currentParticipant.publishingPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_AUDIO) - && !(currentParticipant.publishingPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_VIDEO)) { + if (!(currentParticipant.participantPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_AUDIO) + && !(currentParticipant.participantPermissions & PARTICIPANT.PERMISSIONS.PUBLISH_VIDEO)) { startedWithMedia = undefined webrtc.stopLocalVideo() @@ -999,10 +999,10 @@ export default function initWebRtc(signaling, _callParticipantCollection, _local } signaling.on('usersInRoom', function(users) { - reconnectOnPublishingPermissionsChange(users) + reconnectOnPermissionsChange(users) }) signaling.on('usersChanged', function(users) { - reconnectOnPublishingPermissionsChange(users) + reconnectOnPermissionsChange(users) }) webrtc.on('createdPeer', function(peer) { |