TT#70200 Conferencing > most recent joined participant as current selected one

- Can see the most recent joined participant as selected user (#70201)

Logic:
1. if no participant has been manually selected during the conference, the last who joins becomes selected
2. if a participant is  manually selected during the conference, the logic on point 1. is bypassed (ux)
3. if the current selected participant leaves the conference, the logic on point 1. is restored

Change-Id: I5741d19d45aaa2cfb465d3545824c44ee6c67261
changes/43/35043/9
Hans-Peter Herzog 6 years ago committed by Carlo Venusino
parent 8cf6234e63
commit 8f0fa87c5d

@ -75,6 +75,7 @@
},
setSelectedParticipant(participant){
this.$store.commit('conference/setSelectedParticipant', participant);
this.$store.commit('conference/setManualSelection', true);
}
},
watch: {

@ -27,7 +27,8 @@
import { QIcon, QCard, QCardMedia, QCardTitle } from 'quasar-framework'
import CscMedia from "../../CscMedia";
import {
mapGetters
mapGetters,
mapState
} from 'vuex'
export default {
name: 'csc-conference-remote-participant',
@ -50,12 +51,18 @@
'hasRemoteVideo',
],
computed: {
...mapState('conference', [
'manualSelection'
]),
...mapGetters('conference', [
'selectedParticipant'
])
},
mounted() {
this.assignStream(this);
if(!this.manualSelection){
this.$store.commit('conference/setSelectedParticipant', this.remoteParticipant.id);
}
},
methods: {
assignStream: (scope) => {
@ -67,8 +74,8 @@
scope.$store.commit('conference/setSelectedParticipant', scope.remoteParticipant.id);
}
}
else if (this.$refs.cscMedia) {
this.$refs.cscMedia.reset();
else if (scope.$refs.cscMedia) {
scope.$refs.cscMedia.reset();
}
}
},

@ -26,7 +26,8 @@ export default {
leaveError: null,
participants: [],
remoteMediaStreams: {},
selectedParticipant: null
selectedParticipant: null,
manualSelection: false
},
getters: {
username(state, getters, rootState, rootGetters) {
@ -210,6 +211,7 @@ export default {
}
else if(state.selectedParticipant == participant.getId()){
state.selectedParticipant = 'local';
state.manualSelection = false;
}
state.participants = state.participants.filter(($participant) => {
return participant.getId() !== $participant;
@ -219,6 +221,9 @@ export default {
},
setSelectedParticipant(state, participant){
state.selectedParticipant = participant;
},
setManualSelection(state, val){
state.manualSelection = val;
}
},
actions: {

Loading…
Cancel
Save