Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sourcelayer "studio screen" (SOFIE-3132) #1189

Merged
merged 4 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion meteor/client/styles/_itemTypeColors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ $segment-layer-background-mic: #1e6820;
$segment-layer-background-guest: #008a92;
$segment-layer-background-local: #9a2bd8;
$segment-layer-background-local--second: darken($segment-layer-background-local, 10%);
$segment-layer-background-studio-screen: #641fb3;

$segment-item-disabled-background: #898989;
$segment-item-disabled-color: #c9c9c9;

$layer-types-solid: 'unknown', 'camera', 'lower-third', 'graphics', 'remote', 'vt', 'local', 'script', 'mic', 'guest';
$layer-types-solid: 'unknown', 'camera', 'lower-third', 'graphics', 'remote', 'vt', 'local', 'script', 'mic', 'guest',
'studio-screen';
$layer-types-gradient: 'live-speak'; //

$layer-types: join($layer-types-solid, $layer-types-gradient);
Expand Down Expand Up @@ -457,4 +459,5 @@ $layer-types: join($layer-types-solid, $layer-types-gradient);
--segment-layer-background-script: #{$segment-layer-background-script};
--segment-layer-background-mic: #{$segment-layer-background-mic};
--segment-layer-background-guest: #{$segment-layer-background-guest};
--segment-layer-background-studio-screen: #{$segment-layer-background-studio-screen};
}
1 change: 1 addition & 0 deletions meteor/client/ui/PieceIcons/PieceCountdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export interface IPropsHeader {

const supportedLayers = new Set([
SourceLayerType.GRAPHICS,
SourceLayerType.STUDIO_SCREEN,
SourceLayerType.LIVE_SPEAK,
SourceLayerType.REMOTE,
SourceLayerType.SPLITS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export const PieceMultistepChevron = function PieceMultistepChevron({
const noraContent = piece.instance.piece.content as NoraContent | undefined

const hasStepChevron =
(piece.sourceLayer?.type === SourceLayerType.GRAPHICS || piece.sourceLayer?.type === SourceLayerType.LOWER_THIRD) &&
(piece.sourceLayer?.type === SourceLayerType.GRAPHICS ||
piece.sourceLayer?.type === SourceLayerType.LOWER_THIRD ||
piece.sourceLayer?.type === SourceLayerType.STUDIO_SCREEN) &&
noraContent?.payload?.step?.enabled

if (!hasStepChevron) return null
Expand Down
1 change: 1 addition & 0 deletions meteor/client/ui/SegmentList/PieceHoverInspector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export function PieceHoverInspector({
)
case SourceLayerType.GRAPHICS:
case SourceLayerType.LOWER_THIRD:
case SourceLayerType.STUDIO_SCREEN:
return (
<L3rdFloatingInspector
showMiniInspector={hovering}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function renderPieceInside(
return ScriptRenderer({ ...props, elementOffset, hovering, typeClass })
case SourceLayerType.GRAPHICS:
case SourceLayerType.LOWER_THIRD:
case SourceLayerType.STUDIO_SCREEN:
return GraphicsRenderer({ ...props, elementOffset, hovering, typeClass })
case SourceLayerType.SPLITS:
return SplitsRenderer({ ...props, elementOffset, hovering, typeClass })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
return SplitsThumbnailRenderer(props)
case SourceLayerType.GRAPHICS:
case SourceLayerType.LOWER_THIRD:
case SourceLayerType.STUDIO_SCREEN:

Check warning on line 43 in meteor/client/ui/SegmentStoryboard/StoryboardPartThumbnail/Renderers/ThumbnailRendererFactory.ts

View check run for this annotation

Codecov / codecov/patch

meteor/client/ui/SegmentStoryboard/StoryboardPartThumbnail/Renderers/ThumbnailRendererFactory.ts#L43

Added line #L43 was not covered by tests
return GraphicsThumbnailRenderer(props)
case SourceLayerType.LOCAL:
return LocalThumbnailRenderer(props)
Expand Down
1 change: 1 addition & 0 deletions meteor/client/ui/SegmentTimeline/SourceLayerItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ export const SourceLayerItem = withTranslation()(
)
case SourceLayerType.GRAPHICS:
case SourceLayerType.LOWER_THIRD:
case SourceLayerType.STUDIO_SCREEN:
return (
<L3rdSourceRenderer
key={unprotectString(this.props.piece.instance._id)}
Expand Down
2 changes: 2 additions & 0 deletions meteor/client/ui/Settings/ShowStyle/SourceLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ function sourceLayerString(t: TFunction<'translation', undefined>, type: SourceL
// return t('Lights')
case SourceLayerType.LOCAL:
return t('Local')
case SourceLayerType.STUDIO_SCREEN:
return t('Studio Screen')
default:
assertNever(type)
return SourceLayerType[type]
Expand Down
3 changes: 2 additions & 1 deletion meteor/client/ui/Shelf/DashboardPieceButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ export class DashboardPieceButtonBase<T = {}> extends MeteorReactComponent<
: this.props.layer.type === SourceLayerType.SPLITS
? this.renderSplits(isList && this.props.showThumbnailsInList)
: this.props.layer.type === SourceLayerType.GRAPHICS ||
this.props.layer.type === SourceLayerType.LOWER_THIRD
this.props.layer.type === SourceLayerType.LOWER_THIRD ||
this.props.layer.type === SourceLayerType.STUDIO_SCREEN
? this.renderGraphics(isButtons || (isList && this.props.showThumbnailsInList))
: null}

Expand Down
1 change: 1 addition & 0 deletions meteor/client/ui/Shelf/Renderers/ItemRendererFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
return React.createElement(VTListItemRenderer, props)
case SourceLayerType.GRAPHICS:
case SourceLayerType.LOWER_THIRD:
case SourceLayerType.STUDIO_SCREEN:

Check warning on line 30 in meteor/client/ui/Shelf/Renderers/ItemRendererFactory.ts

View check run for this annotation

Codecov / codecov/patch

meteor/client/ui/Shelf/Renderers/ItemRendererFactory.ts#L30

Added line #L30 was not covered by tests
return React.createElement(L3rdListItemRenderer, props)
}

Expand Down
1 change: 1 addition & 0 deletions meteor/lib/api/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@
| 'live-speak'
| 'transition'
| 'local'
| 'studio-screen'

Check warning on line 756 in meteor/lib/api/rest.ts

View check run for this annotation

Codecov / codecov/patch

meteor/lib/api/rest.ts#L756

Added line #L756 was not covered by tests
exclusiveGroup?: string
}

Expand Down
6 changes: 6 additions & 0 deletions meteor/server/api/rest/v1/typeConversion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@
case 'vt':
layerType = SourceLayerType.VT
break
case 'studio-screen':
layerType = SourceLayerType.STUDIO_SCREEN
break

Check warning on line 174 in meteor/server/api/rest/v1/typeConversion.ts

View check run for this annotation

Codecov / codecov/patch

meteor/server/api/rest/v1/typeConversion.ts#L172-L174

Added lines #L172 - L174 were not covered by tests
default:
layerType = SourceLayerType.UNKNOWN
assertNever(apiSourceLayer.layerType)
Expand Down Expand Up @@ -223,6 +226,9 @@
case SourceLayerType.VT:
layerType = 'vt'
break
case SourceLayerType.STUDIO_SCREEN:
layerType = 'studio-screen'
break

Check warning on line 231 in meteor/server/api/rest/v1/typeConversion.ts

View check run for this annotation

Codecov / codecov/patch

meteor/server/api/rest/v1/typeConversion.ts#L229-L231

Added lines #L229 - L231 were not covered by tests
default:
layerType = 'unknown'
assertNever(sourceLayer.type)
Expand Down
2 changes: 2 additions & 0 deletions packages/shared-lib/src/core/model/ShowStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export enum SourceLayerType {
// LIGHTS = 14,
/** Uncontrolled local sources, such as PowerPoint presentation inputs, Weather systems, EVS replay machines, etc. */
LOCAL = 15,
/** Sources that are intended for a studio screen, such as weather, presentations etc. */
STUDIO_SCREEN = 16,
}

/** A single source layer, f.g Cameras, VT, Graphics, Remotes */
Expand Down