Add basic screen sharing

This commit is contained in:
mplorentz
2026-03-26 10:59:50 -04:00
parent 5792f77fdc
commit ef291006e2
4 changed files with 137 additions and 27 deletions
+7 -3
View File
@@ -5,10 +5,11 @@
type Props = {
track: Track
muted?: boolean
fit?: "cover" | "contain"
class?: string
}
const {track, muted = true, class: className = ""}: Props = $props()
const {track, muted = true, fit = "cover", class: className = ""}: Props = $props()
let el = $state<HTMLVideoElement | undefined>()
@@ -23,5 +24,8 @@
})
</script>
<video bind:this={el} class={cx("h-full w-full object-cover", className)} playsinline {muted}
></video>
<video
bind:this={el}
class={cx("h-full w-full", fit === "contain" ? "object-contain" : "object-cover", className)}
playsinline
{muted}></video>