@sigmaott/base-next 1.4.58 → 1.4.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- import { parseURL, withQuery } from 'ufo'
2
- import { ElNotification } from 'element-plus'
1
+ import { parseURL, withQuery } from "ufo";
2
+ import { ElNotification } from "element-plus";
3
3
 
4
4
  // Extend Window interface to include SigmaManager and shaka
5
5
  declare global {
6
6
  interface Window {
7
- SigmaManager: any
8
- shaka: any
7
+ SigmaManager: any;
8
+ shaka: any;
9
9
  }
10
10
  }
11
11
 
@@ -14,203 +14,215 @@ export function usePreviewLoader() {
14
14
 
15
15
  function loadScript(src: string): Promise<Event> {
16
16
  return new Promise((resolve, reject) => {
17
- const script = document.createElement('script')
18
- script.async = true
19
- script.src = src
20
- script.onload = resolve
21
- script.onerror = reject
22
- document.body.appendChild(script)
23
- })
17
+ const script = document.createElement("script");
18
+ script.async = true;
19
+ script.src = src;
20
+ script.onload = resolve;
21
+ script.onerror = reject;
22
+ document.body.appendChild(script);
23
+ });
24
24
  }
25
25
 
26
- const drmSrc = 'https://rs.sigmadrm.com/sdk/sigmaplayer/2.0.0/SigmaPlayer.min.js'
27
- let pendingPromise: Promise<any> | null = null
26
+ // const drmSrc = 'https://rs.sigmadrm.com/sdk/sigmaplayer/2.0.0/SigmaPlayer.min.js'
27
+ const drmSrc = "/scripts/SigmaPlayer.min.js";
28
+ let pendingPromise: Promise<any> | null = null;
28
29
 
29
30
  function promiseFinished() {
30
- pendingPromise = null
31
+ pendingPromise = null;
31
32
  }
32
33
 
33
34
  function loadDrm() {
34
- if (window.SigmaManager)
35
- return Promise.resolve(window.SigmaManager)
35
+ if (window.SigmaManager) return Promise.resolve(window.SigmaManager);
36
36
 
37
- if (pendingPromise)
38
- return pendingPromise
37
+ if (pendingPromise) return pendingPromise;
39
38
 
40
39
  pendingPromise = loadScript(drmSrc)
41
40
  .then(() => window.SigmaManager)
42
41
  .catch((error) => {
43
42
  ElNotification.error({
44
- title: 'Script Loading Error',
45
- message: 'Failed to load SigmaPlayer script. Please check your internet connection and try again.',
43
+ title: "Script Loading Error",
44
+ message:
45
+ "Failed to load SigmaPlayer script. Please check your internet connection and try again.",
46
46
  duration: 5000,
47
- })
48
- throw error
49
- })
50
- pendingPromise.then(promiseFinished).catch(promiseFinished)
51
- return pendingPromise
47
+ });
48
+ throw error;
49
+ });
50
+ pendingPromise.then(promiseFinished).catch(promiseFinished);
51
+ return pendingPromise;
52
52
  }
53
53
 
54
- const isLoaded = ref(false)
54
+ const isLoaded = ref(false);
55
55
 
56
56
  onMounted(async () => {
57
57
  try {
58
- await loadDrm()
59
- isLoaded.value = true
58
+ await loadDrm();
59
+ isLoaded.value = true;
60
+ } catch (error) {
61
+ console.error("Failed to load DRM script:", error);
62
+ isLoaded.value = false;
60
63
  }
61
- catch (error) {
62
- console.error('Failed to load DRM script:', error)
63
- isLoaded.value = false
64
- }
65
- })
64
+ });
66
65
 
67
66
  //
68
- const isLoaded2 = ref(false)
67
+ const isLoaded2 = ref(false);
69
68
 
70
- const shakaSrc = 'https://cdnjs.cloudflare.com/ajax/libs/shaka-player/3.0.4/shaka-player.compiled.js'
71
- let pendingShakaPromise: Promise<any> | null = null
69
+ const shakaSrc =
70
+ "https://cdnjs.cloudflare.com/ajax/libs/shaka-player/3.0.4/shaka-player.compiled.js";
71
+ let pendingShakaPromise: Promise<any> | null = null;
72
72
 
73
73
  function promiseFinishedShaka() {
74
- pendingShakaPromise = null
74
+ pendingShakaPromise = null;
75
75
  }
