Change-Id: I1ab7e1261673c27099f4f78cf6c8b5caf4531591changes/63/34663/2
parent
b9bb89d765
commit
37909a6bcc
@ -0,0 +1,66 @@
|
|||||||
|
<template>
|
||||||
|
<q-card
|
||||||
|
class="csc-conf-participant-cont"
|
||||||
|
>
|
||||||
|
<q-card-media
|
||||||
|
class="csc-avatar-cont"
|
||||||
|
v-if="!localMediaStream || localMediaStream && (!isCameraEnabled && !isScreenEnabled)"
|
||||||
|
>
|
||||||
|
<img src="/statics/avatar.png">
|
||||||
|
</q-card-media>
|
||||||
|
<csc-media
|
||||||
|
ref="cscMedia"
|
||||||
|
v-show="localMediaStream && (isCameraEnabled || isScreenEnabled)"
|
||||||
|
class="csc-media-cont"
|
||||||
|
:muted="true"
|
||||||
|
:stream="localMediaStream"
|
||||||
|
:preview="true"
|
||||||
|
/>
|
||||||
|
<q-card-title
|
||||||
|
class="csc-conf-participants-item-title"
|
||||||
|
>
|
||||||
|
{{ localParticipant.displayName }}
|
||||||
|
</q-card-title>
|
||||||
|
</q-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { QCard, QCardMedia, QCardTitle } from 'quasar-framework'
|
||||||
|
// import { mapGetters } from 'vuex'
|
||||||
|
import CscMedia from "../../CscMedia";
|
||||||
|
export default {
|
||||||
|
name: 'csc-conference-local-participant',
|
||||||
|
components: {
|
||||||
|
QCard,
|
||||||
|
QCardMedia,
|
||||||
|
QCardTitle,
|
||||||
|
CscMedia
|
||||||
|
},
|
||||||
|
props: [
|
||||||
|
'localParticipant',
|
||||||
|
'localMediaStream',
|
||||||
|
'isMicrophoneEnabled',
|
||||||
|
'isCameraEnabled',
|
||||||
|
'isScreenEnabled'
|
||||||
|
],
|
||||||
|
mounted(){
|
||||||
|
this.assignStream(this.localMediaStream);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
assignStream(stream) {
|
||||||
|
if(this.$refs.cscMedia) {
|
||||||
|
this.$refs.cscMedia.assignStream(stream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
localMediaStream(stream) {
|
||||||
|
this.assignStream(stream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" rel="stylesheet/stylus">
|
||||||
|
@import '../../../themes/app.common.styl'
|
||||||
|
</style>
|
@ -0,0 +1,80 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
class="row justify-right items-center"
|
||||||
|
id="csc-conf-participants-cont"
|
||||||
|
>
|
||||||
|
<csc-conference-local-participant
|
||||||
|
ref="localParticipant"
|
||||||
|
:local-participant="localParticipant"
|
||||||
|
:local-media-stream="localMediaStream"
|
||||||
|
:is-microphone-enabled="isMicrophoneEnabled"
|
||||||
|
:is-camera-enabled="isCameraEnabled"
|
||||||
|
:is-screen-enabled="isScreenEnabled"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
id="csc-conf-remote-participants-cont"
|
||||||
|
v-for="participantId in participantsList" :key="participantId">
|
||||||
|
<csc-conference-remote-participant
|
||||||
|
:participant-id="participantId"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {QCard, QCardMedia, QCardTitle} from 'quasar-framework'
|
||||||
|
import {mapGetters} from 'vuex'
|
||||||
|
import CscMedia from "../../CscMedia";
|
||||||
|
import CscConferenceRemoteParticipant from './CscConferenceRemoteParticipant'
|
||||||
|
import CscConferenceLocalParticipant from './CscConferenceLocalParticipant'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'csc-conference-participants',
|
||||||
|
components: {
|
||||||
|
QCard,
|
||||||
|
QCardMedia,
|
||||||
|
QCardTitle,
|
||||||
|
CscMedia,
|
||||||
|
CscConferenceRemoteParticipant,
|
||||||
|
CscConferenceLocalParticipant
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters('conference', [
|
||||||
|
'participantsList',
|
||||||
|
'localParticipant',
|
||||||
|
'localMediaStream',
|
||||||
|
'isMicrophoneEnabled',
|
||||||
|
'isCameraEnabled',
|
||||||
|
'isScreenEnabled'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.assignLocalMediaStream(this.localMediaStream);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
assignLocalMediaStream(stream) {
|
||||||
|
if(this.$refs.localParticipant) {
|
||||||
|
this.$refs.localParticipant.assignStream(stream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
localMediaStream(stream) {
|
||||||
|
this.assignLocalMediaStream(stream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" rel="stylesheet/stylus">
|
||||||
|
@import '../../../themes/app.common.styl'
|
||||||
|
#csc-conf-participants-cont
|
||||||
|
float right
|
||||||
|
padding 10px
|
||||||
|
display inline-block
|
||||||
|
height calc(100vh - 150px)
|
||||||
|
overflow hidden
|
||||||
|
|
||||||
|
#csc-conf-remote-participants-cont
|
||||||
|
overflow scroll
|
||||||
|
</style>
|
@ -0,0 +1,58 @@
|
|||||||
|
<template>
|
||||||
|
<q-card
|
||||||
|
class="csc-conf-participant-cont"
|
||||||
|
>
|
||||||
|
<q-card-media
|
||||||
|
class="csc-avatar-cont"
|
||||||
|
v-show="!hasRemoteMediaStream(participantId)"
|
||||||
|
>
|
||||||
|
<img src="/statics/avatar.png">
|
||||||
|
</q-card-media>
|
||||||
|
<csc-media
|
||||||
|
v-show="hasRemoteMediaStream(participantId)"
|
||||||
|
class="csc-media-cont"
|
||||||
|
ref="{{participantId}}"
|
||||||
|
:muted="false"
|
||||||
|
:stream="remoteMediaStream(participantId)"
|
||||||
|
:preview="true"
|
||||||
|
/>
|
||||||
|
<q-card-title
|
||||||
|
class="csc-conf-participants-item-title"
|
||||||
|
>
|
||||||
|
{{remoteParticipant(participantId).displayName}}
|
||||||
|
</q-card-title>
|
||||||
|
</q-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { QCard, QCardMedia, QCardTitle } from 'quasar-framework'
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
import CscMedia from "../../CscMedia";
|
||||||
|
export default {
|
||||||
|
name: 'csc-conference-remote-participant',
|
||||||
|
components: {
|
||||||
|
QCard,
|
||||||
|
QCardMedia,
|
||||||
|
QCardTitle,
|
||||||
|
CscMedia
|
||||||
|
},
|
||||||
|
props:['participantId'],
|
||||||
|
computed: {
|
||||||
|
...mapGetters('conference', [
|
||||||
|
'remoteParticipant',
|
||||||
|
'remoteMediaStream',
|
||||||
|
'hasRemoteMediaStream'
|
||||||
|
])
|
||||||
|
},
|
||||||
|
mounted(){
|
||||||
|
// workaround to retrigger :stream binding on csc-media component
|
||||||
|
if(this.hasRemoteMediaStream(this.participantId)){
|
||||||
|
this.$store.commit('conference/addRemoteMedia', this.participantId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" rel="stylesheet/stylus">
|
||||||
|
@import '../../../themes/app.common.styl'
|
||||||
|
</style>
|
After Width: | Height: | Size: 12 KiB |
Loading…
Reference in new issue