forked from coracle/flotilla
Add basic screen sharing
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user