76
76
  function loadShaka() {
77
- if (window.shaka)
78
- return Promise.resolve(window.shaka)
77
+ if (window.shaka) return Promise.resolve(window.shaka);
79
78
 
80
- if (pendingShakaPromise)
81
- return pendingShakaPromise
79
+ if (pendingShakaPromise) return pendingShakaPromise;
82
80
 
83
81
  pendingShakaPromise = loadScript(shakaSrc)
84
82
  .then(() => window.shaka)
85
83
  .catch((error) => {
86
84
  ElNotification.error({
87
- title: 'Script Loading Error',
88
- message: 'Failed to load Shaka Player script. Please check your internet connection and try again.',
85
+ title: "Script Loading Error",
86
+ message:
87
+ "Failed to load Shaka Player script. Please check your internet connection and try again.",
89
88
  duration: 5000,
90
- })
91
- throw error
92
- })
93
- pendingShakaPromise.then(promiseFinishedShaka).catch(promiseFinishedShaka)
94
- return pendingShakaPromise
89
+ });
90
+ throw error;
91
+ });
92
+ pendingShakaPromise.then(promiseFinishedShaka).catch(promiseFinishedShaka);
93
+ return pendingShakaPromise;
95
94
  }
96
95
 
97
96
  onMounted(async () => {
98
97
  try {
99
- await loadShaka()
100
- isLoaded2.value = true
101
- }
102
- catch (error) {
103
- console.error('Failed to load Shaka script:', error)
104
- isLoaded2.value = false
98
+ await loadShaka();
99
+ isLoaded2.value = true;
100
+ } catch (error) {
101
+ console.error("Failed to load Shaka script:", error);
102
+ isLoaded2.value = false;
105
103
  }
106
- })
104
+ });
107
105
 
108
106
  return {
109
107
  isLoaded,
110
108
  isLoaded2,
111
- }
109
+ };
112
110
  // END PLAYER
113
111
  }
114
112
 
115
113
  interface ChannelActions {
116
- handleChannel?: (...rest: any) => void
117
- switchBlackout?: (...rest: any) => void
114
+ handleChannel?: (...rest: any) => void;
115
+ switchBlackout?: (...rest: any) => void;
118
116
  }
119
117
 
120
118
  const [useJobPreview, useInjectJobPreview] = createInjectionState(() => {
121
- const { isLoaded, isLoaded2 } = usePreviewLoader()
119
+ const { isLoaded, isLoaded2 } = usePreviewLoader();
122
120
 
123
121
  const actions = ref<Required<ChannelActions>>({
124
122
  handleChannel: () => {},
125
123
  switchBlackout: () => {},
126
- })
124
+ });
127
125
 
128
126
  const paramQueryPreview = ref({
129
- channelId: '',
130
- jobId: '',
131
- })
132
- const playVisible = ref(false)
127
+ channelId: "",
128
+ jobId: "",
129
+ });
130
+ const playVisible = ref(false);
133
131
 
134
- const channelName = ref('')
135
- const blackoutActive = ref('')
136
- const srcPreview1 = ref('')
137
- const srcPreview2 = ref('')
132
+ const channelName = ref("");
133
+ const blackoutActive = ref("");
134
+ const srcPreview1 = ref("");
135
+ const srcPreview2 = ref("");
138
136
 
139
- const vttLink = ref(undefined)
137
+ const vttLink = ref(undefined);
140
138
  // new mode replace catchup | live
141
- const playMode1 = ref('catchup')
142
- const playMode2 = ref('catchup')
143
- const catchupEnabled = ref(false)
139
+ const playMode1 = ref("catchup");
140
+ const playMode2 = ref("catchup");
141
+ const catchupEnabled = ref(false);
144
142
  function getCatchupTime() {
145
- return [dayjs().subtract(1, 'hour').format('HH:mm:ss'), dayjs().format('HH:mm:ss')]
143
+ return [
144
+ dayjs().subtract(1, "hour").format("HH:mm:ss"),
145
+ dayjs().format("HH:mm:ss"),
146
+ ];
146
147
  }
147
148
 
148
149
  function getTimeshiftTime() {
149
- return 30
150
+ return 30;
150
151
  }
151
152
 
152
153
  function getDelayTime() {
153
- return 30
154
+ return 30;
154
155
  }
155
156
 
