TT#47707 Conferencing: As a Customer, I want to mute/unmute all participants

- can mute all participants at the same time by clicking a single button (#71350)
- can unmute all participants at the same time by clicking a single button (#71352)

Change-Id: Iaf40499acc23baaef797db61b714932fb561e7a0
changes/32/35632/8
Carlo Venusino 6 years ago
parent 1ab39e4b7e
commit 8d94175edd

@ -165,8 +165,8 @@
this.fitMediaToParent(); this.fitMediaToParent();
} }
}, },
toggleAudio(){ toggleAudio(muted){
return this.$refs.media.muted = !this.$refs.media.muted; return this.$refs.media.muted = muted || !this.$refs.media.muted;
}, },
isMuted(){ isMuted(){
return this.$refs.media.muted; return this.$refs.media.muted;

@ -40,7 +40,9 @@
v-if="!isJoining && isJoined" v-if="!isJoining && isJoined"
/> />
<csc-conference-participants <csc-conference-participants
ref="confParticipants"
v-if="!isJoining && isJoined" v-if="!isJoining && isJoined"
:is-muted="isMuted"
/> />
</div> </div>
@ -113,6 +115,31 @@
@click="toggleScreen()" @click="toggleScreen()"
:disable="!hasConferenceId || isJoining" :disable="!hasConferenceId || isJoining"
/> />
<q-btn
class="csc-conf-button"
:color="screenButtonColor"
icon="more_vert"
round
:disable="!hasConferenceId || isJoining"
>
<q-popover
ref="popover"
:disable="participantsList.length < 1">
<q-list
link
class="no-border"
>
<q-item
@click="toggleMuteAll"
>
<q-item-main
:label="muteLabel()"
/>
</q-item>
</q-list>
</q-popover>
</q-btn>
</div> </div>
</div> </div>
<csc-confirm-dialog <csc-confirm-dialog
@ -141,12 +168,17 @@
QBtn, QBtn,
QCard, QCard,
QCardMedia, QCardMedia,
QIcon QIcon,
QPopover,
QList,
QItem,
QItemMain
} from 'quasar-framework' } from 'quasar-framework'
import CscConfirmDialog from "../CscConfirmationDialog"; import CscConfirmDialog from "../CscConfirmationDialog";
export default { export default {
data: function () { data: function () {
return { return {
isMuted: false,
selectedMediaStream : null, selectedMediaStream : null,
selectedParticipantName: null selectedParticipantName: null
} }
@ -165,7 +197,11 @@
QBtn, QBtn,
QCard, QCard,
QCardMedia, QCardMedia,
QIcon QIcon,
QPopover,
QList,
QItem,
QItemMain
}, },
computed: { computed: {
...mapState('conference',[ ...mapState('conference',[
@ -255,6 +291,15 @@
this.$store.dispatch('conference/toggleScreen'); this.$store.dispatch('conference/toggleScreen');
} }
}, },
toggleMuteAll(){
this.$refs.popover.close();
this.isMuted = !this.isMuted;
},
muteLabel() {
return this.isMuted
? this.$t('conferencing.unmuteAll')
: this.$t('conferencing.muteAll');
},
async join(conferenceId) { async join(conferenceId) {
if(this.hasConferenceId) { if(this.hasConferenceId) {
await this.$store.dispatch('conference/join', conferenceId); await this.$store.dispatch('conference/join', conferenceId);

@ -23,6 +23,7 @@
:has-remote-video="hasRemoteVideo(participantId)" :has-remote-video="hasRemoteVideo(participantId)"
:remote-media-stream="remoteMediaStream" :remote-media-stream="remoteMediaStream"
:remote-media-streams="remoteMediaStreams" :remote-media-streams="remoteMediaStreams"
:is-muted="isMuted"
/> />
</div> </div>
</div> </div>
@ -48,6 +49,9 @@
CscConferenceRemoteParticipant, CscConferenceRemoteParticipant,
CscConferenceLocalParticipant CscConferenceLocalParticipant
}, },
props: [
'isMuted'
],
computed: { computed: {
...mapState('conference', [ ...mapState('conference', [
'remoteMediaStreams' 'remoteMediaStreams'

@ -25,13 +25,13 @@
<q-icon <q-icon
class="csc-conf-toggle-audio-icon" class="csc-conf-toggle-audio-icon"
name="volume_off" name="volume_off"
v-if="isMuted" v-if="isAudioMuted"
> >
</q-icon> </q-icon>
<q-icon <q-icon
class="csc-conf-toggle-audio-icon" class="csc-conf-toggle-audio-icon"
name="volume_up" name="volume_up"
v-if="!isMuted" v-if="!isAudioMuted"
> >
</q-icon> </q-icon>
</div> </div>
@ -78,8 +78,8 @@
}, },
data: function () { data: function () {
return { return {
localMediaStream : null, isAudioMuted: JSON.parse(this.isMuted),
isMuted: false localMediaStream : null
} }
}, },
props: [ props: [
@ -87,6 +87,7 @@
'remoteMediaStream', 'remoteMediaStream',
'remoteMediaStreams', 'remoteMediaStreams',
'hasRemoteVideo', 'hasRemoteVideo',
'isMuted'
], ],
computed: { computed: {
...mapState('conference', [ ...mapState('conference', [
@ -117,11 +118,11 @@
} }
}, },
toggleAudio(){ toggleAudio(){
this.$refs.popover.close() this.$refs.popover.close();
this.isMuted = this.$refs.cscMedia.toggleAudio(); this.isAudioMuted = this.$refs.cscMedia.toggleAudio();
}, },
audioLabel() { audioLabel() {
return this.isMuted return this.isAudioMuted
? this.$t('conferencing.unmuteMicrophone') ? this.$t('conferencing.unmuteMicrophone')
: this.$t('conferencing.muteMicrophone'); : this.$t('conferencing.muteMicrophone');
} }
@ -129,6 +130,10 @@
watch: { watch: {
remoteMediaStreams() { remoteMediaStreams() {
this.assignStream(); this.assignStream();
},
isMuted(){
this.isAudioMuted = this.isMuted;
this.$refs.cscMedia.toggleAudio(this.isMuted);
} }
} }
} }

@ -598,7 +598,9 @@
"exitDialogText": "Leave current conference now!", "exitDialogText": "Leave current conference now!",
"leaveButtonLabel": "Leave", "leaveButtonLabel": "Leave",
"muteMicrophone": "Mute", "muteMicrophone": "Mute",
"unmuteMicrophone": "Unmute" "unmuteMicrophone": "Unmute",
"muteAll": "Mute all",
"unmuteAll": "Unmute all"
}, },
"userSettings": { "userSettings": {
"changePassword": "Change password", "changePassword": "Change password",

Loading…
Cancel
Save