hy-dispatch-ui-v3 0.2.87 → 0.2.88

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.
@@ -0,0 +1,951 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ require('../index.js');
7
+ require('../../hooks/index.js');
8
+ require('../../utils/index.js');
9
+ var elementPlus = require('element-plus');
10
+ var mediaLoading = require('./cpns/mediaLoading.vue.js');
11
+ var index = require('./locale/index.js');
12
+ var useLocale = require('../../hooks/useLocale.js');
13
+ var useBaseMainStore = require('../../hooks/useBaseMainStore.js');
14
+ var is = require('../../utils/is.js');
15
+ var index$1 = require('../hyConfirmDialog/index.js');
16
+ var handler = require('../../utils/handler.js');
17
+ var useMixins = require('../../hooks/useMixins.js');
18
+ var index$2 = require('../hyIcon/index.js');
19
+ var index$3 = require('../hyButton/index.js');
20
+ var timeUtils = require('../../utils/timeUtils.js');
21
+
22
+ const centerIconClass = "!w-[26px] !h-[26px] mr-[10px] group-[.is-full]:!w-[34px] group-[.is-full]:!h-[34px]";
23
+ const rightIconClass = "!w-5 !h-5 mr-[10px] group-[.is-full]:!w-[28px] group-[.is-full]:!h-[28px] group-[.is-full]:mr-5";
24
+ const floatIconClass = "!w-[26px] !h-[26px]";
25
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
26
+ __name: "videoPlayer1",
27
+ props: {
28
+ /* 下载 */
29
+ downloadFilesType: {
30
+ type: Boolean,
31
+ default: () => {
32
+ return true;
33
+ }
34
+ },
35
+ /* 播放规则 */
36
+ playRulesType: {
37
+ type: Boolean,
38
+ default: () => {
39
+ return true;
40
+ }
41
+ },
42
+ // 播放列表
43
+ playList: {
44
+ type: Array,
45
+ default: () => {
46
+ return [];
47
+ }
48
+ },
49
+ // 是否使用不可拖拽弹框模式
50
+ contentMode: {
51
+ type: Boolean,
52
+ default: () => {
53
+ return false;
54
+ }
55
+ }
56
+ },
57
+ emits: ["can-play", "play-start", "play-end", "on-time-update"],
58
+ setup(__props, { expose: __expose, emit: __emit }) {
59
+ const emit = __emit;
60
+ useLocale.registerComponentLocale("HyVideoPlayer", index);
61
+ vue.onUnmounted(() => {
62
+ useLocale.unregisterComponentLocale("HyVideoPlayer");
63
+ });
64
+ const $t = (key, option) => useLocale.$t(`HyVideoPlayer.${key}`, option);
65
+ const props = __props;
66
+ function useVideoPlayer(hy) {
67
+ const { baseMainStore } = useBaseMainStore.useBaseMainStore();
68
+ vue.onUnmounted(() => {
69
+ hy.videoEl.value = null;
70
+ });
71
+ vue.onMounted(() => {
72
+ hy.playRulesFn(3);
73
+ hy.speedFn(1);
74
+ hy.initVideo();
75
+ hy.initFullScreenEvent();
76
+ });
77
+ const isCanNotPlayType2 = vue.ref(true);
78
+ const speedList2 = vue.ref([
79
+ { value: 0.5, label: "0.5 X" },
80
+ { value: 1, label: "1.0 X" },
81
+ { value: 1.5, label: "1.5 X" },
82
+ { value: 2, label: "2.0 X" },
83
+ { value: 3, label: "3.0 X" }
84
+ ]);
85
+ const speed2 = vue.ref(1);
86
+ const playRuleslist2 = vue.ref([
87
+ {
88
+ value: 1,
89
+ label: $t("stopAfterPlayback"),
90
+ svgName: "ops-audio-media-center-stop-playing"
91
+ },
92
+ {
93
+ value: 2,
94
+ label: $t("continuousPlayback"),
95
+ svgName: "ops-audio-media-center-autoplay"
96
+ },
97
+ {
98
+ value: 3,
99
+ label: $t("loopPlayback"),
100
+ svgName: "ops-audio-media-center-loop-playback"
101
+ }
102
+ ]);
103
+ const playRules2 = vue.ref(1);
104
+ const videoItem2 = vue.ref({});
105
+ const videoUrl2 = vue.ref("");
106
+ const value2 = vue.ref(0);
107
+ const videoEl2 = vue.ref(null);
108
+ const videoState2 = vue.ref("NO_LOAD");
109
+ const curTime2 = vue.ref(0);
110
+ const totalTime2 = vue.ref(0);
111
+ const isDrop2 = vue.ref(false);
112
+ const isFullScreen2 = vue.ref(false);
113
+ const volumeValue2 = vue.ref(100);
114
+ const isChangeVolume2 = vue.ref(false);
115
+ const hasVLC2 = vue.ref(true);
116
+ const decodeSuccess2 = vue.ref(false);
117
+ const loading2 = vue.ref(false);
118
+ const buffering2 = vue.ref(false);
119
+ const speedLabel2 = vue.computed(() => {
120
+ if (hy.speed.value === 1) {
121
+ return $t("multiples");
122
+ } else {
123
+ return hy.speedList.value.find((item) => item.value === hy.speed.value).label;
124
+ }
125
+ });
126
+ const playItem2 = vue.computed(() => {
127
+ return hy.props.playList.find((item) => item.id === hy.videoItem.value.id);
128
+ });
129
+ const canPlay2 = vue.computed(() => {
130
+ return hy.videoState.value !== "NO_LOAD" || hy.videoState.value !== "CAN_NOT_PLAY";
131
+ });
132
+ function playRulesFn2(newPlayRules) {
133
+ if (newPlayRules === 3) {
134
+ hy.playRules.value = 1;
135
+ } else {
136
+ hy.playRules.value = newPlayRules + 1;
137
+ }
138
+ }
139
+ function speedFn2(newSpeed) {
140
+ hy.speed.value = newSpeed;
141
+ if (document.getElementById("#videoPlayer")) {
142
+ document.getElementById("#videoPlayer").playbackRate = speed2;
143
+ }
144
+ }
145
+ function findIndexFn2() {
146
+ return hy.props.playList.findIndex((item) => item.id === hy.videoItem.value.id);
147
+ }
148
+ function playNext2() {
149
+ const findIndex = hy.findIndexFn();
150
+ if (findIndex !== hy.props.playList.length - 1) {
151
+ hy.decodeSuccess.value = false;
152
+ const item = hy.props.playList[findIndex + 1];
153
+ hy.playVideo(item.filePath, item);
154
+ } else {
155
+ elementPlus.ElMessage.warning($t("currentIsTheLastItem"));
156
+ }
157
+ }
158
+ function playPrevious2() {
159
+ const findIndex = hy.findIndexFn();
160
+ if (findIndex > 0 && findIndex !== hy.props.playList.length) {
161
+ hy.decodeSuccess.value = false;
162
+ const item = hy.props.playList[findIndex - 1];
163
+ hy.playVideo(item.filePath, item);
164
+ } else {
165
+ elementPlus.ElMessage.warning($t("currentIsTheFirstItem"));
166
+ }
167
+ }
168
+ async function playVideo2(filePath, item) {
169
+ const { isSupport } = is.isSupportH265();
170
+ if (item && item.fileCoding === "H.265" && !isSupport) {
171
+ hy.videoState.value = "CAN_NOT_PLAY";
172
+ hy.isCanNotPlayType.value = true;
173
+ return;
174
+ }
175
+ if (hy.videoState.value === "CAN_NOT_PLAY") {
176
+ hy.videoState.value = "NO_LOAD";
177
+ await vue.nextTick();
178
+ hy.initVideo();
179
+ }
180
+ if (item) {
181
+ if (item.id !== hy.videoItem.value.id || !hy.videoEl.value.src) {
182
+ hy.loading.value = true;
183
+ hy.videoItem.value = item;
184
+ hy.videoUrl.value = filePath;
185
+ hy.videoEl.value.src = filePath;
186
+ }
187
+ } else {
188
+ if (hy.videoUrl.value === "") {
189
+ return false;
190
+ }
191
+ }
192
+ console.log("hy.videoItem.value.playSeconds", hy.videoItem.value.playSeconds);
193
+ if (hy.videoItem.value.playSeconds) {
194
+ hy.jumpDuration(hy.videoItem.value.playSeconds);
195
+ }
196
+ vue.nextTick(() => {
197
+ hy.videoEl.value.play();
198
+ hy.videoState.value = "PLAYING";
199
+ });
200
+ }
201
+ function createDownloadTask2(mediaFiles) {
202
+ baseMainStore.value.commit({
203
+ name: "downloadHistory",
204
+ data: {
205
+ methodName: "show",
206
+ params: { mediaFiles, contentMode: hy.props.contentMode }
207
+ }
208
+ });
209
+ }
210
+ function downloadFn2(event) {
211
+ event.stopPropagation();
212
+ if (hy.videoItem.value && hy.videoItem.value.id) {
213
+ elementPlus.ElMessage.warning($t("startDownloading"));
214
+ hy.createDownloadTask([hy.videoItem.value]);
215
+ }
216
+ }
217
+ function changeVolume2() {
218
+ if (!hy.videoEl.value) return;
219
+ hy.videoEl.value.volume = hy.volumeValue.value / 100;
220
+ }
221
+ function getNowWh2() {
222
+ hy.curTime.value = hy.totalTime.value * (hy.value.value / 100);
223
+ hy.videoEl.value.currentTime = hy.curTime.value;
224
+ hy.isDrop.value = false;
225
+ }
226
+ function getPercent2(num, total) {
227
+ num = parseFloat(num);
228
+ total = parseFloat(total);
229
+ if (isNaN(num) || isNaN(total)) {
230
+ return 0;
231
+ }
232
+ return total <= 0 ? 0 : Math.round(num / total * 1e4) / 100;
233
+ }
234
+ function resumePlay2() {
235
+ if (hy.videoState.value === "CAN_NOT_PLAY") return;
236
+ hy.videoEl.value && hy.videoEl.value.play();
237
+ }
238
+ function pauseVideo2() {
239
+ if (hy.videoState.value === "CAN_NOT_PLAY") return;
240
+ hy.videoEl.value && hy.videoEl.value.pause();
241
+ hy.videoState.value = "PAUSE";
242
+ }
243
+ function initVideo2() {
244
+ hy.videoEl.value = document.querySelector("#videoPlayer");
245
+ hy.videoEl.value.addEventListener("canplay", (e) => {
246
+ hy.buffering.value = true;
247
+ hy.loading.value = false;
248
+ if (!e.target?.videoWidth || !e.target?.videoHeight || !e.target?.webkitVideoDecodedByteCount) {
249
+ hy.videoEl.value.pause();
250
+ hy.videoState.value = "CAN_NOT_PLAY";
251
+ hy.isCanNotPlayType.value = true;
252
+ return;
253
+ }
254
+ hy.videoState.value = "IS_LOAD";
255
+ hy.totalTime.value = Math.floor(hy.videoEl.value.duration);
256
+ emit("can-play", hy.totalTime.value);
257
+ });
258
+ hy.videoEl.value.addEventListener("play", () => {
259
+ hy.videoEl.value.playbackRate = hy.speed.value;
260
+ hy.videoState.value = "PLAYING";
261
+ if (hy.videoUrl.value && hy.playItem.value) {
262
+ emit("play-start", hy.videoUrl.value, hy.playItem.value);
263
+ }
264
+ });
265
+ hy.videoEl.value.addEventListener("waiting", () => {
266
+ hy.buffering.value = true;
267
+ });
268
+ hy.videoEl.value.addEventListener("playing", () => {
269
+ hy.buffering.value = false;
270
+ });
271
+ hy.videoEl.value.addEventListener("pause", (e) => {
272
+ if (hy.isCanNotPlay(e)) {
273
+ return;
274
+ }
275
+ hy.buffering.value = false;
276
+ hy.videoState.value = "PAUSE";
277
+ });
278
+ hy.videoEl.value.addEventListener("ended", () => {
279
+ hy.videoState.value = "PLAY_END";
280
+ if (hy.playRules.value === 2) {
281
+ hy.playNext();
282
+ } else if (hy.playRules.value === 3) {
283
+ hy.videoEl.value.load();
284
+ hy.videoEl.value.play();
285
+ }
286
+ emit("play-end");
287
+ });
288
+ hy.videoEl.value.addEventListener(
289
+ "timeupdate",
290
+ (e) => {
291
+ if (hy.isCanNotPlay(e)) {
292
+ return;
293
+ }
294
+ hy.videoState.value = "PLAYING";
295
+ if (!hy.isDrop.value) {
296
+ if (hy.videoEl.value) {
297
+ hy.curTime.value = Math.floor(hy.videoEl.value.currentTime);
298
+ } else {
299
+ setTimeout(() => {
300
+ if (hy.videoEl.value) {
301
+ hy.curTime.value = Math.floor(hy.videoEl.value.currentTime);
302
+ }
303
+ }, 1e3);
304
+ }
305
+ hy.value.value = hy.curTime.value / hy.totalTime.value * 100;
306
+ emit("on-time-update", hy.curTime.value);
307
+ }
308
+ },
309
+ false
310
+ );
311
+ hy.videoEl.value.addEventListener("error", (e) => {
312
+ hy.buffering.value = false;
313
+ hy.loading.value = false;
314
+ hy.videoState.value = "CAN_NOT_PLAY";
315
+ hy.isCanNotPlayType.value = hy.isCantPlayType(e);
316
+ console.error("error", e);
317
+ hy.videoEl.value = null;
318
+ });
319
+ }
320
+ function isCantPlayType2(e) {
321
+ if (e.target.error) {
322
+ const { code, message } = e.target.error;
323
+ return code === 4 && !message.includes("Format error") || message.includes("PIPELINE_ERROR_DECODE");
324
+ }
325
+ return false;
326
+ }
327
+ function isCanNotPlay2(e) {
328
+ if (hy.videoState.value === "CAN_NOT_PLAY") {
329
+ return true;
330
+ }
331
+ if (e && e.target.error) {
332
+ const { code } = e.target.error;
333
+ return code === 4;
334
+ }
335
+ return false;
336
+ }
337
+ function initFullScreenEvent2() {
338
+ document.addEventListener("fullscreenchange", (e) => {
339
+ if (document.fullscreenElement) {
340
+ hy.isFullScreen.value = true;
341
+ } else {
342
+ hy.isFullScreen.value = false;
343
+ }
344
+ });
345
+ }
346
+ function jumpDuration2(s) {
347
+ hy.videoEl.value.currentTime = s;
348
+ }
349
+ function clickFullScreen2() {
350
+ if (hy.isFullScreen.value) {
351
+ hy.exitFullscreen();
352
+ } else {
353
+ hy.fullScreen();
354
+ }
355
+ }
356
+ function fullScreen2() {
357
+ const el = document.documentElement;
358
+ if (el.requestFullscreen) {
359
+ el.requestFullscreen();
360
+ }
361
+ }
362
+ function exitFullscreen2() {
363
+ const el = document;
364
+ if (el.exitFullscreen) {
365
+ el.exitFullscreen();
366
+ }
367
+ }
368
+ function openVLC2() {
369
+ const url = `hyvlc:${hy.videoUrl.value}`;
370
+ window.protocolCheck(url, () => {
371
+ hy.hasVLC.value = false;
372
+ elementPlus.ElMessage.error($t("notInstallVlcTips"));
373
+ });
374
+ }
375
+ function downloadVLC2() {
376
+ const url = JSON.parse(sessionCache.getCache("entryList"))?.toolSupport;
377
+ if (!url) {
378
+ elementPlus.ElMessage.error($t("dataError"));
379
+ return;
380
+ }
381
+ const newOpenWindow = window.open("about:blank");
382
+ if (newOpenWindow) {
383
+ newOpenWindow.location = `${window.location.protocol}${url}/#/vlc`;
384
+ }
385
+ if (newOpenWindow) {
386
+ elementPlus.ElMessage.success($t("operationSuccessful"));
387
+ } else {
388
+ index$1.HyConfirmDialog.tip({
389
+ titleImg: "tips",
390
+ title: $t("redirectNotice"),
391
+ content: `<div><p>${$t("theCurrentBrowserBlocksTheOpeningOfNewWindows")}</p><p>${$t(
392
+ "pleaseGoToTheBrowserSettingsAndClickOnTheDownloadOrCopyLinkToOpenInTheBrowser"
393
+ )}</p></div>`,
394
+ submitType: null,
395
+ submitText: $t("copyLink"),
396
+ onSubmit: () => {
397
+ handler.copyText(url);
398
+ }
399
+ });
400
+ }
401
+ }
402
+ return {
403
+ isCanNotPlayType: isCanNotPlayType2,
404
+ speedList: speedList2,
405
+ speed: speed2,
406
+ playRuleslist: playRuleslist2,
407
+ playRules: playRules2,
408
+ videoItem: videoItem2,
409
+ videoUrl: videoUrl2,
410
+ value: value2,
411
+ videoEl: videoEl2,
412
+ videoState: videoState2,
413
+ curTime: curTime2,
414
+ totalTime: totalTime2,
415
+ isDrop: isDrop2,
416
+ isFullScreen: isFullScreen2,
417
+ volumeValue: volumeValue2,
418
+ isChangeVolume: isChangeVolume2,
419
+ hasVLC: hasVLC2,
420
+ decodeSuccess: decodeSuccess2,
421
+ loading: loading2,
422
+ buffering: buffering2,
423
+ speedLabel: speedLabel2,
424
+ playItem: playItem2,
425
+ canPlay: canPlay2,
426
+ playRulesFn: playRulesFn2,
427
+ speedFn: speedFn2,
428
+ findIndexFn: findIndexFn2,
429
+ playNext: playNext2,
430
+ playPrevious: playPrevious2,
431
+ playVideo: playVideo2,
432
+ createDownloadTask: createDownloadTask2,
433
+ downloadFn: downloadFn2,
434
+ changeVolume: changeVolume2,
435
+ getNowWh: getNowWh2,
436
+ getPercent: getPercent2,
437
+ resumePlay: resumePlay2,
438
+ pauseVideo: pauseVideo2,
439
+ initVideo: initVideo2,
440
+ isCantPlayType: isCantPlayType2,
441
+ isCanNotPlay: isCanNotPlay2,
442
+ initFullScreenEvent: initFullScreenEvent2,
443
+ jumpDuration: jumpDuration2,
444
+ clickFullScreen: clickFullScreen2,
445
+ fullScreen: fullScreen2,
446
+ exitFullscreen: exitFullscreen2,
447
+ openVLC: openVLC2,
448
+ downloadVLC: downloadVLC2
449
+ };
450
+ }
451
+ const {
452
+ buffering,
453
+ canPlay,
454
+ changeVolume,
455
+ clickFullScreen,
456
+ createDownloadTask,
457
+ curTime,
458
+ decodeSuccess,
459
+ downloadFn,
460
+ downloadVLC,
461
+ exitFullscreen,
462
+ findIndexFn,
463
+ fullScreen,
464
+ getNowWh,
465
+ getPercent,
466
+ hasVLC,
467
+ initFullScreenEvent,
468
+ initVideo,
469
+ isCanNotPlay,
470
+ isCanNotPlayType,
471
+ isCantPlayType,
472
+ isChangeVolume,
473
+ isDrop,
474
+ isFullScreen,
475
+ jumpDuration,
476
+ loading,
477
+ openVLC,
478
+ pauseVideo,
479
+ playItem,
480
+ playNext,
481
+ playPrevious,
482
+ playRules,
483
+ playRulesFn,
484
+ playRuleslist,
485
+ playVideo,
486
+ resumePlay,
487
+ speed,
488
+ speedFn,
489
+ speedLabel,
490
+ speedList,
491
+ totalTime,
492
+ value,
493
+ videoEl,
494
+ videoItem,
495
+ videoState,
496
+ videoUrl,
497
+ volumeValue
498
+ } = useMixins.useMixins({ props }, [useVideoPlayer]);
499
+ __expose({
500
+ playVideo
501
+ });
502
+ return (_ctx, _cache) => {
503
+ return vue.openBlock(), vue.createElementBlock(
504
+ "div",
505
+ {
506
+ class: vue.normalizeClass([
507
+ "video-player-content group w-full h-full flex flex-col overflow-hidden rounded-[12px] border border-solid border-border bg-[#040814]",
508
+ vue.unref(isFullScreen) ? "full-video-player-content is-full fixed left-0 top-0 z-[999]" : "absolute"
509
+ ])
510
+ },
511
+ [
512
+ vue.createCommentVNode(" loading "),
513
+ vue.unref(loading) || vue.unref(buffering) ? (vue.openBlock(), vue.createElementBlock("div", {
514
+ key: 0,
515
+ class: "w-full h-full flex flex-col justify-center items-center"
516
+ }, [
517
+ vue.createVNode(mediaLoading.default),
518
+ vue.createElementVNode(
519
+ "span",
520
+ { class: "text-xs text-theme mt-4" },
521
+ "..." + vue.toDisplayString($t("videoResourcesAreLoading")) + "...",
522
+ 1
523
+ /* TEXT */
524
+ )
525
+ ])) : vue.createCommentVNode("v-if", true),
526
+ vue.unref(videoState) === "CAN_NOT_PLAY" ? (vue.openBlock(), vue.createElementBlock("div", {
527
+ key: 1,
528
+ class: "w-full h-full flex flex-col justify-center items-center"
529
+ }, [
530
+ vue.createCommentVNode(" \u91C7\u96C6\u7AD9\u6587\u4EF6 "),
531
+ vue.unref(videoItem) && vue.unref(videoItem).csFile === 1 && vue.unref(videoItem).onlineState !== 1 ? (vue.openBlock(), vue.createElementBlock(
532
+ vue.Fragment,
533
+ { key: 0 },
534
+ [
535
+ vue.createElementVNode("div", { class: "w-[54px] h-[54px] rounded-full border-[2px] border-danger-2 flex justify-center items-center shadow-[0px_0px_10px_2px_var(--danger-2)]" }, [
536
+ vue.createElementVNode("div", { class: "w-[42px] h-[42px] rounded-full border-[1px] border-dashed border-danger-2 flex justify-center items-center" }, [
537
+ vue.createVNode(vue.unref(index$2.HyIcon), {
538
+ "svg-name": "ops-button-icon-brok-link",
539
+ class: "!w-[24px] !h-[24px] text-danger-2"
540
+ })
541
+ ])
542
+ ]),
543
+ vue.createElementVNode(
544
+ "span",
545
+ { class: "text-xs text-auxiliary mt-4" },
546
+ vue.toDisplayString($t("fileLoadingFailed")),
547
+ 1
548
+ /* TEXT */
549
+ ),
550
+ vue.createElementVNode(
551
+ "span",
552
+ { class: "text-xs text-auxiliary" },
553
+ vue.toDisplayString($t("pleaseCheckWhetherTheCollectionStationIsOnlineAndWhetherTheFileExists")),
554
+ 1
555
+ /* TEXT */
556
+ )
557
+ ],
558
+ 64
559
+ /* STABLE_FRAGMENT */
560
+ )) : (vue.openBlock(), vue.createElementBlock(
561
+ vue.Fragment,
562
+ { key: 1 },
563
+ [
564
+ vue.createElementVNode("div", { class: "flex items-center justify-center text-auxiliary" }, [
565
+ vue.createVNode(vue.unref(index$2.HyIcon), {
566
+ "svg-name": "ops-audio-media-center-right-ripple",
567
+ class: "!w-[12px] !h-[12px]"
568
+ }),
569
+ vue.createVNode(vue.unref(index$2.HyIcon), {
570
+ "svg-name": "ops-audio-media-center-video",
571
+ class: "!w-[40px] !h-[40px] mx-1"
572
+ }),
573
+ vue.createVNode(vue.unref(index$2.HyIcon), {
574
+ "svg-name": "ops-audio-media-center-left-ripple",
575
+ class: "!w-[12px] !h-[12px]"
576
+ })
577
+ ]),
578
+ vue.createElementVNode(
579
+ "span",
580
+ { class: "text-theme mt-3 mb-[14px]" },
581
+ vue.toDisplayString(vue.unref(isCanNotPlayType) ? $t("vlcPlayerTip") : $t("videoCannotBePlayed")),
582
+ 1
583
+ /* TEXT */
584
+ ),
585
+ vue.unref(isCanNotPlayType) ? (vue.openBlock(), vue.createElementBlock("div", {
586
+ key: 0,
587
+ class: "flex justify-center"
588
+ }, [
589
+ vue.unref(hasVLC) ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.HyButton), {
590
+ key: 0,
591
+ class: "",
592
+ onClick: vue.unref(openVLC)
593
+ }, {
594
+ default: vue.withCtx(() => [
595
+ vue.createTextVNode(
596
+ vue.toDisplayString($t("clickPlay")),
597
+ 1
598
+ /* TEXT */
599
+ )
600
+ ]),
601
+ _: 1
602
+ /* STABLE */
603
+ }, 8, ["onClick"])) : (vue.openBlock(), vue.createBlock(vue.unref(index$3.HyButton), {
604
+ key: 1,
605
+ class: "",
606
+ onClick: vue.unref(downloadVLC)
607
+ }, {
608
+ default: vue.withCtx(() => [
609
+ vue.createTextVNode(
610
+ vue.toDisplayString($t("toDownloadVlc")),
611
+ 1
612
+ /* TEXT */
613
+ )
614
+ ]),
615
+ _: 1
616
+ /* STABLE */
617
+ }, 8, ["onClick"]))
618
+ ])) : vue.createCommentVNode("v-if", true)
619
+ ],
620
+ 64
621
+ /* STABLE_FRAGMENT */
622
+ )),
623
+ __props.playList?.length > 1 ? (vue.openBlock(), vue.createElementBlock(
624
+ vue.Fragment,
625
+ { key: 2 },
626
+ [
627
+ vue.createElementVNode("div", { class: "vlc-between-control absolute left-0 top-0 bottom-0 w-[30px] flex items-center justify-center bg-gradient-to-b from-[rgba(28,51,74,0)] via-[#1c334ac4] to-[rgba(28,51,74,0)]" }, [
628
+ vue.createElementVNode("div", {
629
+ class: "w-[30px] h-[30px] bg-[#3D6286] flex items-center justify-center clickBox",
630
+ onClick: vue.unref(playPrevious)
631
+ }, [
632
+ vue.createVNode(vue.unref(elementPlus.ElTooltip), {
633
+ effect: "dark",
634
+ content: $t("viewPreviousVideo"),
635
+ placement: "top"
636
+ }, {
637
+ default: vue.withCtx(() => [
638
+ vue.createVNode(vue.unref(index$2.HyIcon), {
639
+ "svg-name": "dispatch-Adv-v3-monitor-previous",
640
+ class: "!w-3 !h-3"
641
+ })
642
+ ]),
643
+ _: 1
644
+ /* STABLE */
645
+ }, 8, ["content"])
646
+ ], 8, ["onClick"])
647
+ ]),
648
+ vue.createElementVNode("div", { class: "vlc-between-control absolute right-0 top-0 bottom-0 w-[30px] flex items-center justify-center bg-gradient-to-b from-[rgba(28,51,74,0)] via-[#1c334ac4] to-[rgba(28,51,74,0)]" }, [
649
+ vue.createElementVNode("div", {
650
+ class: "w-[30px] h-[30px] bg-[#3D6286] flex items-center justify-center clickBox",
651
+ onClick: vue.unref(playNext)
652
+ }, [
653
+ vue.createVNode(vue.unref(elementPlus.ElTooltip), {
654
+ effect: "dark",
655
+ content: $t("viewNextVideo"),
656
+ placement: "top"
657
+ }, {
658
+ default: vue.withCtx(() => [
659
+ vue.createVNode(vue.unref(index$2.HyIcon), {
660
+ "svg-name": "dispatch-Adv-v3-monitor-next",
661
+ class: "!w-3 !h-3"
662
+ })
663
+ ]),
664
+ _: 1
665
+ /* STABLE */
666
+ }, 8, ["content"])
667
+ ], 8, ["onClick"])
668
+ ])
669
+ ],
670
+ 64
671
+ /* STABLE_FRAGMENT */
672
+ )) : vue.createCommentVNode("v-if", true)
673
+ ])) : (vue.openBlock(), vue.createElementBlock(
674
+ vue.Fragment,
675
+ { key: 2 },
676
+ [
677
+ vue.createElementVNode("video", {
678
+ id: "videoPlayer",
679
+ class: "w-full h-0 grow"
680
+ }, [
681
+ vue.createElementVNode("source", { type: "video/mp4" }),
682
+ vue.createElementVNode("source", { type: "video/webm" }),
683
+ vue.createElementVNode("source", { type: "video/ogg" }),
684
+ vue.createTextVNode(
685
+ " " + vue.toDisplayString($t("yourBrowserDoesNotSupportHTMLVideoPlayback")),
686
+ 1
687
+ /* TEXT */
688
+ )
689
+ ]),
690
+ vue.createElementVNode(
691
+ "div",
692
+ {
693
+ class: vue.normalizeClass(["operator-box relative w-full flex flex-row justify-between items-center pt-4 bg-[#040814] text-main", vue.unref(isFullScreen) ? "h-[65px]" : "h-[42px]"])
694
+ },
695
+ [
696
+ vue.createElementVNode("div", { class: "progress-box absolute top-0 w-full text-center" }, [
697
+ vue.withDirectives(vue.createElementVNode("input", {
698
+ max: "100",
699
+ class: "relative w-[99%] h-[6px] rounded-[20px] outline-none appearance-none bg-[#eaf5f9]",
700
+ style: vue.normalizeStyle({
701
+ background: `linear-gradient(to right, rgb(var(--hy-theme), 1) ${vue.unref(getPercent)(
702
+ vue.unref(value),
703
+ 100
704
+ )}%, rgb(var(--hy-theme), 0.5) ${vue.unref(getPercent)(vue.unref(value), 100)}% `
705
+ }),
706
+ type: "range",
707
+ onMouseup: ($event) => vue.unref(getNowWh)($event),
708
+ onMousedown: ($event) => isDrop.value = true,
709
+ ref: "progressRef",
710
+ id: "progress",
711
+ "onUpdate:modelValue": ($event) => vue.isRef(value) ? value.value = $event : null
712
+ }, null, 44, ["onMouseup", "onMousedown", "onUpdate:modelValue"]), [
713
+ [vue.vModelText, vue.unref(value)]
714
+ ])
715
+ ]),
716
+ vue.createElementVNode("div", { class: "left-operator flex w-[120px] text-xs font-bold leading-[20px] text-auxiliary" }, [
717
+ vue.createElementVNode(
718
+ "span",
719
+ { class: "is-play-seconds shrink-0 mx-2" },
720
+ vue.toDisplayString(vue.unref(timeUtils.formatSeconds)(vue.unref(curTime), Math.floor(vue.unref(totalTime) / 3600))) + '" ',
721
+ 1
722
+ /* TEXT */
723
+ ),
724
+ vue.createTextVNode(" / "),
725
+ vue.createElementVNode(
726
+ "span",
727
+ { class: "total-seconds shrink-0 mx-2" },
728
+ vue.toDisplayString(vue.unref(timeUtils.formatSeconds)(vue.unref(totalTime))) + '" ',
729
+ 1
730
+ /* TEXT */
731
+ )
732
+ ]),
733
+ vue.unref(canPlay) ? (vue.openBlock(), vue.createElementBlock("div", {
734
+ key: 0,
735
+ class: "center-operator flex w-[88px] justify-between items-center group-[.is-full]:h-[34px]"
736
+ }, [
737
+ vue.createElementVNode("span", { onClick: vue.unref(playPrevious) }, [
738
+ vue.createVNode(vue.unref(index$2.HyIcon), {
739
+ "svg-name": "ops-audio-audio-previous-btn",
740
+ class: vue.normalizeClass(centerIconClass)
741
+ })
742
+ ], 8, ["onClick"]),
743
+ vue.unref(videoState) !== "PLAYING" && vue.unref(canPlay) ? (vue.openBlock(), vue.createElementBlock("span", {
744
+ key: 0,
745
+ onClick: ($event) => vue.unref(playVideo)(vue.unref(videoUrl))
746
+ }, [
747
+ vue.createVNode(vue.unref(index$2.HyIcon), {
748
+ "svg-name": "ops-audio-audio-play-btn",
749
+ class: vue.normalizeClass(centerIconClass)
750
+ })
751
+ ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
752
+ vue.unref(videoState) === "PLAYING" ? (vue.openBlock(), vue.createElementBlock("span", {
753
+ key: 1,
754
+ onClick: vue.unref(pauseVideo)
755
+ }, [
756
+ vue.createVNode(vue.unref(index$2.HyIcon), {
757
+ "svg-name": "ops-audio-audio-pause-btn",
758
+ class: vue.normalizeClass(centerIconClass)
759
+ })
760
+ ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true),
761
+ vue.createElementVNode("span", { onClick: vue.unref(playNext) }, [
762
+ vue.createVNode(vue.unref(index$2.HyIcon), {
763
+ "svg-name": "ops-audio-audio-next-btn",
764
+ class: vue.normalizeClass(centerIconClass)
765
+ })
766
+ ], 8, ["onClick"])
767
+ ])) : vue.createCommentVNode("v-if", true),
768
+ vue.createElementVNode("div", { class: "right-operator relative flex items-center justify-end group-[.is-full]:h-[22px]" }, [
769
+ vue.createCommentVNode(" \u901F\u5EA6 "),
770
+ vue.createVNode(vue.unref(elementPlus.ElPopover), {
771
+ placement: "top",
772
+ appendToBody: false,
773
+ "popper-class": "minWidth0_popover popover_darkColor liveBroadcast w-[62px]",
774
+ trigger: "click"
775
+ }, {
776
+ reference: vue.withCtx(() => [
777
+ vue.createElementVNode("div", { class: "speed_box w-[60px] h-6 shrink-0 mr-[10px] rounded border border-solid border-border text-xs text-auxiliary flex items-center justify-center clickBox select-none px-1 box-border" }, [
778
+ vue.createElementVNode(
779
+ "div",
780
+ { class: "overflow-ellipsis overflow-hidden whitespace-nowrap" },
781
+ vue.toDisplayString(vue.unref(speedLabel)),
782
+ 1
783
+ /* TEXT */
784
+ )
785
+ ])
786
+ ]),
787
+ default: vue.withCtx(() => [
788
+ vue.createElementVNode("div", { class: "flex items-center justify-center p-[10px_0]" }, [
789
+ vue.createElementVNode("ul", { class: "speedList w-full text-auxiliary text-xs" }, [
790
+ (vue.openBlock(true), vue.createElementBlock(
791
+ vue.Fragment,
792
+ null,
793
+ vue.renderList(vue.unref(speedList), (item, index) => {
794
+ return vue.openBlock(), vue.createElementBlock("li", {
795
+ class: vue.normalizeClass(["clickBox h-[26px] leading-[26px] text-center hover:text-theme hover:bg-background-3", { "text-theme bg-background-3": item.value === vue.unref(speed) }]),
796
+ onClick: ($event) => vue.unref(speedFn)(item.value),
797
+ key: index
798
+ }, vue.toDisplayString(item.label), 11, ["onClick"]);
799
+ }),
800
+ 128
801
+ /* KEYED_FRAGMENT */
802
+ ))
803
+ ])
804
+ ])
805
+ ]),
806
+ _: 1
807
+ /* STABLE */
808
+ }),
809
+ vue.createCommentVNode(" \u58F0\u97F3 "),
810
+ vue.createVNode(vue.unref(elementPlus.ElPopover), {
811
+ placement: "top",
812
+ appendToBody: false,
813
+ "popper-class": "popover_volumeSlider w-[40px]",
814
+ trigger: "click"
815
+ }, {
816
+ reference: vue.withCtx(() => [
817
+ vue.createElementVNode("div", null, [
818
+ vue.createVNode(vue.unref(elementPlus.ElTooltip), {
819
+ class: "item",
820
+ effect: "dark",
821
+ content: $t("adjustPlaybackVolume"),
822
+ placement: "top"
823
+ }, {
824
+ default: vue.withCtx(() => [
825
+ vue.createVNode(vue.unref(index$2.HyIcon), {
826
+ "svg-name": "dispatch-share-audio-volumn",
827
+ class: vue.normalizeClass(rightIconClass)
828
+ })
829
+ ]),
830
+ _: 1
831
+ /* STABLE */
832
+ }, 8, ["content"])
833
+ ])
834
+ ]),
835
+ default: vue.withCtx(() => [
836
+ vue.createElementVNode("div", { class: "flex items-center justify-center" }, [
837
+ vue.createVNode(vue.unref(elementPlus.ElSlider), {
838
+ onInput: ($event) => vue.unref(changeVolume)($event),
839
+ class: "volume-slider",
840
+ modelValue: vue.unref(volumeValue),
841
+ "onUpdate:modelValue": ($event) => vue.isRef(volumeValue) ? volumeValue.value = $event : null,
842
+ vertical: "",
843
+ height: "105px"
844
+ }, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"])
845
+ ])
846
+ ]),
847
+ _: 1
848
+ /* STABLE */
849
+ }),
850
+ vue.createCommentVNode(" \u653E\u5927 "),
851
+ vue.createVNode(vue.unref(elementPlus.ElTooltip), {
852
+ class: "item clickBox",
853
+ effect: "dark",
854
+ content: $t("fullScreenSwitch"),
855
+ placement: "top",
856
+ appendToBody: false
857
+ }, {
858
+ default: vue.withCtx(() => [
859
+ vue.createVNode(vue.unref(index$2.HyIcon), {
860
+ onClick: vue.unref(clickFullScreen),
861
+ "svg-name": vue.unref(isFullScreen) ? "ops-audio-audio-reduce" : "ops-audio-audio-enlarge",
862
+ class: vue.normalizeClass(rightIconClass)
863
+ }, null, 8, ["onClick", "svg-name"])
864
+ ]),
865
+ _: 1
866
+ /* STABLE */
867
+ }, 8, ["content"])
868
+ ])
869
+ ],
870
+ 2
871
+ /* CLASS */
872
+ )
873
+ ],
874
+ 64
875
+ /* STABLE_FRAGMENT */
876
+ )),
877
+ __props.downloadFilesType || __props.playRulesType ? (vue.openBlock(), vue.createElementBlock(
878
+ "div",
879
+ {
880
+ key: 3,
881
+ class: vue.normalizeClass(["float-operator-item right-top-operator absolute top-5 right-[10px] z-[100] cursor-pointer text-main group-[.is-full]:right-4", { "!right-[43px]": vue.unref(videoState) === "CAN_NOT_PLAY" && __props.playList?.length > 1 }])
882
+ },
883
+ [
884
+ vue.createCommentVNode(" \u4E0B\u8F7D "),
885
+ __props.downloadFilesType ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
886
+ key: 0,
887
+ class: "item clickBox",
888
+ effect: "dark",
889
+ content: $t("downloadFile"),
890
+ placement: "top"
891
+ }, {
892
+ default: vue.withCtx(() => [
893
+ vue.createVNode(vue.unref(index$2.HyIcon), {
894
+ onClick: vue.withModifiers(vue.unref(downloadFn), ["stop"]),
895
+ "svg-name": "ops-audio-audio-down-btn",
896
+ class: vue.normalizeClass(floatIconClass)
897
+ }, null, 8, ["onClick"])
898
+ ]),
899
+ _: 1
900
+ /* STABLE */
901
+ }, 8, ["content"])) : vue.createCommentVNode("v-if", true),
902
+ vue.createCommentVNode(" \u64AD\u653E\u89C4\u5219 "),
903
+ __props.playRulesType && vue.unref(videoState) !== "CAN_NOT_PLAY" ? (vue.openBlock(), vue.createElementBlock("div", {
904
+ key: 1,
905
+ class: "mt-2 [&>div+div]:mt-[10px]"
906
+ }, [
907
+ (vue.openBlock(true), vue.createElementBlock(
908
+ vue.Fragment,
909
+ null,
910
+ vue.renderList(vue.unref(playRuleslist), (item, index) => {
911
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
912
+ onClick: ($event) => vue.unref(playRulesFn)(item.value),
913
+ key: index + "playRuleslist"
914
+ }, [
915
+ vue.createVNode(vue.unref(elementPlus.ElTooltip), {
916
+ class: "item clickBox",
917
+ effect: "dark",
918
+ content: item.label,
919
+ placement: "top"
920
+ }, {
921
+ default: vue.withCtx(() => [
922
+ vue.createVNode(vue.unref(index$2.HyIcon), {
923
+ "svg-name": item.svgName,
924
+ class: vue.normalizeClass(floatIconClass)
925
+ }, null, 8, ["svg-name"])
926
+ ]),
927
+ _: 2
928
+ /* DYNAMIC */
929
+ }, 1032, ["content"])
930
+ ], 8, ["onClick"])), [
931
+ [vue.vShow, vue.unref(playRules) === item.value]
932
+ ]);
933
+ }),
934
+ 128
935
+ /* KEYED_FRAGMENT */
936
+ ))
937
+ ])) : vue.createCommentVNode("v-if", true),
938
+ vue.renderSlot(_ctx.$slots, "pight-control-ranel", {}, void 0, true)
939
+ ],
940
+ 2
941
+ /* CLASS */
942
+ )) : vue.createCommentVNode("v-if", true)
943
+ ],
944
+ 2
945
+ /* CLASS */
946
+ );
947
+ };
948
+ }
949
+ });
950
+
951
+ exports.default = _sfc_main;