Skip to content

Commit

Permalink
fix(Call): stop all media related streams (simulating end call)
Browse files Browse the repository at this point in the history
Signed-off-by: DorraJaouad <[email protected]>
  • Loading branch information
DorraJaouad committed Sep 25, 2024
1 parent 3d9adf5 commit 40205de
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/components/CallView/CallFailedDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ const message = computed(() => {
return t('spreed', 'Please try to reload the page')
} else {
return ''
}
return ''
}
})
/**
Expand Down
6 changes: 1 addition & 5 deletions src/services/callsService.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ import {
* @return {number} The actual flags based on the available media
*/
const joinCall = async function(token, flags, silent, recordingConsent) {
try {
return await signalingJoinCall(token, flags, silent, recordingConsent)
} catch (error) {
console.debug('Error while joining call: ', error)
}
return await signalingJoinCall(token, flags, silent, recordingConsent)
}

/**
Expand Down
12 changes: 8 additions & 4 deletions src/store/participantsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -808,12 +808,16 @@ const actions = {
commit('finishedConnecting', { token, sessionId: participantIdentifier.sessionId })
})

const actualFlags = await joinCall(token, flags, silent, recordingConsent)
try {
const actualFlags = await joinCall(token, flags, silent, recordingConsent)
const updatedData = {
inCall: actualFlags,
}
commit('updateParticipant', { token, attendeeId: attendee.attendeeId, updatedData })
} catch (e) {
console.error(e)

const updatedData = {
inCall: actualFlags,
}
commit('updateParticipant', { token, attendeeId: attendee.attendeeId, updatedData })
},

async leaveCall({ commit, getters }, { token, participantIdentifier, all = false }) {
Expand Down
1 change: 1 addition & 0 deletions src/utils/webrtc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ function startCall(signaling, configuration, silent, recordingConsent) {
signaling.joinCall(pendingJoinCallToken, flags, silent, recordingConsent).then(() => {
startedCall(flags)
}).catch(error => {
signalingLeaveCall(pendingJoinCallToken)
failedToStartCall(error)
})
}
Expand Down

0 comments on commit 40205de

Please sign in to comment.