From 48eabecb874e1131a1f79ad56754dafb047380d9 Mon Sep 17 00:00:00 2001 From: Robert Long Date: Thu, 2 Sep 2021 13:40:53 -0700 Subject: [PATCH] Disable drag in spotlight view --- src/VideoGrid.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/VideoGrid.jsx b/src/VideoGrid.jsx index 4b06db3..6b222b9 100644 --- a/src/VideoGrid.jsx +++ b/src/VideoGrid.jsx @@ -683,7 +683,7 @@ export function VideoGrid({ participants, layout }) { api.start(animate(newTiles)); }, - { filterTaps: true } + { filterTaps: true, enabled: layout === "gallery" } ); return ( @@ -709,6 +709,10 @@ export function VideoGrid({ participants, layout }) { ); } +VideoGrid.defaultProps = { + layout: "gallery", +}; + function ParticipantTile({ style, participant, remove, presenter, ...rest }) { const videoRef = useRef();