156
- const catchupTime1 = ref(getCatchupTime())
157
- const catchupTime2 = ref(getCatchupTime())
158
- const delayTime1 = ref(getDelayTime())
159
- const delayTime2 = ref(getDelayTime())
160
- const timeshiftTime1 = ref(getTimeshiftTime())
161
- const timeshiftTime2 = ref(getTimeshiftTime())
162
- const typeOutput = ref('hls')
163
- const nameOutput = ref('')
164
- const drm1 = ref()
165
- const drm2 = ref()
166
- const drmCredentials = ref('')
167
- const videoType1 = ref(typeOutput.value === 'hls-dash' ? 'hls' : typeOutput.value)
168
- const videoType2 = ref(typeOutput.value === 'hls-dash' ? 'hls' : typeOutput.value)
169
- const channelType = ref('transcode')
170
- const isEventChannel = computed(() => channelType.value === 'event')
171
- const enableForensicWatermarkAB = ref(false)
172
-
173
- const isSigmaMediaServer = ref(false)
174
- const serverId = ref('')
175
-
176
- const channelId = computed(() => paramQueryPreview.value.channelId)
177
- const jobId = computed(() => paramQueryPreview.value.jobId)
157
+ const catchupTime1 = ref(getCatchupTime());
158
+ const catchupTime2 = ref(getCatchupTime());
159
+ const delayTime1 = ref(getDelayTime());
160
+ const delayTime2 = ref(getDelayTime());
161
+ const timeshiftTime1 = ref(getTimeshiftTime());
162
+ const timeshiftTime2 = ref(getTimeshiftTime());
163
+ const typeOutput = ref("hls");
164
+ const nameOutput = ref("");
165
+ const drm1 = ref();
166
+ const drm2 = ref();
167
+ const drmCredentials = ref("");
168
+ const videoType1 = ref(
169
+ typeOutput.value === "hls-dash" ? "hls" : typeOutput.value,
170
+ );
171
+ const videoType2 = ref(
172
+ typeOutput.value === "hls-dash" ? "hls" : typeOutput.value,
173
+ );
174
+ const channelType = ref("transcode");
175
+ const isEventChannel = computed(() => channelType.value === "event");
176
+ const enableForensicWatermarkAB = ref(false);
177
+
178
+ const isSigmaMediaServer = ref(false);
179
+ const serverId = ref("");
180
+
181
+ const channelId = computed(() => paramQueryPreview.value.channelId);
182
+ const jobId = computed(() => paramQueryPreview.value.jobId);
178
183
 
179
184
  const { data, refetch } = useQuery(
180
- ['preview-job', isEventChannel, channelId, jobId],
185
+ ["preview-job", isEventChannel, channelId, jobId],
181
186
  async () => {
182
- if (channelType.value === 'playout') {
183
- return await $playoutApi('api/playout/fast-channels/{id}/jobs/{jobId}/actions/get-preview', {
184
- method: 'GET',
185
- pathParams: {
186
- id: channelId.value,
187
- jobId: jobId.value,
187
+ if (channelType.value === "playout") {
188
+ return await $playoutApi(
189
+ "api/playout/fast-channels/{id}/jobs/{jobId}/actions/get-preview",
190
+ {
191
+ method: "GET",
192
+ pathParams: {
193
+ id: channelId.value,
194
+ jobId: jobId.value,
195
+ },
188
196
  },
189
- })
197
+ );
190
198
  }
191
199
 
192
200
  const endpoint = isEventChannel.value
193
- ? 'api/transcode/event-channels/{channelId}/jobs/{jobId}/actions/get-preview'
194
- : 'api/transcode/channels/{channelId}/jobs/{jobId}/actions/get-preview'
201
+ ? "api/transcode/event-channels/{channelId}/jobs/{jobId}/actions/get-preview"
202
+ : "api/transcode/channels/{channelId}/jobs/{jobId}/actions/get-preview";
195
203
  return await $transcodeApi(endpoint, {
196
- method: 'GET',
204
+ method: "GET",
197
205
  pathParams: {
198
206
  channelId: channelId.value,
199
207
  jobId: jobId.value,
200
208
  },
201
- })
209
+ });
202
210
  },
203
211
  {
204
- enabled: computed(() => (!!paramQueryPreview.value.channelId && !!paramQueryPreview.value.jobId)),
212
+ enabled: computed(
213
+ () =>
214
+ !!paramQueryPreview.value.channelId &&
215
+ !!paramQueryPreview.value.jobId,
216
+ ),
205
217
  refetchOnWindowFocus: false,
206
218
  keepPreviousData: true,
207
219
  },
208
- )
220
+ );
209
221
 
210
222
  // hh:mm:ss to timestamp
