Skip to content

Commit

Permalink
Fix(Participant): keep talking time after searching
Browse files Browse the repository at this point in the history
Signed-off-by: DorraJaouad <dorra.jaoued7@gmail.com>
  • Loading branch information
DorraJaouad committed Mar 12, 2024
1 parent 03ae3d3 commit d126c8d
Showing 1 changed file with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -866,17 +866,21 @@ export default {
},
},
watch: {
isParticipantSpeaking(speaking) {
if (speaking) {
if (!this.speakingInterval) {
this.speakingInterval = setInterval(this.computeElapsedTime, 1000)
}
} else {
if (speaking === undefined) {
this.timeSpeaking = 0
isParticipantSpeaking: {
immediate: true,
handler(speaking) {
this.computeElapsedTime()
if (speaking) {
if (!this.speakingInterval) {
this.speakingInterval = setInterval(this.computeElapsedTime, 1000)
}
} else {
if (speaking === undefined) {
this.timeSpeaking = 0
}
clearInterval(this.speakingInterval)
this.speakingInterval = null
}
clearInterval(this.speakingInterval)
this.speakingInterval = null
}
},
Expand Down

0 comments on commit d126c8d

Please sign in to comment.