@@ -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,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