TT#71911 Conference: fix wrong merge

Change-Id: Iae4f97a98b1d10fa2eb3beac7144667d3f595750
changes/36/35936/2
Carlo Venusino 6 years ago
parent 8d94175edd
commit f861e0e189

@ -166,10 +166,7 @@
}
},
toggleAudio(muted){
return this.$refs.media.muted = muted || !this.$refs.media.muted;
},
isMuted(){
return this.$refs.media.muted;
this.$refs.media.muted = muted;
}
},
watch: {

@ -42,7 +42,6 @@
<csc-conference-participants
ref="confParticipants"
v-if="!isJoining && isJoined"
:is-muted="isMuted"
/>
</div>
@ -116,6 +115,7 @@
:disable="!hasConferenceId || isJoining"
/>
<q-btn
v-if="isJoined"
class="csc-conf-button"
:color="screenButtonColor"
icon="more_vert"
@ -178,7 +178,6 @@
export default {
data: function () {
return {
isMuted: false,
selectedMediaStream : null,
selectedParticipantName: null
}
@ -224,7 +223,8 @@
'remoteParticipant',
'remoteMediaStream',
'remoteMediaStreams',
'hasRemoteVideo'
'hasRemoteVideo',
'mutedState'
]),
microphoneButtonColor() {
if(this.isMicrophoneEnabled) {
@ -293,12 +293,17 @@
},
toggleMuteAll(){
this.$refs.popover.close();
this.isMuted = !this.isMuted;
if(this.mutedState.length < 1) {
this.$store.dispatch('conference/muteAll');
}
else{
this.$store.dispatch('conference/unMuteAll');
}
},
muteLabel() {
return this.isMuted
? this.$t('conferencing.unmuteAll')
: this.$t('conferencing.muteAll');
return this.mutedState.length < 1
? this.$t('conferencing.muteAll')
: this.$t('conferencing.unmuteAll');
},
async join(conferenceId) {
if(this.hasConferenceId) {

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

@ -78,7 +78,7 @@
},
data: function () {
return {
isAudioMuted: JSON.parse(this.isMuted),
isAudioMuted: false,
localMediaStream : null
}
},
@ -86,15 +86,14 @@
'remoteParticipant',
'remoteMediaStream',
'remoteMediaStreams',
'hasRemoteVideo',
'isMuted'
'hasRemoteVideo'
],
computed: {
...mapState('conference', [
'manualSelection'
]),
...mapGetters('conference', [
'selectedParticipant'
'mutedState'
])
},
mounted() {
@ -119,7 +118,9 @@
},
toggleAudio(){
this.$refs.popover.close();
this.isAudioMuted = this.$refs.cscMedia.toggleAudio();
this.isAudioMuted
? this.$store.commit('conference/removeMutedState', this.remoteParticipant.id)
: this.$store.commit('conference/addMutedState', this.remoteParticipant.id)
},
audioLabel() {
return this.isAudioMuted
@ -131,9 +132,9 @@
remoteMediaStreams() {
this.assignStream();
},
isMuted(){
this.isAudioMuted = this.isMuted;
this.$refs.cscMedia.toggleAudio(this.isMuted);
mutedState(){
this.isAudioMuted = this.mutedState.includes(this.remoteParticipant.id);
this.$refs.cscMedia.toggleAudio(this.isAudioMuted);
}
}
}

@ -25,6 +25,7 @@ export default {
leaveState: RequestState.initiated,
leaveError: null,
participants: [],
mutedState: [],
remoteMediaStreams: {},
selectedParticipant: null,
manualSelection: false
@ -100,6 +101,9 @@ export default {
participantsList(state) {
return state.participants;
},
mutedState(state){
return state.mutedState;
},
remoteMediaStreams(state) {
return state.remoteMediaStreams;
},
@ -225,6 +229,16 @@ export default {
},
setManualSelection(state, val){
state.manualSelection = val;
},
addMutedState(state, participantId){
if(!state.mutedState[participantId]){
state.mutedState.push(participantId);
}
},
removeMutedState(state, participantId){
state.mutedState = state.mutedState.filter(($participant) => {
return participantId !== $participant;
});
}
},
actions: {
@ -418,6 +432,17 @@ export default {
context.commit('leaveFailed', err.message);
}
}
},
muteAll(context){
for(let participant of context.getters.participantsList){
context.commit('addMutedState', participant);
}
},
unMuteAll(context){
for(let participant of context.getters.participantsList){
context.commit('removeMutedState', participant);
}
}
}
}

Loading…
Cancel
Save