From 2b80bac2122c2f3c7fd4e886107d708997fef412 Mon Sep 17 00:00:00 2001
From: Ashesh <3626859+Ashesh3@users.noreply.github.com>
Date: Wed, 11 Oct 2023 08:34:52 +0530
Subject: [PATCH] Track camera feed views and display offline status (#6408)
---
src/Common/hooks/useMSEplayer.ts | 3 ++
.../Facility/Consultations/Feed.tsx | 30 ++++++++++++++++---
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/src/Common/hooks/useMSEplayer.ts b/src/Common/hooks/useMSEplayer.ts
index b14f94a6a43..fcbf216ed6a 100644
--- a/src/Common/hooks/useMSEplayer.ts
+++ b/src/Common/hooks/useMSEplayer.ts
@@ -208,6 +208,9 @@ export const useMSEMediaPlayer = ({
readPacket(event.data);
}
};
+ ws.onerror = function (event) {
+ onError && onError(event);
+ };
},
false
);
diff --git a/src/Components/Facility/Consultations/Feed.tsx b/src/Components/Facility/Consultations/Feed.tsx
index 75ab72d168c..31691c736f4 100644
--- a/src/Components/Facility/Consultations/Feed.tsx
+++ b/src/Components/Facility/Consultations/Feed.tsx
@@ -32,6 +32,7 @@ import useKeyboardShortcut from "use-keyboard-shortcut";
import useFullscreen from "../../../Common/hooks/useFullscreen.js";
import { triggerGoal } from "../../../Integrations/Plausible.js";
import useAuthUser from "../../../Common/hooks/useAuthUser.js";
+import Spinner from "../../Common/Spinner.js";
interface IFeedProps {
facilityId: string;
@@ -57,6 +58,7 @@ export const Feed: React.FC
Feed is currently not live.
-- Click refresh button to try again. +
Trying to connect...
+
+