Skip to content

Commit 34b12ed

Browse files
committed
Add "multiview"
Based on 4x4 grid layout Squeeze camera and overlay views to half height in order to fit prompter. Use checkerboard pattern for backgrounds to emphasize transparent nature of overlay window
1 parent 75f4262 commit 34b12ed

File tree

3 files changed

+95
-0
lines changed

3 files changed

+95
-0
lines changed

packages/webui/src/client/ui/ClockView/ClockView.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { CameraScreen } from './CameraScreen/index.js'
1414
import { MeteorPubSub } from '@sofie-automation/meteor-lib/dist/api/pubsub'
1515
import { useTranslation } from 'react-i18next'
1616
import { ClockViewIndex } from './ClockViewIndex.js'
17+
import { MultiviewScreen } from './MultiviewScreen.js'
1718

1819
export function ClockView({ studioId }: Readonly<{ studioId: StudioId }>): JSX.Element {
1920
useSubscription(MeteorPubSub.rundownPlaylistForStudio, studioId, true)
@@ -62,6 +63,9 @@ export function ClockView({ studioId }: Readonly<{ studioId: StudioId }>): JSX.E
6263
<CameraScreen playlist={playlist} studioId={studioId} />
6364
</RundownTimingProvider>
6465
</Route>
66+
<Route path="/countdowns/:studioId/multiview">
67+
<MultiviewScreen studioId={studioId} />
68+
</Route>
6569
<Route path="/countdowns/:studioId">
6670
<ClockViewIndex studioId={studioId} />
6771
</Route>

packages/webui/src/client/ui/ClockView/ClockViewIndex.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ export function ClockViewIndex({ studioId }: Readonly<{ studioId: StudioId }>):
3232
<li>
3333
<Link to={`/activeRundown/${studioId}`}>{t('Active Rundown')}</Link>
3434
</li>
35+
<li>
36+
<Link to={`/countdowns/${studioId}/multiview`}>{t('Multiview (All Screens)')}</Link>
37+
</li>
3538
</ul>
3639
</section>
3740
</section>
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
import { StudioId } from '@sofie-automation/corelib/dist/dataModel/Ids'
2+
3+
interface MultiviewScreenProps {
4+
studioId: StudioId
5+
}
6+
7+
export function MultiviewScreen({ studioId }: Readonly<MultiviewScreenProps>): JSX.Element {
8+
return (
9+
<>
10+
<style scoped={true}>
11+
{`
12+
.multiview-grid {
13+
display: grid;
14+
grid-template-columns: 1fr 1fr 1fr 1fr;
15+
grid-template-rows: 1fr 1fr 1fr 1fr;
16+
gap: 10px;
17+
height: 100vh;
18+
width: 100vw;
19+
padding: 10px;
20+
box-sizing: border-box;
21+
background: black;
22+
}
23+
.multiview-item {
24+
display: flex;
25+
flex-direction: column;
26+
border: 2px solid #cc0;
27+
}
28+
.multiview-item iframe {
29+
flex: 1;
30+
width: 100%;
31+
border: none;
32+
background:
33+
repeating-conic-gradient(#ddd 0% 25%, #eee 0% 50%)
34+
50% / 40px 40px;
35+
}
36+
.multiview-label {
37+
padding: 8px;
38+
text-align: center;
39+
background-color: #f0f0f0;
40+
font-weight: bold;
41+
}
42+
.multiview-presenter {
43+
grid-column: 1 / 3;
44+
grid-row: 1 / 3;
45+
}
46+
.multiview-director {
47+
grid-column: 3 / 5;
48+
grid-row: 1 / 3;
49+
}
50+
.multiview-prompter {
51+
grid-column: 1 / 3;
52+
grid-row: 3 / 5;
53+
}
54+
.multiview-overlay {
55+
grid-column: 3 / 5;
56+
grid-row: 3 / 4;
57+
}
58+
.multiview-camera {
59+
grid-column: 3 / 5;
60+
grid-row: 4 / 5;
61+
}
62+
`}
63+
</style>
64+
<div className="multiview-grid">
65+
<div className="multiview-item multiview-presenter">
66+
<iframe src={`/countdowns/${studioId}/presenter`} title="Presenter Screen" />
67+
<div className="multiview-label">Presenter Screen</div>
68+
</div>
69+
<div className="multiview-item multiview-director">
70+
<iframe src={`/countdowns/${studioId}/director`} title="Director Screen" />
71+
<div className="multiview-label">Director Screen</div>
72+
</div>
73+
<div className="multiview-item multiview-prompter">
74+
<iframe src={`/prompter/${studioId}`} title="Prompter" />
75+
<div className="multiview-label">Prompter</div>
76+
</div>
77+
<div className="multiview-item multiview-overlay">
78+
<iframe src={`/countdowns/${studioId}/overlay`} title="Overlay Screen" />
79+
<div className="multiview-label">Overlay Screen</div>
80+
</div>
81+
<div className="multiview-item multiview-camera">
82+
<iframe src={`/countdowns/${studioId}/camera`} title="Camera Screen" />
83+
<div className="multiview-label">Camera Screen</div>
84+
</div>
85+
</div>
86+
</>
87+
)
88+
}

0 commit comments

Comments
 (0)