@@ -13,6 +13,7 @@ import { UIStudio } from '@sofie-automation/meteor-lib/dist/api/studios'
13
13
import { ITranslatableMessage , translateMessage } from '@sofie-automation/corelib/dist/TranslatableMessage'
14
14
import { IFloatingInspectorPosition , useInspectorPosition } from './IFloatingInspectorPosition'
15
15
import { ReadonlyDeep } from 'type-fest'
16
+ import { getIgnorePieceContentStatus } from '../../lib/localStorage'
16
17
17
18
interface IProps {
18
19
status : PieceStatusCode | undefined
@@ -109,19 +110,23 @@ export const VTFloatingInspector: React.FC<IProps> = ({
109
110
const { t } = useTranslation ( )
110
111
const inspectorRef = useRef < HTMLDivElement > ( null )
111
112
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
+
112
117
const itemDuration = content ?. sourceDuration || renderedDuration || 0
113
118
const seek = content ?. seek ?? 0
114
119
const loop = content ?. loop ?? false
115
120
116
121
const offsetTimePosition = timePosition + seek
117
122
118
- const showVideoPlayerInspector = ! hideHoverscrubPreview && previewUrl
123
+ const showVideoPlayerInspector = ! hideHoverscrubPreview && ( previewUrl || debugMode )
119
124
const showMiniInspectorClipData = shouldShowFloatingInspectorContent ( status ?? PieceStatusCode . UNKNOWN , content )
120
125
const showMiniInspectorNotice = noticeLevel !== null
121
126
const showMiniInspectorData = showMiniInspectorNotice || showMiniInspectorClipData
122
127
const showAnyFloatingInspector = Boolean ( showVideoPlayerInspector ) || showMiniInspectorData
123
128
124
- const shown = showMiniInspector && itemElement !== undefined && showAnyFloatingInspector
129
+ const shown = showMiniInspector && ( itemElement !== undefined || debugMode ) && showAnyFloatingInspector
125
130
126
131
const { style : floatingInspectorStyle , isFlipped } = useInspectorPosition ( position , inspectorRef , shown )
127
132
@@ -142,9 +147,15 @@ export const VTFloatingInspector: React.FC<IProps> = ({
142
147
>
143
148
{ showMiniInspectorNotice && noticeLevel && renderNotice ( t , noticeLevel , noticeMessages ) }
144
149
{ 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
+ </ >
148
159
) }
149
160
</ div >
150
161
)
@@ -157,7 +168,7 @@ export const VTFloatingInspector: React.FC<IProps> = ({
157
168
ref = { inspectorRef }
158
169
loop = { loop }
159
170
seek = { seek }
160
- previewUrl = { previewUrl }
171
+ previewUrl = { playPreviewUrl }
161
172
timePosition = { offsetTimePosition }
162
173
studioSettings = { studio ?. settings }
163
174
floatingInspectorStyle = { floatingInspectorStyle }
0 commit comments