(feat): add screenshare previews
This commit is contained in:
parent
39144e97b3
commit
2f0072f422
6 changed files with 423 additions and 44 deletions
|
|
@ -2,6 +2,7 @@ import { VideoTrack, useParticipantTracks } from "@livekit/components-react";
|
|||
import { TrackPublication } from "livekit-client";
|
||||
import { useCall } from "../store";
|
||||
import { cn } from "@tensamin/ui";
|
||||
import { Loader2 } from "lucide-react";
|
||||
|
||||
export default function VideoViewer({
|
||||
className,
|
||||
|
|
@ -21,9 +22,7 @@ export default function VideoViewer({
|
|||
});
|
||||
const trackRef = tracks[0];
|
||||
|
||||
if (!trackRef) {
|
||||
return null;
|
||||
}
|
||||
if (!trackRef) return <Loader2 className="animate-spin" />;
|
||||
|
||||
return (
|
||||
<VideoTrack
|
||||
|
|
|
|||
Loading…
Reference in a new issue