@@ -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,22 @@ export const VTFloatingInspector: React.FC<IProps> = ({
109
110
const { t } = useTranslation ( )
110
111
const inspectorRef = useRef < HTMLDivElement > ( null )
111
112
113
+ const debugMode = getIgnorePieceContentStatus ( )
114
+ const playPreviewUrl = debugMode ? 'http://some-ip-here:3000/preview.mp4' : previewUrl || ''
115
+
112
116
const itemDuration = content ?. sourceDuration || renderedDuration || 0
113
117
const seek = content ?. seek ?? 0
114
118
const loop = content ?. loop ?? false
115
119
116
120
const offsetTimePosition = timePosition + seek
117
121
118
- const showVideoPlayerInspector = ! hideHoverscrubPreview && previewUrl
122
+ const showVideoPlayerInspector = ! hideHoverscrubPreview && ( previewUrl || debugMode )
119
123
const showMiniInspectorClipData = shouldShowFloatingInspectorContent ( status ?? PieceStatusCode . UNKNOWN , content )
120
124
const showMiniInspectorNotice = noticeLevel !== null
121
125
const showMiniInspectorData = showMiniInspectorNotice || showMiniInspectorClipData
122
126
const showAnyFloatingInspector = Boolean ( showVideoPlayerInspector ) || showMiniInspectorData
123
127
124
- const shown = showMiniInspector && itemElement !== undefined && showAnyFloatingInspector
128
+ const shown = showMiniInspector && ( itemElement !== undefined || debugMode ) && showAnyFloatingInspector
125
129
126
130
const { style : floatingInspectorStyle , isFlipped } = useInspectorPosition ( position , inspectorRef , shown )
127
131
@@ -157,7 +161,7 @@ export const VTFloatingInspector: React.FC<IProps> = ({
157
161
ref = { inspectorRef }
158
162
loop = { loop }
159
163
seek = { seek }
160
- previewUrl = { previewUrl }
164
+ previewUrl = { playPreviewUrl }
161
165
timePosition = { offsetTimePosition }
162
166
studioSettings = { studio ?. settings }
163
167
floatingInspectorStyle = { floatingInspectorStyle }
0 commit comments