Skip to content

Commit b2ea74c

Browse files
committed
Add black background to stream container in case it doesn't load
1 parent 37b8e21 commit b2ea74c

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

src/Components/Containers/StreamContainer.tsx

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const StreamContainer = React.memo(({ spacetimeDB, settings }: IProps) => {
115115
};
116116

117117
return (
118-
<>
118+
<div style={{ display: "flex", width: "100%", height: "100%" }}>
119119
{config.streamingPlatform === "twitch" && !streamOverride && (
120120
<>
121121
{isChrome && (
@@ -218,14 +218,24 @@ const StreamContainer = React.memo(({ spacetimeDB, settings }: IProps) => {
218218
/>
219219
)}
220220

221-
{invalidOverride && (
222-
<div style={{ width: "100%", height: "100%", backgroundColor: "black", alignContent: "center" }} id="stream">
223-
<h1 style={{ color: "white", textAlign: "center", alignSelf: "center" }}>
224-
Unable to embed stream override. Website might not allow embedding. (Check console for details)
225-
</h1>
226-
</div>
227-
)}
228-
</>
221+
<div
222+
style={{
223+
width: "100%",
224+
height: "100%",
225+
backgroundColor: "black",
226+
alignContent: "center",
227+
position: "absolute",
228+
zIndex: "-1",
229+
}}
230+
id="stream"
231+
>
232+
<h1 style={{ color: "white", textAlign: "center", alignSelf: "center" }}>
233+
{invalidOverride && (
234+
<>Unable to embed stream override. Website might not allow embedding. (Check console for details)</>
235+
)}
236+
</h1>
237+
</div>
238+
</div>
229239
);
230240
});
231241

0 commit comments

Comments
 (0)