211
223
  function convertToTimestamp(time: string) {
212
- const dateObject = dayjs(time, 'HH:mm:ss')
213
- return Math.floor(dateObject.valueOf() / 1000)
224
+ const dateObject = dayjs(time, "HH:mm:ss");
225
+ return Math.floor(dateObject.valueOf() / 1000);
214
226
  }
215
227
 
216
228
  // TODO: update the logic for playMode
@@ -222,145 +234,166 @@ const [useJobPreview, useInjectJobPreview] = createInjectionState(() => {
222
234
  timeshiftTime,
223
235
  videoType,
224
236
  }: {
225
- srcStr?: string
226
- playMode: string
227
- catchupTime?: string[]
228
- delayTime?: number
229
- timeshiftTime?: number
230
- videoType?: string
237
+ srcStr?: string;
238
+ playMode: string;
239
+ catchupTime?: string[];
240
+ delayTime?: number;
241
+ timeshiftTime?: number;
242
+ videoType?: string;
231
243
  }) {
232
- const ext = videoType === 'hls' ? '.m3u8' : '.mpd'
244
+ const ext = videoType === "hls" ? ".m3u8" : ".mpd";
233
245
  const originalSrc = isEventChannel.value
234
246
  ? data.value.url
235
247
  : Array.isArray(data.value?.url)
236
248
  ? data.value?.url?.find((item: string) => item.includes(ext))
237
- : data.value?.url
249
+ : data.value?.url;
238
250
 
239
- const parsedSrc = parseURL((srcStr || originalSrc).replace('.m3u8', ext).replace('.mpd', ext))
251
+ const parsedSrc = parseURL(
252
+ (srcStr || originalSrc).replace(".m3u8", ext).replace(".mpd", ext),
253
+ );
240
254
 
241
- const src = parsedSrc.protocol && parsedSrc.host
242
- ? `${parsedSrc.protocol}//${parsedSrc.host}${parsedSrc.pathname}`
243
- : parsedSrc.pathname
255
+ const src =
256
+ parsedSrc.protocol && parsedSrc.host
257
+ ? `${parsedSrc.protocol}//${parsedSrc.host}${parsedSrc.pathname}`
258
+ : parsedSrc.pathname;
244
259
 
245
- if (playMode === 'catchup') {
260
+ if (playMode === "catchup") {
246
261
  return withQuery(src, {
247
262
  start: convertToTimestamp(catchupTime[0]),
248
263
  stop: convertToTimestamp(catchupTime[1]),
249
- })
250
- }
251
- else if (playMode === 'live') {
252
- return src
253
- }
254
- else if (playMode === 'delay') {
264
+ });
265
+ } else if (playMode === "live") {
266
+ return src;
267
+ } else if (playMode === "delay") {
255
268
  return withQuery(src, {
256
269
  delay: delayTime,
257
- })
258
- }
259
- else if (playMode === 'timeshift') {
270
+ });
271
+ } else if (playMode === "timeshift") {
260
272
  return withQuery(src, {
261
273
  timeshift: timeshiftTime,
262
- })
274
+ });
263
275
  }
264
- return src
276
+ return src;
265
277
  }
266
278
 
267
279
  function handleUpdateBlackoutMode(value: boolean) {
268
- blackoutActive.value = value
280
+ blackoutActive.value = value;
269
281
  }
270
282
 
