Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
ramdos0207 committed Jan 21, 2025
1 parent 4508887 commit b5b47f9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
23 changes: 22 additions & 1 deletion src/components/Main/MainView/QallView/AudioTrack.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { onMounted, onUnmounted, ref, useTemplateRef, watchEffect } from 'vue'
import UserIcon from '/@/components/UI/UserIcon.vue'
import type { TrackInfo } from '/@/composables/qall/useLiveKitSDK'
const { trackInfo } = defineProps<{
Expand All @@ -23,10 +24,30 @@ onMounted(() => {
onUnmounted(() => {
trackInfo.trackPublication?.track?.detach()
})
const userIdOfRamdos = '8f7a93ab-1e92-4dc6-b1a2-4231ab1681c7'
</script>

<template>
<div>{{ trackInfo.participantIdentity }}</div>
<audio :id="trackInfo.trackPublication?.trackSid" ref="audioElement"></audio>
<div :class="$style.UserCard">
<audio
:id="trackInfo.trackPublication?.trackSid"
ref="audioElement"
></audio>
<user-icon :class="$style.InnerIcon" :size="96" :user-id="userIdOfRamdos" />

Check failure on line 37 in src/components/Main/MainView/QallView/AudioTrack.vue

View workflow job for this annotation

GitHub Actions / run type-check

Type '96' is not assignable to type 'IconSize | undefined'.
</div>
<input v-model="volume" type="range" min="0" max="1" step="0.01" />
</template>
<style lang="scss" module>
.UserCard {
height: 108px;
width: 192px;
border: 1px solid black;
}
.InnerIcon {
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
}
</style>
27 changes: 3 additions & 24 deletions src/components/Main/MainView/QallView/QallView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { useQall } from '/@/composables/qall/useQall'
import VideoComponent from '/@/components/Main/MainView/QallView/VideoTrack.vue'

Check warning on line 3 in src/components/Main/MainView/QallView/QallView.vue

View workflow job for this annotation

GitHub Actions / run lint

'VideoComponent' is defined but never used
import AudioComponent from '/@/components/Main/MainView/QallView/AudioTrack.vue'

Check warning on line 4 in src/components/Main/MainView/QallView/QallView.vue

View workflow job for this annotation

GitHub Actions / run lint

'AudioComponent' is defined but never used
import UserList from '/@/components/Main/MainView/QallView/UserList.vue'
import { onMounted, ref } from 'vue'
const { tracksMap, addScreenShareTrack, addCameraTrack } = useQall()
Expand Down Expand Up @@ -35,34 +36,12 @@ const selectedVideoInput = ref<MediaDeviceInfo>()
>
Add Camera Track
</button>
<div :class="$style.TrackContainer">
<template
v-for="track of tracksMap.values()"
:key="track.trackPublication?.trackSid"
>
<VideoComponent
v-if="track.trackPublication?.kind === 'video'"
:track-info="track"
:participant-identity="track.participantIdentity"
:class="$style.video"
/>
<AudioComponent
v-else-if="track.trackPublication?.kind === 'audio' && track.isRemote"
:track-info="track"
/>
</template>
</div>
<UserList />
</div>
</template>

<style lang="scss" module>
.TrackContainer {
height: fit-content;
}
.video {
width: 50%;
height: 50%;
}
.Block {
color: green;
overflow: scroll;
Expand Down
1 change: 1 addition & 0 deletions src/components/Main/MainView/QallView/VideoTrack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ onUnmounted(() => {
:id="trackInfo.trackPublication.trackSid"
ref="videoElement"
:class="$style.video"

></video>
<input v-model="volume" type="range" min="0" max="1" step="0.01" />
<button
Expand Down

0 comments on commit b5b47f9

Please sign in to comment.