<template>
  <h1>yo</h1>
  <pre>{{ connected }}</pre>
  <audio v-for="(s, i) in streams" :key="i" :ref="(el) => onAudioRef(el, s)" autoplay controls />
</template>

<script lang="ts" setup>
const { connected, streams } = useMediasoup()

function onAudioRef(ref: Element, stream: MediaStream) {
  (ref as HTMLAudioElement).srcObject = stream
}
</script>
