Skip to content

Commit

Permalink
set the default preset only on the first load
Browse files Browse the repository at this point in the history
  • Loading branch information
khavinshankar committed Sep 14, 2023
1 parent cc6b570 commit 8c083fc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Components/Facility/Consultations/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export const Feed: React.FC<IFeedProps> = ({ consultationId, facilityId }) => {
}, []);

useEffect(() => {
if (streamStatus === StreamStatus.Playing) {
if (!currentPreset && streamStatus === StreamStatus.Playing) {
setLoading(CAMERA_STATES.MOVING.GENERIC);
const preset =
bedPresets?.find(
Expand Down Expand Up @@ -506,7 +506,6 @@ export const Feed: React.FC<IFeedProps> = ({ consultationId, facilityId }) => {
<div className="absolute right-8 top-8 z-10 flex flex-col gap-4">
{["fullScreen", "reset", "updatePreset", "zoomIn", "zoomOut"].map(
(button, index) => {
if (isIOS && button === "reset") return null;
const option = cameraPTZ.find(
(option) => option.action === button
);
Expand Down

0 comments on commit 8c083fc

Please sign in to comment.