-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1255c9d
commit 620dfeb
Showing
2 changed files
with
99 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<script setup lang="ts"> | ||
import { useQall } from '/@/composables/qall/useQall' | ||
import VideoComponent from '/@/components/Main/MainView/QallView/VideoComponent.vue' | ||
import AudioComponent from '/@/components/Main/MainView/QallView/AudioComponent.vue' | ||
import { onMounted, ref } from 'vue' | ||
import ScreenShareComponent from './ScreenShareComponent.vue' | ||
import type { TrackInfo } from '/@/composables/qall/useLiveKitSDK' | ||
const { tracksMap, screenShareTrackSidMap } = useQall() | ||
const videoInputs = ref<MediaDeviceInfo[]>([]) | ||
onMounted(async () => { | ||
const devices = await navigator.mediaDevices.enumerateDevices() | ||
videoInputs.value = devices.filter(d => d.kind === 'videoinput') | ||
}) | ||
const selectedVideoInput = ref<MediaDeviceInfo>() | ||
const selectedTrack = ref<TrackInfo>() | ||
const { track } = defineProps<{ | ||
track: trackInfo | ||
}>() | ||
</script> | ||
|
||
<template v-for="[sid, track] in tracksMap.entries()" :key="sid"> | ||
<VideoComponent | ||
v-if=" | ||
track.trackPublication?.kind === 'video' && | ||
!screenShareTrackSidMap.has(sid) | ||
Check failure on line 28 in src/components/Main/MainView/QallView/TrackCard.vue GitHub Actions / run type-check
|
||
" | ||
:track-info="track" | ||
@click="selectedTrack = track" | ||
/> | ||
<ScreenShareComponent | ||
v-else-if="track.trackPublication?.kind === 'video'" | ||
:track-info="track" | ||
:audio-track-info="tracksMap.get(screenShareTrackSidMap.get(sid) ?? '')" | ||
Check failure on line 36 in src/components/Main/MainView/QallView/TrackCard.vue GitHub Actions / run type-check
|
||
@click="selectedTrack = track" | ||
/> | ||
<AudioComponent | ||
v-else-if=" | ||
track.trackPublication?.kind === 'audio' && | ||
track.isRemote && | ||
!screenShareTrackSidMap.values()?.some?.(valueSid => valueSid === sid) | ||
Check failure on line 43 in src/components/Main/MainView/QallView/TrackCard.vue GitHub Actions / run type-check
|
||
" | ||
:track-info="track" | ||
@click="selectedTrack = track" | ||
/> | ||
</template> | ||
|
||
<style lang="scss" module> | ||
.TrackContainer { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 8px; | ||
align-self: stretch; | ||
} | ||
.UserBlock { | ||
// border: 1px solid black; | ||
float: left; | ||
} | ||
.UserCard { | ||
height: 108px; | ||
width: 192px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters