Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
chore(component): rename and remove some props
Browse files Browse the repository at this point in the history
  • Loading branch information
lemredd committed Nov 22, 2022
1 parent 2491c88 commit 65f7e89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 4 additions & 5 deletions components/consultation/call/self_participant.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div :id="selfParticipantId" class="self-participant">
<div v-if="!mustShowVideo" class="profile-user">
<div v-if="!isShowingVideo" class="profile-user">
<ProfilePicture
class="profile-picture"
:user="userProfile"/>
Expand All @@ -9,7 +9,7 @@
:id="containerId"
class="track-container">
<video
v-if="!isJoined && mustShowVideo"
v-if="!isJoined && isShowingVideo"
ref="previewVideo"
class="preview-video">
</video>
Expand Down Expand Up @@ -73,14 +73,13 @@ const { userProfile } = pageProps
type DefinedProps = {
containerId: string
isJoined: boolean
mustShowVideo: boolean
mustTransmitAudio: boolean
isShowingVideo: boolean
}
const props = defineProps<DefinedProps>()
const selfParticipantId = `${userProfile.data.id}_${userProfile.data.name}`
const previewVideo = ref<HTMLVideoElement|null>(null)
const mustShowVideo = computed(() => props.mustShowVideo)
const mustShowVideo = computed(() => props.isShowingVideo)
function previewVideoTrack() {
if (navigator.mediaDevices) {
navigator.mediaDevices.getUserMedia({ "video": true })
Expand Down
3 changes: 1 addition & 2 deletions pages/consultation/call.page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<div class="call">
<div class="participants">
<SelfParticipant
v-model:must-show-video="isShowingVideo"
v-model:must-transmit-audio="isTransmittingAudio"
v-model:is-showing-video="isShowingVideo"
:is-joined="isJoined"
:container-id="selfParticipantID"
class="local-participant"/>
Expand Down

0 comments on commit 65f7e89

Please sign in to comment.