Skip to content

Commit f35621d

Browse files
committed
Merge branch 'bbc/upstream/vt-in-out-words' into release52
2 parents d718517 + 842a036 commit f35621d

File tree

3 files changed

+50
-9
lines changed

3 files changed

+50
-9
lines changed

packages/blueprints-integration/src/content.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ export interface VTContent extends BaseContent {
5555
/** Duration of extra content past sourceDuration. Not planned to play back but present on the media and playable. */
5656
postrollDuration?: number
5757
editable?: VTEditableParameters
58+
/** This is for the VT's in out words */
59+
firstWords?: string
60+
lastWords?: string
61+
fullScript?: string
5862
}
5963

6064
export interface GraphicsContent extends BaseContent {

packages/webui/src/client/styles/rundownView.scss

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2923,7 +2923,7 @@ svg.icon {
29232923
animation: 0.2s inspector-fadeIn;
29242924
animation-iteration-count: 1;
29252925
border: 1px black solid;
2926-
max-width: 26em;
2926+
width: 26em;
29272927
font-weight: 400;
29282928

29292929
&.segment-timeline__mini-inspector--sub-inspector {
@@ -3148,8 +3148,8 @@ svg.icon {
31483148
> .video-preview,
31493149
> .thumbnail {
31503150
display: block;
3151-
width: 320px;
3152-
height: 180px;
3151+
width: 414px;
3152+
height: 233px;
31533153
background: #000;
31543154
}
31553155

@@ -3263,6 +3263,32 @@ svg.icon {
32633263
word-break: break-all;
32643264
white-space: normal;
32653265
}
3266+
.mini-inspector__firstwords {
3267+
color: #ffffff;
3268+
font-weight: 200;
3269+
font-size: 0.8em;
3270+
letter-spacing: 0em;
3271+
line-height: 80%;
3272+
max-width: 60vw;
3273+
overflow: hidden;
3274+
text-overflow: ellipsis;
3275+
word-break: break-all;
3276+
white-space: normal;
3277+
}
3278+
.mini-inspector__lastwords {
3279+
color: #ffffff;
3280+
font-weight: 200;
3281+
font-size: 0.8em;
3282+
letter-spacing: 0em;
3283+
max-width: 60vw;
3284+
overflow: hidden;
3285+
text-overflow: ellipsis;
3286+
word-break: break-all;
3287+
white-space: normal;
3288+
position: absolute;
3289+
bottom: 7px;
3290+
right: 7px;
3291+
}
32663292
.mini-inspector__system {
32673293
font-weight: 300;
32683294
font-style: italic;

packages/webui/src/client/ui/FloatingInspectors/VTFloatingInspector.tsx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { UIStudio } from '@sofie-automation/meteor-lib/dist/api/studios'
1313
import { ITranslatableMessage, translateMessage } from '@sofie-automation/corelib/dist/TranslatableMessage'
1414
import { IFloatingInspectorPosition, useInspectorPosition } from './IFloatingInspectorPosition'
1515
import { ReadonlyDeep } from 'type-fest'
16+
import { getIgnorePieceContentStatus } from '../../lib/localStorage'
1617

1718
interface IProps {
1819
status: PieceStatusCode | undefined
@@ -109,19 +110,23 @@ export const VTFloatingInspector: React.FC<IProps> = ({
109110
const { t } = useTranslation()
110111
const inspectorRef = useRef<HTMLDivElement>(null)
111112

113+
// Display a "blank" video canvas when setting ?ignore_piece_content_status=1
114+
const debugMode = getIgnorePieceContentStatus()
115+
const playPreviewUrl = debugMode ? 'http://dummy-video/no-video.mp4' : previewUrl || ''
116+
112117
const itemDuration = content?.sourceDuration || renderedDuration || 0
113118
const seek = content?.seek ?? 0
114119
const loop = content?.loop ?? false
115120

116121
const offsetTimePosition = timePosition + seek
117122

118-
const showVideoPlayerInspector = !hideHoverscrubPreview && previewUrl
123+
const showVideoPlayerInspector = !hideHoverscrubPreview && (previewUrl || debugMode)
119124
const showMiniInspectorClipData = shouldShowFloatingInspectorContent(status ?? PieceStatusCode.UNKNOWN, content)
120125
const showMiniInspectorNotice = noticeLevel !== null
121126
const showMiniInspectorData = showMiniInspectorNotice || showMiniInspectorClipData
122127
const showAnyFloatingInspector = Boolean(showVideoPlayerInspector) || showMiniInspectorData
123128

124-
const shown = showMiniInspector && itemElement !== undefined && showAnyFloatingInspector
129+
const shown = showMiniInspector && (itemElement !== undefined || debugMode) && showAnyFloatingInspector
125130

126131
const { style: floatingInspectorStyle, isFlipped } = useInspectorPosition(position, inspectorRef, shown)
127132

@@ -142,9 +147,15 @@ export const VTFloatingInspector: React.FC<IProps> = ({
142147
>
143148
{showMiniInspectorNotice && noticeLevel && renderNotice(t, noticeLevel, noticeMessages)}
144149
{showMiniInspectorClipData && (
145-
<div className="segment-timeline__mini-inspector__properties">
146-
<span className="mini-inspector__value">{content?.fileName}</span>
147-
</div>
150+
<>
151+
<div className="segment-timeline__mini-inspector__properties">
152+
<span className="mini-inspector__value">{content?.fileName}</span>
153+
</div>
154+
<div className="segment-timeline__mini-inspector__properties">
155+
<span className="mini-inspector__firstwords">{content?.firstWords}</span>
156+
<span className="mini-inspector__lastwords">{content?.lastWords}</span>
157+
</div>
158+
</>
148159
)}
149160
</div>
150161
)
@@ -157,7 +168,7 @@ export const VTFloatingInspector: React.FC<IProps> = ({
157168
ref={inspectorRef}
158169
loop={loop}
159170
seek={seek}
160-
previewUrl={previewUrl}
171+
previewUrl={playPreviewUrl}
161172
timePosition={offsetTimePosition}
162173
studioSettings={studio?.settings}
163174
floatingInspectorStyle={floatingInspectorStyle}

0 commit comments

Comments
 (0)