Skip to content

Commit 8ca5d97

Browse files
committed
Merge branch 'feat/vt-in-out-words-2' into bbc-release52
2 parents 8f54739 + f15e679 commit 8ca5d97

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
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: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3158,8 +3158,8 @@ svg.icon {
31583158
> .video-preview,
31593159
> .thumbnail {
31603160
display: block;
3161-
width: 320px;
3162-
height: 180px;
3161+
width: 414px;
3162+
height: 233px;
31633163
background: #000;
31643164
}
31653165

@@ -3273,6 +3273,19 @@ svg.icon {
32733273
word-break: break-all;
32743274
white-space: normal;
32753275
}
3276+
.mini-inspector__value__right {
3277+
font-weight: 200;
3278+
font-size: 0.8em;
3279+
letter-spacing: 0em;
3280+
max-width: 60vw;
3281+
overflow: hidden;
3282+
text-overflow: ellipsis;
3283+
word-break: break-all;
3284+
white-space: normal;
3285+
position: absolute;
3286+
bottom: 7px;
3287+
right: 7px;
3288+
}
32763289
.mini-inspector__system {
32773290
font-weight: 300;
32783291
font-style: italic;

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

Lines changed: 16 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,22 @@ export const VTFloatingInspector: React.FC<IProps> = ({
109110
const { t } = useTranslation()
110111
const inspectorRef = useRef<HTMLDivElement>(null)
111112

113+
const debugMode = getIgnorePieceContentStatus()
114+
const playPreviewUrl = debugMode ? 'http://some-ip-here:3000/preview.mp4' : previewUrl || ''
115+
112116
const itemDuration = content?.sourceDuration || renderedDuration || 0
113117
const seek = content?.seek ?? 0
114118
const loop = content?.loop ?? false
115119

116120
const offsetTimePosition = timePosition + seek
117121

118-
const showVideoPlayerInspector = !hideHoverscrubPreview && previewUrl
122+
const showVideoPlayerInspector = !hideHoverscrubPreview && (previewUrl || debugMode)
119123
const showMiniInspectorClipData = shouldShowFloatingInspectorContent(status ?? PieceStatusCode.UNKNOWN, content)
120124
const showMiniInspectorNotice = noticeLevel !== null
121125
const showMiniInspectorData = showMiniInspectorNotice || showMiniInspectorClipData
122126
const showAnyFloatingInspector = Boolean(showVideoPlayerInspector) || showMiniInspectorData
123127

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

126130
const { style: floatingInspectorStyle, isFlipped } = useInspectorPosition(position, inspectorRef, shown)
127131

@@ -142,9 +146,15 @@ export const VTFloatingInspector: React.FC<IProps> = ({
142146
>
143147
{showMiniInspectorNotice && noticeLevel && renderNotice(t, noticeLevel, noticeMessages)}
144148
{showMiniInspectorClipData && (
145-
<div className="segment-timeline__mini-inspector__properties">
146-
<span className="mini-inspector__value">{content?.fileName}</span>
147-
</div>
149+
<>
150+
<div className="segment-timeline__mini-inspector__properties">
151+
<span className="mini-inspector__value">{content?.fileName}</span>
152+
</div>
153+
<div className="segment-timeline__mini-inspector__properties">
154+
<span className="mini-inspector__value">{content?.firstWords}</span>
155+
<span className="mini-inspector__value__right">{content?.lastWords}</span>
156+
</div>
157+
</>
148158
)}
149159
</div>
150160
)
@@ -157,7 +167,7 @@ export const VTFloatingInspector: React.FC<IProps> = ({
157167
ref={inspectorRef}
158168
loop={loop}
159169
seek={seek}
160-
previewUrl={previewUrl}
170+
previewUrl={playPreviewUrl}
161171
timePosition={offsetTimePosition}
162172
studioSettings={studio?.settings}
163173
floatingInspectorStyle={floatingInspectorStyle}

0 commit comments

Comments
 (0)