271
- async function handlePlayback(payload: {
272
- channelId: string
273
- jobId: string
274
- type: string
275
- channelName: string
276
- blackoutActive: boolean
277
- typeOutput?: string
278
- nameOutput?: string
279
- drm?: any
280
- channelType?: string
281
- catchupEnabled?: boolean
282
- enableForensicWatermarkAB?: boolean
283
- }, actionsObj: ChannelActions = {}) {
284
- paramQueryPreview.value.jobId = payload.jobId
285
- paramQueryPreview.value.channelId = payload.channelId
286
- channelType.value = payload.channelType ?? ''
287
- channelName.value = payload.channelName
288
- blackoutActive.value = payload.blackoutActive
289
- console.log('🚀 ~ const[useJobPreview,useInjectJobPreview]=createInjectionState ~ payload:', payload)
290
- enableForensicWatermarkAB.value = payload.enableForensicWatermarkAB
283
+ async function handlePlayback(
284
+ payload: {
285
+ channelId: string;
286
+ jobId: string;
287
+ type: string;
288
+ channelName: string;
289
+ blackoutActive: boolean;
290
+ typeOutput?: string;
291
+ nameOutput?: string;
292
+ drm?: any;
293
+ channelType?: string;
294
+ catchupEnabled?: boolean;
295
+ enableForensicWatermarkAB?: boolean;
296
+ },
297
+ actionsObj: ChannelActions = {},
298
+ ) {
299
+ paramQueryPreview.value.jobId = payload.jobId;
300
+ paramQueryPreview.value.channelId = payload.channelId;
301
+ channelType.value = payload.channelType ?? "";
302
+ channelName.value = payload.channelName;
303
+ blackoutActive.value = payload.blackoutActive;
304
+ console.log(
305
+ "🚀 ~ const[useJobPreview,useInjectJobPreview]=createInjectionState ~ payload:",
306
+ payload,
307
+ );
308
+ enableForensicWatermarkAB.value = payload.enableForensicWatermarkAB;
291
309
 
292
310
  actions.value = {
293
311
  handleChannel: actionsObj.handleChannel || (() => {}),
294
312
  switchBlackout: actionsObj.switchBlackout || (() => {}),
295
- }
296
-
297
- const data = await refetch()
298
- serverId.value = data.data?.machineConfig?.machineId
299
- isSigmaMediaServer.value = data.data?.machineConfig?.machineType === 'SIGMA_MACHINE'
300
-
301
- catchupTime1.value = getCatchupTime()
302
- catchupTime2.value = getCatchupTime()
303
- delayTime1.value = getDelayTime()
304
- delayTime2.value = getDelayTime()
305
- timeshiftTime1.value = getTimeshiftTime()
306
- timeshiftTime2.value = getTimeshiftTime()
307
-
308
- const ext = (payload.typeOutput === 'hls-dash' ? 'hls' : payload.typeOutput) === 'hls' ? '.m3u8' : '.mpd'
309
-
310
- catchupEnabled.value = payload.catchupEnabled
311
- if (payload.type === 'catchup') {
312
- playMode1.value = 'catchup'
313
- playMode2.value = 'catchup'
314
- }
315
- else if (payload.type === 'package') {
316
- playMode1.value = 'live'
317
- playMode2.value = 'live'
313
+ };
314
+
315
+ const data = await refetch();
316
+ serverId.value = data.data?.machineConfig?.machineId;
317
+ isSigmaMediaServer.value =
318
+ data.data?.machineConfig?.machineType === "SIGMA_MACHINE";
319
+
320
+ catchupTime1.value = getCatchupTime();
321
+ catchupTime2.value = getCatchupTime();
322
+ delayTime1.value = getDelayTime();
323
+ delayTime2.value = getDelayTime();
324
+ timeshiftTime1.value = getTimeshiftTime();
325
+ timeshiftTime2.value = getTimeshiftTime();
326
+
327
+ const ext =
328
+ (payload.typeOutput === "hls-dash" ? "hls" : payload.typeOutput) === "hls"
329
+ ? ".m3u8"
330
+ : ".mpd";
331
+
332
+ catchupEnabled.value = payload.catchupEnabled;
333
+ if (payload.type === "catchup") {
334
+ playMode1.value = "catchup";
335
+ playMode2.value = "catchup";
336
+ } else if (payload.type === "package") {
337
+ playMode1.value = "live";
338
+ playMode2.value = "live";
318
339
  }
319
340
 
320
341
  // SESSION: drm
321
- drm1.value = {
322
- ...payload.drm,
323
- sessionId: '',
324
- userId: '',
325
- appId: '',
326
- merchantId: '',
327
- } || undefined
328
- drm2.value = {
329
- ...payload.drm,
330
- sessionId: '',
331
- userId: '',
332
- appId: '',
333
- merchantId: '',
334
- } || undefined
335
-
336
- const keyProviderValue = payload.drm?.keyProvider === 'drmtoday' ? 'DRM_TODAY' : 'SIGMA'
337
-
338
- if (channelType.value === 'playout' && payload.drm?.enable) {
339
- const res = await $playoutApi('/api/playout/drm-credentials', {
342
+ drm1.value =
343
+ {
344
+ ...payload.drm,
345
+ sessionId: "",
346
+ userId: "",
347
+ appId: "",
348
+ merchantId: "",
349
+ } || undefined;
350
+ drm2.value =
351
+ {
352
+ ...payload.drm,
353
+ sessionId: "",
354
+ userId: "",
355
+ appId: "",
356
+ merchantId: "",
357
+ } || undefined;
358
+
359
+ const keyProviderValue =
360
+ payload.drm?.keyProvider === "drmtoday" ? "DRM_TODAY" : "SIGMA";
361
+
362
+ if (channelType.value === "playout" && payload.drm?.enable) {
363
+ const res = await $playoutApi("/api/playout/drm-credentials", {
340
364
  page: 1,
341
365
  perPage: 10,
342
- q: '',
343
- sort: '',
366
+ q: "",
367
+ sort: "",
344
368
  provider: keyProviderValue,
345
- })
346
-
347
- drmCredentials.value = res.data?.find(item => item.id === payload.drm?.drmManagementId)?.name
348
- }
349
- else if ((channelType.value === 'transcode' || channelType.value === 'package' || channelType.value === 'event') && payload.drm?.enable) {
350
- const res = await $transcodeApi('/api/transcode/drm-credentials', {
369
+ });
370
+
371
+ drmCredentials.value = res.data?.find(
372
+ (item) => item.id === payload.drm?.drmManagementId,
373
+ )?.name;
374
+ } else if (
375
+ (channelType.value === "transcode" ||
376
+ channelType.value === "package" ||
377
+ channelType.value === "event") &&
378
+ payload.drm?.enable
379
+ ) {
380
+ const res = await $transcodeApi("/api/transcode/drm-credentials", {
351
381
  page: 1,
352
382
  perPage: 1000,
353
383
  provider: keyProviderValue,
354
- })
355
- drmCredentials.value = res.data?.find(item => item.id === payload.drm?.drmManagementId)?.name
384
+ });
385
+ drmCredentials.value = res.data?.find(
386
+ (item) => item.id === payload.drm?.drmManagementId,
387
+ )?.name;
356
388
  }
357
389
  // END SESSION: drm
358
390
 
359
- typeOutput.value = payload.typeOutput ?? ''
360
- nameOutput.value = payload.nameOutput ?? ''
361
- typeOutput.value = payload.typeOutput ?? ''
362
- nameOutput.value = payload.nameOutput ?? ''
363
- videoType1.value = videoType2.value = typeOutput.value === 'hls-dash' ? 'hls' : typeOutput.value
391
+ typeOutput.value = payload.typeOutput ?? "";
392
+ nameOutput.value = payload.nameOutput ?? "";
393
+ typeOutput.value = payload.typeOutput ?? "";
394
+ nameOutput.value = payload.nameOutput ?? "";
395
+ videoType1.value = videoType2.value =
396
+ typeOutput.value === "hls-dash" ? "hls" : typeOutput.value;
364
397
 
365
398
  srcPreview1.value = handleChangeSrc({
366
399
  playMode: playMode1.value,
@@ -368,7 +401,7 @@ const [useJobPreview, useInjectJobPreview] = createInjectionState(() => {
368
401
  delayTime: delayTime1.value,
369
402
  timeshiftTime: timeshiftTime1.value,
370
403
  videoType: videoType1.value,
371
- })
404
+ });
372
405
 
373
406
  srcPreview2.value = handleChangeSrc({
374
407
  playMode: playMode2.value,
@@ -376,15 +409,15 @@ const [useJobPreview, useInjectJobPreview] = createInjectionState(() => {
376
409
  delayTime: delayTime2.value,
377
410
  timeshiftTime: timeshiftTime2.value,
378
411
  videoType: videoType2.value,
379
- })
412
+ });
380
413
 
381
- playVisible.value = true
414
+ playVisible.value = true;
382
415
  }
383
416
 
384
- const isHls1 = computed(() => videoType1.value === 'hls')
385
- const isDash1 = computed(() => videoType1.value === 'dash')
386
- const isHls2 = computed(() => videoType2.value === 'hls')
387
- const isDash2 = computed(() => videoType2.value === 'dash')
417
+ const isHls1 = computed(() => videoType1.value === "hls");
418
+ const isDash1 = computed(() => videoType1.value === "dash");
419
+ const isHls2 = computed(() => videoType2.value === "hls");
420
+ const isDash2 = computed(() => videoType2.value === "dash");
388
421
 
389
422
  return {
390
423
  paramQueryPreview,
@@ -429,10 +462,7 @@ const [useJobPreview, useInjectJobPreview] = createInjectionState(() => {
429
462
  blackoutActive,
430
463
  actions,
431
464
  enableForensicWatermarkAB,
432
- }
433
- })
465
+ };
466
+ });
434
467
 
435
- export {
436
- useJobPreview,
437
- useInjectJobPreview,
438
- }
468
+ export { useJobPreview, useInjectJobPreview };