chad/client/app/app.vue
Никита Круглицкий e6a274cc9d
All checks were successful
Deploy / deploy (push) Successful in 1m6s
#6
2025-10-04 02:53:42 +06:00

25 lines
539 B
Vue

<template>
<PrimeProgressSpinner v-if="initializing" />
<template v-for="(s, producerId) in streams" :key="producerId">
<PrimeChip :label="producerId" />
<audio
:ref="(el) => onAudioRef(el as HTMLAudioElement, s)"
autoplay
controls
style="display: none;"
/>
</template>
</template>
<script lang="ts" setup>
const { initializing, connected, streams } = useMediasoup()
function onAudioRef(ref: HTMLAudioElement, stream: MediaStream) {
if (!ref)
return
ref.srcObject = stream
}
</script>