@@ -13,6 +13,7 @@ import { UIStudio } from '@sofie-automation/meteor-lib/dist/api/studios'
1313import { ITranslatableMessage , translateMessage } from '@sofie-automation/corelib/dist/TranslatableMessage'
1414import { IFloatingInspectorPosition , useInspectorPosition } from './IFloatingInspectorPosition'
1515import { ReadonlyDeep } from 'type-fest'
16+ import { getIgnorePieceContentStatus } from '../../lib/localStorage'
1617
1718interface 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