Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Force the bundler to build the player as its own file

Gabe Kangas0486c22aab9f
diff --git a/web/components/chat/ChatUserMessage/ChatUserMessage.tsx b/web/components/chat/ChatUserMessage/ChatUserMessage.tsx
index ad0001c62c..6d9572763c 100644
--- a/web/components/chat/ChatUserMessage/ChatUserMessage.tsx
+++ b/web/components/chat/ChatUserMessage/ChatUserMessage.tsx
@@ -63,6 +63,8 @@ export const ChatUserMessage: FC<ChatUserMessageProps> = ({
);
}
+ // TODO: Find a solution to get rid of or replace "he" library since
+ // it's overly large for only use in this one place.
useEffect(() => {
setFormattedMessage(he.decode(body));
}, [message]);
diff --git a/web/components/ui/Content/Content.tsx b/web/components/ui/Content/Content.tsx
index c4bdb47832..9d98a4c5e3 100644
--- a/web/components/ui/Content/Content.tsx
+++ b/web/components/ui/Content/Content.tsx
@@ -18,7 +18,7 @@ import {
} from '../../stores/ClientConfigStore';
import { ClientConfig } from '../../../interfaces/client-config.model';
import { CustomPageContent } from '../CustomPageContent/CustomPageContent';
-import { OwncastPlayer } from '../../video/OwncastPlayer/OwncastPlayer';
+
import styles from './Content.module.scss';
import { Sidebar } from '../Sidebar/Sidebar';
import { Footer } from '../Footer/Footer';
@@ -41,6 +41,8 @@ import { FollowModal } from '../../modals/FollowModal/FollowModal';
const { Content: AntContent } = Layout;
+// Lazy loaded components
+
const BrowserNotifyModal = dynamic(() =>
import('../../modals/BrowserNotifyModal/BrowserNotifyModal').then(mod => mod.BrowserNotifyModal),
);
@@ -49,6 +51,10 @@ const NotifyReminderPopup = dynamic(() =>
import('../NotifyReminderPopup/NotifyReminderPopup').then(mod => mod.NotifyReminderPopup),
);
+const OwncastPlayer = dynamic(() =>
+ import('../../video/OwncastPlayer/OwncastPlayer').then(mod => mod.OwncastPlayer),
+);
+
// We only need to load the chat container here if we're in mobile or narrow
// windows, so lazy loading it makes sense.
const ChatContainer = dynamic(() =>