TT#47706 Conferencing: As a Customer, I want to mute/unmute each participant separately

- Must see a more menu at the top of the ParticipantItem (#70952)
- Must be able to mute/unmute the remote audio by opening the more menu and clicking the mute/unmute list item (#70955)
- Must see an icon that refelcts the current state in the ParticipantItem (whether muted or unmuted) (#70956)

Change-Id: Ibab4bdd9887c1a8ce4e3760c154cefae6b6caab7
changes/57/35357/7
Carlo Venusino 6 years ago
parent 079e4a12a1
commit 8de739f80f

@ -164,6 +164,12 @@
else {
this.fitMediaToParent();
}
},
toggleAudio(){
return this.$refs.media.muted = !this.$refs.media.muted;
},
isMuted(){
return this.$refs.media.muted;
}
},
watch: {

@ -2,6 +2,39 @@
<q-card
class="csc-conf-participant-cont"
>
<div class="csc-conf-audio-icons-cont">
<q-icon
name="more_vert"
class="csc-conf-toggle-audio-menu-icon"
>
<q-popover ref="popover" class="csc-conf-toggle-audio-popover">
<q-list
link
class="no-border csc-conf-toggle-audio-menu-item"
>
<q-item
@click="toggleAudio"
>
<q-item-main
:label="audioLabel()"
/>
</q-item>
</q-list>
</q-popover>
</q-icon>
<q-icon
class="csc-conf-toggle-audio-icon"
name="volume_off"
v-if="isMuted"
>
</q-icon>
<q-icon
class="csc-conf-toggle-audio-icon"
name="volume_up"
v-if="!isMuted"
>
</q-icon>
</div>
<q-icon
name="person"
class="csc-conf-avatar"
@ -24,7 +57,7 @@
</template>
<script>
import { QIcon, QCard, QCardMedia, QCardTitle } from 'quasar-framework'
import { QIcon, QCard, QCardMedia, QCardTitle, QPopover, QList, QItem, QItemMain } from 'quasar-framework'
import CscMedia from "../../CscMedia";
import {
mapGetters,
@ -37,11 +70,16 @@
QCard,
QCardMedia,
QCardTitle,
QPopover,
QList,
QItem,
QItemMain,
CscMedia
},
data: function () {
return {
localMediaStream : null
localMediaStream : null,
isMuted: false
}
},
props: [
@ -59,29 +97,38 @@
])
},
mounted() {
this.assignStream(this);
this.assignStream();
if(!this.manualSelection){
this.$store.commit('conference/setSelectedParticipant', this.remoteParticipant.id);
}
},
methods: {
assignStream: (scope) => {
if (scope.$refs.cscMedia && scope.remoteMediaStreams[scope.remoteParticipant.id] === scope.remoteParticipant.id) {
scope.localMediaStream = scope.remoteMediaStream(scope.remoteParticipant.id);
scope.$refs.cscMedia.assignStream(scope.localMediaStream);
if(scope.selectedParticipant == scope.remoteParticipant.id){
scope.$store.commit('conference/setSelectedParticipant', 'local'); // TODO improve (workaround to reset the mediaStream)
scope.$store.commit('conference/setSelectedParticipant', scope.remoteParticipant.id);
assignStream(){
if (this.$refs.cscMedia && this.remoteMediaStreams[this.remoteParticipant.id] === this.remoteParticipant.id) {
this.localMediaStream = this.remoteMediaStream(this.remoteParticipant.id);
this.$refs.cscMedia.assignStream(this.localMediaStream);
if(this.selectedParticipant == this.remoteParticipant.id){
this.$store.commit('conference/setSelectedParticipant', 'local'); // TODO improve (workaround to reset the mediaStream)
this.$store.commit('conference/setSelectedParticipant', this.remoteParticipant.id);
}
}
else if (scope.$refs.cscMedia) {
scope.$refs.cscMedia.reset();
else if (this.$refs.cscMedia) {
this.$refs.cscMedia.reset();
}
},
toggleAudio(){
this.$refs.popover.close()
this.isMuted = this.$refs.cscMedia.toggleAudio();
},
audioLabel() {
return this.isMuted
? this.$t('conferencing.unmuteMicrophone')
: this.$t('conferencing.muteMicrophone');
}
},
watch: {
remoteMediaStreams() {
this.assignStream(this);
this.assignStream();
}
}
}
@ -89,4 +136,20 @@
<style lang="stylus" rel="stylesheet/stylus">
@import '../../../themes/app.common.styl'
.csc-conf-audio-icons-cont
position relative
width 100%
.csc-conf-toggle-audio-menu-icon
position absolute
padding-top 5px
z-index 10
.csc-conf-toggle-audio-icon
@extend .csc-conf-toggle-audio-menu-icon
right 5px
cursor default
.csc-conf-toggle-audio-popover
width 115px
.csc-conf-toggle-audio-menu-item
.q-item
font-size 14px
</style>

@ -596,7 +596,9 @@
"copyLinkButtonLabel": "Copy link",
"exitDialogTitle": "Leave conference",
"exitDialogText": "Leave current conference now!",
"leaveButtonLabel": "Leave"
"leaveButtonLabel": "Leave",
"muteMicrophone": "Mute",
"unmuteMicrophone": "Unmute"
},
"userSettings": {
"changePassword": "Change password",

@ -256,8 +256,7 @@ input.q-input-target
position relative
width 100%
height 100%
top 0
bottom 0
top 0px
left -22px
right 0
margin auto

Loading…
Cancel
Save