hy-dispatch-ui-v3 0.2.87 → 0.2.89
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.
- package/dist/tailwind.css +180 -0
- package/es/api/file.mjs +14 -1
- package/es/components/hyAudioPlayer/audioPlayer.vue.mjs +5 -469
- package/es/components/hyAudioPlayer/audioPlayer2.vue.mjs +1321 -0
- package/es/components/hyAudioPlayer/hyAudioPlayer/audioPlayer.vue.mjs +472 -0
- package/es/components/hyAudioPlayer/{js → hyAudioPlayer/js}/index.mjs +5 -5
- package/es/components/hyAudioPlayer/index.mjs +2 -2
- package/es/components/hyAudioPlayer/locale/en_US.mjs +18 -0
- package/es/components/hyAudioPlayer/locale/index.mjs +2 -0
- package/es/components/hyAudioPlayer/locale/zh_CN.mjs +18 -0
- package/es/components/hyCheckboxGroup/checkboxGroup.vue.mjs +9 -7
- package/es/components/hyForm/cpns/formItem.vue.mjs +2 -0
- package/es/components/hyRadioGroup/radioGroup.vue.mjs +95 -49
- package/es/components/hyTable/table.vue.mjs +3 -3
- package/es/components/hyVideoPlayer/videoPlayer.vue.mjs +2 -2
- package/es/components/hyVideoPlayer/videoPlayer2.vue.mjs +734 -434
- package/es/static/hy-svg-icons/hy-icon-ops-audio-reduce.js +10 -0
- package/es/utils/timeUtils.mjs +8 -29
- package/es/version.mjs +1 -1
- package/lib/api/file.js +14 -0
- package/lib/components/hyAudioPlayer/audioPlayer.vue.js +5 -469
- package/lib/components/hyAudioPlayer/audioPlayer2.vue.js +1325 -0
- package/lib/components/hyAudioPlayer/hyAudioPlayer/audioPlayer.vue.js +476 -0
- package/lib/components/hyAudioPlayer/{js → hyAudioPlayer/js}/index.js +5 -5
- package/lib/components/hyAudioPlayer/locale/en_US.js +22 -0
- package/lib/components/hyAudioPlayer/locale/index.js +9 -0
- package/lib/components/hyAudioPlayer/locale/zh_CN.js +22 -0
- package/lib/components/hyCheckboxGroup/checkboxGroup.vue.js +11 -9
- package/lib/components/hyForm/cpns/formItem.vue.js +2 -0
- package/lib/components/hyRadioGroup/radioGroup.vue.js +94 -48
- package/lib/components/hyTable/table.vue.js +2 -2
- package/lib/components/hyVideoPlayer/videoPlayer.vue.js +2 -2
- package/lib/components/hyVideoPlayer/videoPlayer2.vue.js +732 -432
- package/lib/static/hy-svg-icons/hy-icon-ops-audio-reduce.js +10 -0
- package/lib/utils/timeUtils.js +8 -29
- package/lib/version.js +1 -1
- package/package.json +1 -1
- /package/es/components/hyAudioPlayer/{style → hyAudioPlayer/style}/audioPlayer.scss +0 -0
- /package/lib/components/hyAudioPlayer/{style → hyAudioPlayer/style}/audioPlayer.scss +0 -0
|
@@ -0,0 +1,1321 @@
|
|
|
1
|
+
import { defineComponent, onUnmounted, onMounted, ref, computed, openBlock, createElementBlock, createCommentVNode, createElementVNode, unref, createVNode, normalizeClass, toDisplayString, withDirectives, isRef, normalizeStyle, vModelText, Fragment, renderList, createBlock, withCtx, withModifiers, vShow, renderSlot } from 'vue';
|
|
2
|
+
import '../index.mjs';
|
|
3
|
+
import '../../hooks/index.mjs';
|
|
4
|
+
import '../../utils/index.mjs';
|
|
5
|
+
import { mediaFileRedirectApi } from '../../api/file.mjs';
|
|
6
|
+
import { ElMessage, ElPopover, ElSlider, ElTooltip } from 'element-plus';
|
|
7
|
+
import _sfc_main$1 from '../hyVideoPlayer/cpns/mediaLoading.vue.mjs';
|
|
8
|
+
import * as index from './locale/index.mjs';
|
|
9
|
+
import { registerComponentLocale, unregisterComponentLocale, $t } from '../../hooks/useLocale.mjs';
|
|
10
|
+
import { useBaseMainStore } from '../../hooks/useBaseMainStore.mjs';
|
|
11
|
+
import { useMixins } from '../../hooks/useMixins.mjs';
|
|
12
|
+
import { HyIcon } from '../hyIcon/index.mjs';
|
|
13
|
+
import { formatSeconds } from '../../utils/timeUtils.mjs';
|
|
14
|
+
|
|
15
|
+
const __default__ = defineComponent({
|
|
16
|
+
name: "HyAudioPlayer"
|
|
17
|
+
});
|
|
18
|
+
const centerIconClass = "group-[.is-full]:!w-[34px] group-[.is-full]:!h-[34px]";
|
|
19
|
+
const rightIconClass = "group-[.is-full]:!w-[28px] group-[.is-full]:!h-[28px] group-[.is-full]:mr-5";
|
|
20
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
|
+
...__default__,
|
|
22
|
+
props: {
|
|
23
|
+
// 模式:default-常规模式(画面 + 控制栏,支持全屏) simple-特别模式(单行控制栏)
|
|
24
|
+
mode: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "default",
|
|
27
|
+
validator: (value) => ["default", "simple"].includes(value)
|
|
28
|
+
},
|
|
29
|
+
/* 下载 */
|
|
30
|
+
downloadFilesType: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: () => {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
/* 播放规则 */
|
|
37
|
+
playRulesType: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: () => {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
// 是否通过 mediaFile/redirect 接口获取音频真实内容播放
|
|
44
|
+
getAudioContextType: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: () => {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
// 播放列表
|
|
51
|
+
playList: {
|
|
52
|
+
type: Array,
|
|
53
|
+
default: () => {
|
|
54
|
+
return [];
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
// 打点列表
|
|
58
|
+
pointList: {
|
|
59
|
+
type: Array,
|
|
60
|
+
default: () => {
|
|
61
|
+
return [];
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
// 是否使用不可拖拽弹框模式
|
|
65
|
+
contentMode: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: () => {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
emits: [
|
|
73
|
+
"can-play",
|
|
74
|
+
"play-start",
|
|
75
|
+
"play-end",
|
|
76
|
+
"on-time-update",
|
|
77
|
+
"play-error",
|
|
78
|
+
"load-notic"
|
|
79
|
+
],
|
|
80
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
81
|
+
;
|
|
82
|
+
const emit = __emit;
|
|
83
|
+
registerComponentLocale("HyAudioPlayer", index);
|
|
84
|
+
onUnmounted(() => {
|
|
85
|
+
unregisterComponentLocale("HyAudioPlayer");
|
|
86
|
+
});
|
|
87
|
+
const $t$1 = (key, option) => $t(`HyAudioPlayer.${key}`, option);
|
|
88
|
+
const props = __props;
|
|
89
|
+
function useAudioPlayer(hy) {
|
|
90
|
+
const { baseMainStore } = useBaseMainStore();
|
|
91
|
+
onUnmounted(() => {
|
|
92
|
+
hy.destroyAudio();
|
|
93
|
+
hy.destroyFullScreenEvent();
|
|
94
|
+
});
|
|
95
|
+
onMounted(() => {
|
|
96
|
+
hy.playRulesFn(3);
|
|
97
|
+
hy.speedFn(1);
|
|
98
|
+
hy.initAudio();
|
|
99
|
+
hy.initFullScreenEvent();
|
|
100
|
+
});
|
|
101
|
+
const progressThumbWidth2 = 10;
|
|
102
|
+
const pointReady2 = ref(false);
|
|
103
|
+
const pointMarkers2 = computed(() => {
|
|
104
|
+
const total = hy.totalTime.value;
|
|
105
|
+
const playId = hy.audioItem.value?.id;
|
|
106
|
+
if (!hy.pointReady.value || !total || !playId) return [];
|
|
107
|
+
return (hy.props.pointList || []).filter((item) => String(item.mediaFileId) === String(playId)).map((item) => ({ ...item, seconds: Number(item.time) })).filter((item) => !isNaN(item.seconds) && item.seconds >= 0 && item.seconds <= total).map((item) => ({ ...item, percent: item.seconds / total }));
|
|
108
|
+
});
|
|
109
|
+
function getPointLeft2(percent) {
|
|
110
|
+
const half = progressThumbWidth2 / 2;
|
|
111
|
+
return `calc(${half}px + (100% - ${progressThumbWidth2}px) * ${percent})`;
|
|
112
|
+
}
|
|
113
|
+
function clickPoint2(item) {
|
|
114
|
+
if (!hy.audioEl.value || hy.audioState.value === "CAN_NOT_PLAY") return;
|
|
115
|
+
hy.jumpDuration(item.seconds);
|
|
116
|
+
hy.curTime.value = Math.floor(item.seconds);
|
|
117
|
+
hy.value.value = item.seconds / hy.totalTime.value * 100;
|
|
118
|
+
}
|
|
119
|
+
const audioRef2 = ref(null);
|
|
120
|
+
const isHidePicture2 = ref(false);
|
|
121
|
+
const isFullScreen2 = ref(false);
|
|
122
|
+
const isSelfFullScreen2 = ref(false);
|
|
123
|
+
const speedList2 = ref([
|
|
124
|
+
{ value: 0.5, label: "0.5 X" },
|
|
125
|
+
{ value: 1, label: "1.0 X" },
|
|
126
|
+
{ value: 1.5, label: "1.5 X" },
|
|
127
|
+
{ value: 2, label: "2.0 X" },
|
|
128
|
+
{ value: 3, label: "3.0 X" }
|
|
129
|
+
]);
|
|
130
|
+
const speed2 = ref(1);
|
|
131
|
+
const playRuleslist2 = ref([
|
|
132
|
+
{
|
|
133
|
+
value: 1,
|
|
134
|
+
label: $t$1("stopAfterPlayback"),
|
|
135
|
+
svgName: "ops-audio-stopplayback"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
value: 2,
|
|
139
|
+
label: $t$1("continuousPlayback"),
|
|
140
|
+
svgName: "ops-audio-cycle"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
value: 3,
|
|
144
|
+
label: $t$1("loopPlayback"),
|
|
145
|
+
svgName: "ops-audio-sequentialplay"
|
|
146
|
+
}
|
|
147
|
+
]);
|
|
148
|
+
const playRules2 = ref(1);
|
|
149
|
+
const audioItem2 = ref({});
|
|
150
|
+
const audioUrl2 = ref("");
|
|
151
|
+
const value2 = ref(0);
|
|
152
|
+
const audioEl2 = ref(null);
|
|
153
|
+
const audioState2 = ref("NO_LOAD");
|
|
154
|
+
const curTime2 = ref(0);
|
|
155
|
+
const totalTime2 = ref(0);
|
|
156
|
+
const isDrop2 = ref(false);
|
|
157
|
+
const volumeValue2 = ref(100);
|
|
158
|
+
const loading2 = ref(false);
|
|
159
|
+
const buffering2 = ref(false);
|
|
160
|
+
const blobUrls2 = ref([]);
|
|
161
|
+
const isDestroyed2 = ref(false);
|
|
162
|
+
const speedLabel2 = computed(() => {
|
|
163
|
+
if (hy.speed.value === 1) {
|
|
164
|
+
return $t$1("multiples");
|
|
165
|
+
} else {
|
|
166
|
+
return hy.speedList.value.find((item) => item.value === hy.speed.value).label;
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
const playItem2 = computed(() => {
|
|
170
|
+
return hy.props.playList.find((item) => item.id === hy.audioItem.value.id);
|
|
171
|
+
});
|
|
172
|
+
const canPlay2 = computed(() => {
|
|
173
|
+
return !!hy.audioUrl.value && hy.audioState.value !== "CAN_NOT_PLAY";
|
|
174
|
+
});
|
|
175
|
+
function playRulesFn2(newPlayRules) {
|
|
176
|
+
if (newPlayRules === 3) {
|
|
177
|
+
hy.playRules.value = 1;
|
|
178
|
+
} else {
|
|
179
|
+
hy.playRules.value = newPlayRules + 1;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function speedFn2(newSpeed) {
|
|
183
|
+
hy.speed.value = newSpeed;
|
|
184
|
+
if (hy.audioEl.value) {
|
|
185
|
+
hy.audioEl.value.playbackRate = newSpeed;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function findIndexFn2() {
|
|
189
|
+
return hy.props.playList.findIndex((item) => item.id === hy.audioItem.value.id);
|
|
190
|
+
}
|
|
191
|
+
function playNext2() {
|
|
192
|
+
const findIndex = hy.findIndexFn();
|
|
193
|
+
if (findIndex !== hy.props.playList.length - 1) {
|
|
194
|
+
const item = hy.props.playList[findIndex + 1];
|
|
195
|
+
hy.playAudio(item.filePath, item);
|
|
196
|
+
} else {
|
|
197
|
+
ElMessage.warning($t$1("currentIsTheLastItem"));
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function playPrevious2() {
|
|
201
|
+
const findIndex = hy.findIndexFn();
|
|
202
|
+
if (findIndex > 0 && findIndex !== hy.props.playList.length) {
|
|
203
|
+
const item = hy.props.playList[findIndex - 1];
|
|
204
|
+
hy.playAudio(item.filePath, item);
|
|
205
|
+
} else {
|
|
206
|
+
ElMessage.warning($t$1("currentIsTheFirstItem"));
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
function safePlay2() {
|
|
210
|
+
const el = hy.audioEl.value;
|
|
211
|
+
if (!el || !el.src) return;
|
|
212
|
+
const playPromise = el.play();
|
|
213
|
+
if (playPromise && playPromise.catch) {
|
|
214
|
+
playPromise.catch((err) => {
|
|
215
|
+
if (err && err.name === "AbortError") return;
|
|
216
|
+
console.warn("audio play failed", err);
|
|
217
|
+
hy.buffering.value = false;
|
|
218
|
+
if (hy.audioState.value !== "CAN_NOT_PLAY") {
|
|
219
|
+
hy.audioState.value = "PAUSE";
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function resetProgress2() {
|
|
225
|
+
hy.curTime.value = 0;
|
|
226
|
+
hy.totalTime.value = 0;
|
|
227
|
+
hy.value.value = 0;
|
|
228
|
+
}
|
|
229
|
+
async function playAudio2(filePath, item) {
|
|
230
|
+
const el = hy.audioEl.value;
|
|
231
|
+
if (!el) return;
|
|
232
|
+
if (item) {
|
|
233
|
+
if (item.id !== hy.audioItem.value.id || !el.src) {
|
|
234
|
+
emit("load-notic", true);
|
|
235
|
+
hy.loading.value = true;
|
|
236
|
+
hy.buffering.value = false;
|
|
237
|
+
hy.pointReady.value = false;
|
|
238
|
+
hy.audioItem.value = item;
|
|
239
|
+
hy.audioState.value = "NO_LOAD";
|
|
240
|
+
hy.resetProgress();
|
|
241
|
+
if (hy.props.getAudioContextType) {
|
|
242
|
+
hy.audioUrl.value = "";
|
|
243
|
+
const success = await hy.getAudioContext(item.id);
|
|
244
|
+
if (!success) return;
|
|
245
|
+
} else {
|
|
246
|
+
hy.audioUrl.value = filePath;
|
|
247
|
+
el.src = filePath;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
} else if (hy.audioUrl.value === "") {
|
|
251
|
+
return false;
|
|
252
|
+
}
|
|
253
|
+
if (hy.audioState.value === "CAN_NOT_PLAY") return;
|
|
254
|
+
if (hy.audioItem.value.playSeconds) {
|
|
255
|
+
hy.jumpDuration(hy.audioItem.value.playSeconds);
|
|
256
|
+
}
|
|
257
|
+
hy.safePlay();
|
|
258
|
+
}
|
|
259
|
+
async function getAudioContext2(mediaFileId) {
|
|
260
|
+
try {
|
|
261
|
+
const res = await mediaFileRedirectApi(mediaFileId);
|
|
262
|
+
if (hy.audioItem.value.id !== mediaFileId) return false;
|
|
263
|
+
hy.releaseBlobUrls();
|
|
264
|
+
const url = URL.createObjectURL(res);
|
|
265
|
+
hy.blobUrls.value.push(url);
|
|
266
|
+
hy.audioUrl.value = url;
|
|
267
|
+
hy.audioEl.value && (hy.audioEl.value.src = url);
|
|
268
|
+
return true;
|
|
269
|
+
} catch (err) {
|
|
270
|
+
if (hy.audioItem.value.id !== mediaFileId) return false;
|
|
271
|
+
console.error("getAudioContext error", err);
|
|
272
|
+
hy.loading.value = false;
|
|
273
|
+
hy.audioState.value = "CAN_NOT_PLAY";
|
|
274
|
+
emit("play-error", true);
|
|
275
|
+
ElMessage.warning($t$1("fileFormatNotSupported"));
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function releaseBlobUrls2() {
|
|
280
|
+
if (!hy.blobUrls.value.length) return;
|
|
281
|
+
hy.blobUrls.value.forEach((url) => URL.revokeObjectURL(url));
|
|
282
|
+
hy.blobUrls.value = [];
|
|
283
|
+
}
|
|
284
|
+
function createDownloadTask2(mediaFiles) {
|
|
285
|
+
baseMainStore.value.commit({
|
|
286
|
+
name: "downloadHistory",
|
|
287
|
+
data: {
|
|
288
|
+
methodName: "show",
|
|
289
|
+
params: { mediaFiles, contentMode: hy.props.contentMode }
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
function downloadFn2(event) {
|
|
294
|
+
event.stopPropagation();
|
|
295
|
+
if (hy.audioItem.value && hy.audioItem.value.id) {
|
|
296
|
+
ElMessage.warning($t$1("startDownloading"));
|
|
297
|
+
hy.createDownloadTask([hy.audioItem.value]);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
function changeVolume2() {
|
|
301
|
+
if (!hy.audioEl.value) return;
|
|
302
|
+
hy.audioEl.value.volume = hy.volumeValue.value / 100;
|
|
303
|
+
}
|
|
304
|
+
function getNowWh2() {
|
|
305
|
+
if (!hy.audioEl.value || hy.audioState.value === "CAN_NOT_PLAY") {
|
|
306
|
+
hy.isDrop.value = false;
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
hy.curTime.value = hy.totalTime.value * (hy.value.value / 100);
|
|
310
|
+
hy.audioEl.value.currentTime = hy.curTime.value;
|
|
311
|
+
hy.isDrop.value = false;
|
|
312
|
+
}
|
|
313
|
+
function getPercent2(num, total) {
|
|
314
|
+
num = parseFloat(num);
|
|
315
|
+
total = parseFloat(total);
|
|
316
|
+
if (isNaN(num) || isNaN(total)) {
|
|
317
|
+
return 0;
|
|
318
|
+
}
|
|
319
|
+
return total <= 0 ? 0 : Math.round(num / total * 1e4) / 100;
|
|
320
|
+
}
|
|
321
|
+
function resumePlay2() {
|
|
322
|
+
if (hy.audioState.value === "CAN_NOT_PLAY") return;
|
|
323
|
+
hy.safePlay();
|
|
324
|
+
}
|
|
325
|
+
function pauseAudio2() {
|
|
326
|
+
if (hy.audioState.value === "CAN_NOT_PLAY") return;
|
|
327
|
+
hy.audioEl.value && hy.audioEl.value.pause();
|
|
328
|
+
hy.audioState.value = "PAUSE";
|
|
329
|
+
}
|
|
330
|
+
function initAudio2() {
|
|
331
|
+
hy.audioEl.value = hy.audioRef.value;
|
|
332
|
+
if (!hy.audioEl.value) return;
|
|
333
|
+
hy.audioEl.value.addEventListener("canplay", () => {
|
|
334
|
+
hy.loading.value = false;
|
|
335
|
+
hy.buffering.value = false;
|
|
336
|
+
if (hy.audioState.value !== "PLAYING") {
|
|
337
|
+
hy.audioState.value = "IS_LOAD";
|
|
338
|
+
}
|
|
339
|
+
const duration = hy.audioEl.value.duration;
|
|
340
|
+
hy.totalTime.value = Number.isFinite(duration) ? Math.floor(duration) : 0;
|
|
341
|
+
hy.pointReady.value = true;
|
|
342
|
+
emit("can-play", hy.totalTime.value);
|
|
343
|
+
emit("play-error", false);
|
|
344
|
+
});
|
|
345
|
+
hy.audioEl.value.addEventListener("play", () => {
|
|
346
|
+
emit("load-notic", false);
|
|
347
|
+
hy.audioEl.value.playbackRate = hy.speed.value;
|
|
348
|
+
hy.audioState.value = "PLAYING";
|
|
349
|
+
if (hy.audioUrl.value && hy.playItem.value) {
|
|
350
|
+
emit("play-start", hy.audioUrl.value, hy.playItem.value);
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
hy.audioEl.value.addEventListener("waiting", () => {
|
|
354
|
+
hy.buffering.value = true;
|
|
355
|
+
});
|
|
356
|
+
hy.audioEl.value.addEventListener("playing", () => {
|
|
357
|
+
hy.buffering.value = false;
|
|
358
|
+
});
|
|
359
|
+
hy.audioEl.value.addEventListener("pause", () => {
|
|
360
|
+
if (hy.audioState.value === "CAN_NOT_PLAY") return;
|
|
361
|
+
hy.buffering.value = false;
|
|
362
|
+
if (hy.audioState.value !== "PLAY_END") {
|
|
363
|
+
hy.audioState.value = "PAUSE";
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
hy.audioEl.value.addEventListener("volumechange", () => {
|
|
367
|
+
hy.volumeValue.value = Math.round(hy.audioEl.value.volume * 100);
|
|
368
|
+
});
|
|
369
|
+
hy.audioEl.value.addEventListener("ended", () => {
|
|
370
|
+
hy.audioState.value = "PLAY_END";
|
|
371
|
+
if (hy.playRules.value === 2) {
|
|
372
|
+
if (hy.findIndexFn() < hy.props.playList.length - 1) {
|
|
373
|
+
hy.playNext();
|
|
374
|
+
}
|
|
375
|
+
} else if (hy.playRules.value === 3) {
|
|
376
|
+
hy.audioEl.value.currentTime = 0;
|
|
377
|
+
hy.safePlay();
|
|
378
|
+
}
|
|
379
|
+
emit("play-end");
|
|
380
|
+
});
|
|
381
|
+
hy.audioEl.value.addEventListener(
|
|
382
|
+
"timeupdate",
|
|
383
|
+
() => {
|
|
384
|
+
if (hy.audioState.value === "CAN_NOT_PLAY") return;
|
|
385
|
+
if (!hy.isDrop.value && hy.audioEl.value) {
|
|
386
|
+
hy.curTime.value = Math.floor(hy.audioEl.value.currentTime);
|
|
387
|
+
hy.value.value = hy.totalTime.value ? hy.curTime.value / hy.totalTime.value * 100 : 0;
|
|
388
|
+
emit("on-time-update", hy.curTime.value);
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
false
|
|
392
|
+
);
|
|
393
|
+
hy.audioEl.value.addEventListener("error", (e) => {
|
|
394
|
+
if (hy.isDestroyed.value || !hy.audioUrl.value) return;
|
|
395
|
+
console.error("error", e);
|
|
396
|
+
hy.buffering.value = false;
|
|
397
|
+
hy.loading.value = false;
|
|
398
|
+
hy.pointReady.value = false;
|
|
399
|
+
hy.audioState.value = "CAN_NOT_PLAY";
|
|
400
|
+
hy.resetProgress();
|
|
401
|
+
emit("play-error", true);
|
|
402
|
+
ElMessage.warning($t$1("fileFormatNotSupported"));
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
function destroyAudio2() {
|
|
406
|
+
hy.isDestroyed.value = true;
|
|
407
|
+
const el = hy.audioEl.value;
|
|
408
|
+
if (el) {
|
|
409
|
+
el.pause();
|
|
410
|
+
el.removeAttribute("src");
|
|
411
|
+
el.load();
|
|
412
|
+
}
|
|
413
|
+
hy.audioEl.value = null;
|
|
414
|
+
hy.releaseBlobUrls();
|
|
415
|
+
}
|
|
416
|
+
function jumpDuration2(s) {
|
|
417
|
+
if (!hy.audioEl.value) return;
|
|
418
|
+
hy.audioEl.value.currentTime = s;
|
|
419
|
+
}
|
|
420
|
+
function setIsHidePicture2(newIsHidePicture) {
|
|
421
|
+
hy.isHidePicture.value = newIsHidePicture;
|
|
422
|
+
}
|
|
423
|
+
function initFullScreenEvent2() {
|
|
424
|
+
document.addEventListener("fullscreenchange", hy.fullscreenchangeHandler);
|
|
425
|
+
}
|
|
426
|
+
function destroyFullScreenEvent2() {
|
|
427
|
+
document.removeEventListener("fullscreenchange", hy.fullscreenchangeHandler);
|
|
428
|
+
if (hy.isSelfFullScreen.value && document.fullscreenElement) {
|
|
429
|
+
hy.exitFullscreen();
|
|
430
|
+
}
|
|
431
|
+
hy.isSelfFullScreen.value = false;
|
|
432
|
+
}
|
|
433
|
+
function fullscreenchangeHandler2() {
|
|
434
|
+
if (document.fullscreenElement && hy.isSelfFullScreen.value) {
|
|
435
|
+
hy.isFullScreen.value = true;
|
|
436
|
+
hy.isHidePicture.value = false;
|
|
437
|
+
} else if (!document.fullscreenElement) {
|
|
438
|
+
hy.isFullScreen.value = false;
|
|
439
|
+
hy.isSelfFullScreen.value = false;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
function clickFullScreen2() {
|
|
443
|
+
if (hy.isFullScreen.value) {
|
|
444
|
+
hy.exitFullscreen();
|
|
445
|
+
} else {
|
|
446
|
+
hy.fullScreen();
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
function fullScreen2() {
|
|
450
|
+
const el = document.documentElement;
|
|
451
|
+
if (el.requestFullscreen) {
|
|
452
|
+
hy.isSelfFullScreen.value = true;
|
|
453
|
+
el.requestFullscreen().catch(() => {
|
|
454
|
+
hy.isSelfFullScreen.value = false;
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
function exitFullscreen2() {
|
|
459
|
+
const el = document;
|
|
460
|
+
if (el.exitFullscreen && el.fullscreenElement) {
|
|
461
|
+
el.exitFullscreen();
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
return {
|
|
465
|
+
progressThumbWidth: progressThumbWidth2,
|
|
466
|
+
pointReady: pointReady2,
|
|
467
|
+
pointMarkers: pointMarkers2,
|
|
468
|
+
getPointLeft: getPointLeft2,
|
|
469
|
+
clickPoint: clickPoint2,
|
|
470
|
+
audioRef: audioRef2,
|
|
471
|
+
isHidePicture: isHidePicture2,
|
|
472
|
+
isFullScreen: isFullScreen2,
|
|
473
|
+
isSelfFullScreen: isSelfFullScreen2,
|
|
474
|
+
speedList: speedList2,
|
|
475
|
+
speed: speed2,
|
|
476
|
+
playRuleslist: playRuleslist2,
|
|
477
|
+
playRules: playRules2,
|
|
478
|
+
audioItem: audioItem2,
|
|
479
|
+
audioUrl: audioUrl2,
|
|
480
|
+
value: value2,
|
|
481
|
+
audioEl: audioEl2,
|
|
482
|
+
audioState: audioState2,
|
|
483
|
+
curTime: curTime2,
|
|
484
|
+
totalTime: totalTime2,
|
|
485
|
+
isDrop: isDrop2,
|
|
486
|
+
volumeValue: volumeValue2,
|
|
487
|
+
loading: loading2,
|
|
488
|
+
buffering: buffering2,
|
|
489
|
+
blobUrls: blobUrls2,
|
|
490
|
+
isDestroyed: isDestroyed2,
|
|
491
|
+
speedLabel: speedLabel2,
|
|
492
|
+
playItem: playItem2,
|
|
493
|
+
canPlay: canPlay2,
|
|
494
|
+
playRulesFn: playRulesFn2,
|
|
495
|
+
speedFn: speedFn2,
|
|
496
|
+
findIndexFn: findIndexFn2,
|
|
497
|
+
playNext: playNext2,
|
|
498
|
+
playPrevious: playPrevious2,
|
|
499
|
+
safePlay: safePlay2,
|
|
500
|
+
resetProgress: resetProgress2,
|
|
501
|
+
playAudio: playAudio2,
|
|
502
|
+
getAudioContext: getAudioContext2,
|
|
503
|
+
releaseBlobUrls: releaseBlobUrls2,
|
|
504
|
+
createDownloadTask: createDownloadTask2,
|
|
505
|
+
downloadFn: downloadFn2,
|
|
506
|
+
changeVolume: changeVolume2,
|
|
507
|
+
getNowWh: getNowWh2,
|
|
508
|
+
getPercent: getPercent2,
|
|
509
|
+
resumePlay: resumePlay2,
|
|
510
|
+
pauseAudio: pauseAudio2,
|
|
511
|
+
initAudio: initAudio2,
|
|
512
|
+
destroyAudio: destroyAudio2,
|
|
513
|
+
jumpDuration: jumpDuration2,
|
|
514
|
+
setIsHidePicture: setIsHidePicture2,
|
|
515
|
+
initFullScreenEvent: initFullScreenEvent2,
|
|
516
|
+
destroyFullScreenEvent: destroyFullScreenEvent2,
|
|
517
|
+
fullscreenchangeHandler: fullscreenchangeHandler2,
|
|
518
|
+
clickFullScreen: clickFullScreen2,
|
|
519
|
+
fullScreen: fullScreen2,
|
|
520
|
+
exitFullscreen: exitFullscreen2
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
const {
|
|
524
|
+
audioEl,
|
|
525
|
+
audioItem,
|
|
526
|
+
audioRef,
|
|
527
|
+
audioState,
|
|
528
|
+
audioUrl,
|
|
529
|
+
blobUrls,
|
|
530
|
+
buffering,
|
|
531
|
+
canPlay,
|
|
532
|
+
changeVolume,
|
|
533
|
+
clickFullScreen,
|
|
534
|
+
clickPoint,
|
|
535
|
+
createDownloadTask,
|
|
536
|
+
curTime,
|
|
537
|
+
destroyAudio,
|
|
538
|
+
destroyFullScreenEvent,
|
|
539
|
+
downloadFn,
|
|
540
|
+
exitFullscreen,
|
|
541
|
+
findIndexFn,
|
|
542
|
+
fullScreen,
|
|
543
|
+
fullscreenchangeHandler,
|
|
544
|
+
getAudioContext,
|
|
545
|
+
getNowWh,
|
|
546
|
+
getPercent,
|
|
547
|
+
getPointLeft,
|
|
548
|
+
initAudio,
|
|
549
|
+
initFullScreenEvent,
|
|
550
|
+
isDestroyed,
|
|
551
|
+
isDrop,
|
|
552
|
+
isFullScreen,
|
|
553
|
+
isHidePicture,
|
|
554
|
+
isSelfFullScreen,
|
|
555
|
+
jumpDuration,
|
|
556
|
+
loading,
|
|
557
|
+
pauseAudio,
|
|
558
|
+
playAudio,
|
|
559
|
+
playItem,
|
|
560
|
+
playNext,
|
|
561
|
+
playPrevious,
|
|
562
|
+
playRules,
|
|
563
|
+
playRulesFn,
|
|
564
|
+
playRuleslist,
|
|
565
|
+
pointMarkers,
|
|
566
|
+
pointReady,
|
|
567
|
+
progressThumbWidth,
|
|
568
|
+
releaseBlobUrls,
|
|
569
|
+
resetProgress,
|
|
570
|
+
resumePlay,
|
|
571
|
+
safePlay,
|
|
572
|
+
setIsHidePicture,
|
|
573
|
+
speed,
|
|
574
|
+
speedFn,
|
|
575
|
+
speedLabel,
|
|
576
|
+
speedList,
|
|
577
|
+
totalTime,
|
|
578
|
+
value,
|
|
579
|
+
volumeValue
|
|
580
|
+
} = useMixins({ props }, [useAudioPlayer]);
|
|
581
|
+
__expose({
|
|
582
|
+
playAudio,
|
|
583
|
+
pauseAudio,
|
|
584
|
+
resumePlay,
|
|
585
|
+
jumpDuration
|
|
586
|
+
});
|
|
587
|
+
return (_ctx, _cache) => {
|
|
588
|
+
return openBlock(), createElementBlock("div", { class: "w-full h-full" }, [
|
|
589
|
+
createCommentVNode(" audio \u5143\u7D20\u653E\u5728\u6A21\u5F0F\u5916\u5C42\uFF0C\u5207\u6362\u6A21\u5F0F\u65F6\u4E0D\u4F1A\u88AB\u9500\u6BC1 "),
|
|
590
|
+
createElementVNode(
|
|
591
|
+
"audio",
|
|
592
|
+
{
|
|
593
|
+
ref_key: "audioRef",
|
|
594
|
+
ref: audioRef
|
|
595
|
+
},
|
|
596
|
+
null,
|
|
597
|
+
512
|
|
598
|
+
/* NEED_PATCH */
|
|
599
|
+
),
|
|
600
|
+
createCommentVNode(" ==================== \u7279\u522B\u6A21\u5F0F\uFF1A\u5355\u884C\u63A7\u5236\u680F ==================== "),
|
|
601
|
+
__props.mode === "simple" ? (openBlock(), createElementBlock("div", {
|
|
602
|
+
key: 0,
|
|
603
|
+
class: "w-full h-[40px] border border-border text-xs text-main flex items-center justify-between mb-2 box-border"
|
|
604
|
+
}, [
|
|
605
|
+
createElementVNode("div", { class: "center-operator flex w-[80px] justify-between items-center group-[.is-full]:h-[34px] mx-4" }, [
|
|
606
|
+
createElementVNode("span", { onClick: unref(playPrevious) }, [
|
|
607
|
+
createVNode(unref(HyIcon), {
|
|
608
|
+
"svg-name": "ops-audio-previous",
|
|
609
|
+
class: normalizeClass(centerIconClass)
|
|
610
|
+
})
|
|
611
|
+
], 8, ["onClick"]),
|
|
612
|
+
!unref(canPlay) ? (openBlock(), createElementBlock("span", {
|
|
613
|
+
key: 0,
|
|
614
|
+
class: "text-info cursor-not-allowed"
|
|
615
|
+
}, [
|
|
616
|
+
createVNode(unref(HyIcon), {
|
|
617
|
+
"svg-name": "ops-audio-media-center-audio-play",
|
|
618
|
+
class: normalizeClass(centerIconClass)
|
|
619
|
+
})
|
|
620
|
+
])) : (openBlock(), createElementBlock("span", { key: 1 }, [
|
|
621
|
+
unref(audioState) !== "PLAYING" ? (openBlock(), createElementBlock("span", {
|
|
622
|
+
key: 0,
|
|
623
|
+
onClick: ($event) => unref(playAudio)(unref(audioUrl))
|
|
624
|
+
}, [
|
|
625
|
+
createVNode(unref(HyIcon), {
|
|
626
|
+
"svg-name": "ops-audio-media-center-audio-play",
|
|
627
|
+
class: normalizeClass(centerIconClass)
|
|
628
|
+
})
|
|
629
|
+
], 8, ["onClick"])) : (openBlock(), createElementBlock("span", {
|
|
630
|
+
key: 1,
|
|
631
|
+
onClick: unref(pauseAudio)
|
|
632
|
+
}, [
|
|
633
|
+
createVNode(unref(HyIcon), {
|
|
634
|
+
"svg-name": "ops-audio-media-center-audio-pause",
|
|
635
|
+
class: normalizeClass(centerIconClass)
|
|
636
|
+
})
|
|
637
|
+
], 8, ["onClick"]))
|
|
638
|
+
])),
|
|
639
|
+
createElementVNode("span", { onClick: unref(playNext) }, [
|
|
640
|
+
createVNode(unref(HyIcon), {
|
|
641
|
+
"svg-name": "ops-audio-next",
|
|
642
|
+
class: normalizeClass(centerIconClass)
|
|
643
|
+
})
|
|
644
|
+
], 8, ["onClick"])
|
|
645
|
+
]),
|
|
646
|
+
unref(audioState) !== "CAN_NOT_PLAY" ? (openBlock(), createElementBlock("div", {
|
|
647
|
+
key: 0,
|
|
648
|
+
class: "flex leading-[20px] text-auxiliary"
|
|
649
|
+
}, [
|
|
650
|
+
createElementVNode(
|
|
651
|
+
"span",
|
|
652
|
+
{
|
|
653
|
+
class: normalizeClass(["is-play-seconds", { "text-main": unref(curTime) !== 0 }])
|
|
654
|
+
},
|
|
655
|
+
toDisplayString(unref(formatSeconds)(unref(curTime))) + '" ',
|
|
656
|
+
3
|
|
657
|
+
/* TEXT, CLASS */
|
|
658
|
+
),
|
|
659
|
+
createElementVNode("span", { class: "mx-1" }, "/"),
|
|
660
|
+
createElementVNode(
|
|
661
|
+
"span",
|
|
662
|
+
{ class: "total-seconds" },
|
|
663
|
+
toDisplayString(unref(formatSeconds)(unref(totalTime))) + '" ',
|
|
664
|
+
1
|
|
665
|
+
/* TEXT */
|
|
666
|
+
)
|
|
667
|
+
])) : createCommentVNode("v-if", true),
|
|
668
|
+
createCommentVNode(" \u63A7\u5236\u8FDB\u5EA6 "),
|
|
669
|
+
createElementVNode("div", { class: "relative flex items-center flex-grow w-0 mx-4" }, [
|
|
670
|
+
withDirectives(createElementVNode("input", {
|
|
671
|
+
max: "100",
|
|
672
|
+
class: "hy-audio-progress relative w-[100%] h-[6px] rounded-[20px] outline-none appearance-none bg-[#eaf5f9]",
|
|
673
|
+
style: normalizeStyle({
|
|
674
|
+
background: `linear-gradient(to right, rgb(var(--hy-theme), 1) ${unref(getPercent)(
|
|
675
|
+
unref(value),
|
|
676
|
+
100
|
|
677
|
+
)}%, rgb(var(--hy-theme), 0.5) ${unref(getPercent)(unref(value), 100)}% `
|
|
678
|
+
}),
|
|
679
|
+
type: "range",
|
|
680
|
+
onMouseup: ($event) => unref(getNowWh)($event),
|
|
681
|
+
onMousedown: ($event) => isDrop.value = true,
|
|
682
|
+
"onUpdate:modelValue": ($event) => isRef(value) ? value.value = $event : null
|
|
683
|
+
}, null, 44, ["onMouseup", "onMousedown", "onUpdate:modelValue"]), [
|
|
684
|
+
[vModelText, unref(value)]
|
|
685
|
+
]),
|
|
686
|
+
createCommentVNode(" \u6253\u70B9\uFF08\u5BB9\u5668\u4E0D\u54CD\u5E94\u9F20\u6807\uFF0C\u4E0D\u5F71\u54CD\u8FDB\u5EA6\u6761\u62D6\u52A8\uFF0C\u53EA\u6709\u5706\u70B9\u53EF\u70B9\u51FB\uFF09 "),
|
|
687
|
+
createElementVNode("div", { class: "absolute left-0 right-0 top-1/2 h-0 pointer-events-none" }, [
|
|
688
|
+
(openBlock(true), createElementBlock(
|
|
689
|
+
Fragment,
|
|
690
|
+
null,
|
|
691
|
+
renderList(unref(pointMarkers), (item, index) => {
|
|
692
|
+
return openBlock(), createBlock(unref(ElPopover), {
|
|
693
|
+
key: item.id || index,
|
|
694
|
+
placement: "top",
|
|
695
|
+
teleported: !unref(isFullScreen),
|
|
696
|
+
"popper-class": "minWidth0_popover popover_darkColor liveBroadcast w-[200px]",
|
|
697
|
+
trigger: "hover"
|
|
698
|
+
}, {
|
|
699
|
+
reference: withCtx(() => [
|
|
700
|
+
createElementVNode("div", {
|
|
701
|
+
class: "absolute top-0 w-[6px] h-[6px] bg-main rounded-full -translate-x-1/2 -translate-y-1/2 pointer-events-auto cursor-pointer z-[1] hover:z-10",
|
|
702
|
+
style: normalizeStyle({ left: unref(getPointLeft)(item.percent) }),
|
|
703
|
+
onMousedown: withModifiers(() => {
|
|
704
|
+
}, ["stop"]),
|
|
705
|
+
onClick: withModifiers(($event) => unref(clickPoint)(item), ["stop"])
|
|
706
|
+
}, null, 44, ["onMousedown", "onClick"])
|
|
707
|
+
]),
|
|
708
|
+
default: withCtx(() => [
|
|
709
|
+
createElementVNode("div", { class: "text-xs text-main w-full px-3 py-2 box-border" }, [
|
|
710
|
+
createElementVNode("div", { class: "flex items-center" }, [
|
|
711
|
+
createElementVNode("div", { class: "w-[2px] h-[12px] bg-theme rounded" }),
|
|
712
|
+
createElementVNode(
|
|
713
|
+
"span",
|
|
714
|
+
{ class: "ml-2" },
|
|
715
|
+
toDisplayString(unref(formatSeconds)(item.time)),
|
|
716
|
+
1
|
|
717
|
+
/* TEXT */
|
|
718
|
+
)
|
|
719
|
+
]),
|
|
720
|
+
createElementVNode(
|
|
721
|
+
"div",
|
|
722
|
+
{ class: "over_one_line mt-1" },
|
|
723
|
+
toDisplayString(item.content),
|
|
724
|
+
1
|
|
725
|
+
/* TEXT */
|
|
726
|
+
)
|
|
727
|
+
])
|
|
728
|
+
]),
|
|
729
|
+
_: 2
|
|
730
|
+
/* DYNAMIC */
|
|
731
|
+
}, 1032, ["teleported"]);
|
|
732
|
+
}),
|
|
733
|
+
128
|
|
734
|
+
/* KEYED_FRAGMENT */
|
|
735
|
+
))
|
|
736
|
+
])
|
|
737
|
+
]),
|
|
738
|
+
createCommentVNode(" \u5176\u4ED6\u529F\u80FD "),
|
|
739
|
+
createElementVNode("div", null, [
|
|
740
|
+
unref(audioState) !== "CAN_NOT_PLAY" ? (openBlock(), createElementBlock("div", {
|
|
741
|
+
key: 0,
|
|
742
|
+
class: "flex items-center justify-end"
|
|
743
|
+
}, [
|
|
744
|
+
createCommentVNode(" \u901F\u5EA6 "),
|
|
745
|
+
createVNode(unref(ElPopover), {
|
|
746
|
+
placement: "top",
|
|
747
|
+
"popper-class": "minWidth0_popover popover_darkColor liveBroadcast w-[62px]",
|
|
748
|
+
trigger: "click"
|
|
749
|
+
}, {
|
|
750
|
+
reference: withCtx(() => [
|
|
751
|
+
createElementVNode(
|
|
752
|
+
"div",
|
|
753
|
+
{ class: "w-[44px] h-[22px] leading-[18px] mr-3 overflow-hidden rounded border border-main text-center clickBox px-1 box-border" },
|
|
754
|
+
toDisplayString(unref(speedLabel)),
|
|
755
|
+
1
|
|
756
|
+
/* TEXT */
|
|
757
|
+
)
|
|
758
|
+
]),
|
|
759
|
+
default: withCtx(() => [
|
|
760
|
+
createElementVNode("div", { class: "flex items-center justify-center p-[10px_0]" }, [
|
|
761
|
+
createElementVNode("ul", { class: "speedList w-full text-auxiliary" }, [
|
|
762
|
+
(openBlock(true), createElementBlock(
|
|
763
|
+
Fragment,
|
|
764
|
+
null,
|
|
765
|
+
renderList(unref(speedList), (item, index) => {
|
|
766
|
+
return openBlock(), createElementBlock("li", {
|
|
767
|
+
class: normalizeClass(["clickBox h-[26px] leading-[26px] text-center hover:text-theme hover:bg-background-3 text-xs", { "text-theme bg-background-3": item.value === unref(speed) }]),
|
|
768
|
+
onClick: ($event) => unref(speedFn)(item.value),
|
|
769
|
+
key: index
|
|
770
|
+
}, toDisplayString(item.label), 11, ["onClick"]);
|
|
771
|
+
}),
|
|
772
|
+
128
|
|
773
|
+
/* KEYED_FRAGMENT */
|
|
774
|
+
))
|
|
775
|
+
])
|
|
776
|
+
])
|
|
777
|
+
]),
|
|
778
|
+
_: 1
|
|
779
|
+
/* STABLE */
|
|
780
|
+
}),
|
|
781
|
+
createCommentVNode(" \u58F0\u97F3 "),
|
|
782
|
+
createVNode(unref(ElPopover), {
|
|
783
|
+
placement: "top",
|
|
784
|
+
"popper-class": "popover_volumeSlider w-[40px]",
|
|
785
|
+
trigger: "click"
|
|
786
|
+
}, {
|
|
787
|
+
reference: withCtx(() => [
|
|
788
|
+
createElementVNode("div", null, [
|
|
789
|
+
createVNode(unref(ElTooltip), {
|
|
790
|
+
class: "item",
|
|
791
|
+
effect: "dark",
|
|
792
|
+
content: $t$1("adjustPlaybackVolume"),
|
|
793
|
+
placement: "top",
|
|
794
|
+
teleported: !unref(isFullScreen)
|
|
795
|
+
}, {
|
|
796
|
+
default: withCtx(() => [
|
|
797
|
+
createVNode(unref(HyIcon), {
|
|
798
|
+
"svg-name": "dispatch-share-audio-volumn",
|
|
799
|
+
class: normalizeClass([rightIconClass, "mr-3"])
|
|
800
|
+
})
|
|
801
|
+
]),
|
|
802
|
+
_: 1
|
|
803
|
+
/* STABLE */
|
|
804
|
+
}, 8, ["content", "teleported"])
|
|
805
|
+
])
|
|
806
|
+
]),
|
|
807
|
+
default: withCtx(() => [
|
|
808
|
+
createElementVNode("div", { class: "flex items-center justify-center" }, [
|
|
809
|
+
createVNode(unref(ElSlider), {
|
|
810
|
+
onInput: ($event) => unref(changeVolume)($event),
|
|
811
|
+
class: "volume-slider",
|
|
812
|
+
modelValue: unref(volumeValue),
|
|
813
|
+
"onUpdate:modelValue": ($event) => isRef(volumeValue) ? volumeValue.value = $event : null,
|
|
814
|
+
vertical: "",
|
|
815
|
+
height: "105px"
|
|
816
|
+
}, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"])
|
|
817
|
+
])
|
|
818
|
+
]),
|
|
819
|
+
_: 1
|
|
820
|
+
/* STABLE */
|
|
821
|
+
}),
|
|
822
|
+
createCommentVNode(" \u64AD\u653E\u89C4\u5219 "),
|
|
823
|
+
__props.playRulesType ? (openBlock(true), createElementBlock(
|
|
824
|
+
Fragment,
|
|
825
|
+
{ key: 0 },
|
|
826
|
+
renderList(unref(playRuleslist), (item, index) => {
|
|
827
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
828
|
+
key: index + "playRuleslist",
|
|
829
|
+
class: "clickBox",
|
|
830
|
+
onClick: ($event) => unref(playRulesFn)(item.value)
|
|
831
|
+
}, [
|
|
832
|
+
createVNode(unref(ElTooltip), {
|
|
833
|
+
class: "item",
|
|
834
|
+
effect: "dark",
|
|
835
|
+
content: item.label,
|
|
836
|
+
placement: "top"
|
|
837
|
+
}, {
|
|
838
|
+
default: withCtx(() => [
|
|
839
|
+
createElementVNode("div", null, [
|
|
840
|
+
createVNode(unref(HyIcon), {
|
|
841
|
+
"svg-name": item.svgName,
|
|
842
|
+
class: normalizeClass([rightIconClass, "mr-3"])
|
|
843
|
+
}, null, 8, ["svg-name"])
|
|
844
|
+
])
|
|
845
|
+
]),
|
|
846
|
+
_: 2
|
|
847
|
+
/* DYNAMIC */
|
|
848
|
+
}, 1032, ["content"])
|
|
849
|
+
], 8, ["onClick"])), [
|
|
850
|
+
[vShow, unref(playRules) === item.value]
|
|
851
|
+
]);
|
|
852
|
+
}),
|
|
853
|
+
128
|
|
854
|
+
/* KEYED_FRAGMENT */
|
|
855
|
+
)) : createCommentVNode("v-if", true),
|
|
856
|
+
createCommentVNode(" \u4E0B\u8F7D "),
|
|
857
|
+
__props.downloadFilesType ? (openBlock(), createElementBlock("div", {
|
|
858
|
+
key: 1,
|
|
859
|
+
class: "clickBox",
|
|
860
|
+
onClick: unref(downloadFn)
|
|
861
|
+
}, [
|
|
862
|
+
createVNode(unref(ElTooltip), {
|
|
863
|
+
class: "item",
|
|
864
|
+
effect: "dark",
|
|
865
|
+
content: $t$1("downloadFile"),
|
|
866
|
+
placement: "top"
|
|
867
|
+
}, {
|
|
868
|
+
default: withCtx(() => [
|
|
869
|
+
createElementVNode("div", null, [
|
|
870
|
+
createVNode(unref(HyIcon), {
|
|
871
|
+
"svg-name": "ops-button-export",
|
|
872
|
+
class: normalizeClass([rightIconClass, "mr-3"])
|
|
873
|
+
})
|
|
874
|
+
])
|
|
875
|
+
]),
|
|
876
|
+
_: 1
|
|
877
|
+
/* STABLE */
|
|
878
|
+
}, 8, ["content"])
|
|
879
|
+
], 8, ["onClick"])) : createCommentVNode("v-if", true),
|
|
880
|
+
renderSlot(_ctx.$slots, "left-operation", {}, void 0, true)
|
|
881
|
+
])) : createCommentVNode("v-if", true)
|
|
882
|
+
])
|
|
883
|
+
])) : (openBlock(), createElementBlock(
|
|
884
|
+
Fragment,
|
|
885
|
+
{ key: 1 },
|
|
886
|
+
[
|
|
887
|
+
createCommentVNode(" ==================== \u5E38\u89C4\u6A21\u5F0F\uFF1A\u753B\u9762 + \u63A7\u5236\u680F ==================== "),
|
|
888
|
+
createElementVNode(
|
|
889
|
+
"div",
|
|
890
|
+
{
|
|
891
|
+
class: normalizeClass([
|
|
892
|
+
"hy-audio-player w-full bg-background mb-2 flex flex-col text-xs text-main box-border border border-border rounded overflow-hidden",
|
|
893
|
+
unref(isFullScreen) ? "full-audio-player-content is-full fixed left-0 top-0 z-[99999] h-full" : "relative"
|
|
894
|
+
])
|
|
895
|
+
},
|
|
896
|
+
[
|
|
897
|
+
createCommentVNode(" \u6587\u4EF6\u540D "),
|
|
898
|
+
createElementVNode(
|
|
899
|
+
"div",
|
|
900
|
+
{
|
|
901
|
+
style: { "background": "linear-gradient(180deg, rgba(13, 26, 42, 0.5) 0%, rgba(13, 26, 42, 0.3) 100%)" },
|
|
902
|
+
class: normalizeClass([{
|
|
903
|
+
absolute: !unref(isHidePicture)
|
|
904
|
+
}, "h-[32px] px-2 box-border flex items-center over_one_line w-full text-xs z-10"])
|
|
905
|
+
},
|
|
906
|
+
toDisplayString(unref(audioItem).fileName),
|
|
907
|
+
3
|
|
908
|
+
/* TEXT, CLASS */
|
|
909
|
+
),
|
|
910
|
+
createCommentVNode(" \u753B\u9762\uFF08\u975E\u5168\u5C4F w-full + 16:9\uFF0C\u5168\u5C4F\u94FA\u6EE1\u63A7\u5236\u680F\u4EE5\u4E0A\u7684\u5269\u4F59\u7A7A\u95F4\uFF09 "),
|
|
911
|
+
createElementVNode(
|
|
912
|
+
"div",
|
|
913
|
+
{
|
|
914
|
+
class: normalizeClass(unref(isFullScreen) ? "flex flex-grow h-0" : "")
|
|
915
|
+
},
|
|
916
|
+
[
|
|
917
|
+
createElementVNode(
|
|
918
|
+
"div",
|
|
919
|
+
{
|
|
920
|
+
class: normalizeClass([{
|
|
921
|
+
"w-[0]": unref(isHidePicture),
|
|
922
|
+
"w-full": !unref(isHidePicture),
|
|
923
|
+
"h-full": unref(isFullScreen)
|
|
924
|
+
}, "overflow-hidden relative duration-500 flex-shrink-0"]),
|
|
925
|
+
style: normalizeStyle({
|
|
926
|
+
aspectRatio: unref(isFullScreen) ? "" : "16 / 9"
|
|
927
|
+
})
|
|
928
|
+
},
|
|
929
|
+
[
|
|
930
|
+
(unref(loading) || unref(buffering)) && unref(audioState) !== "CAN_NOT_PLAY" ? (openBlock(), createElementBlock("div", {
|
|
931
|
+
key: 0,
|
|
932
|
+
class: "w-full h-full flex flex-col justify-center items-center absolute top-0 left-0"
|
|
933
|
+
}, [
|
|
934
|
+
createVNode(_sfc_main$1),
|
|
935
|
+
createElementVNode(
|
|
936
|
+
"span",
|
|
937
|
+
{ class: "text-xs text-theme mt-4" },
|
|
938
|
+
"..." + toDisplayString($t$1("audioResourcesAreLoading")) + "...",
|
|
939
|
+
1
|
|
940
|
+
/* TEXT */
|
|
941
|
+
)
|
|
942
|
+
])) : createCommentVNode("v-if", true),
|
|
943
|
+
createCommentVNode(" \u97F3\u9891\u753B\u9762\u6837\u5F0F "),
|
|
944
|
+
createElementVNode("div", { class: "w-full h-full flex items-center justify-center" }, [
|
|
945
|
+
createVNode(unref(HyIcon), {
|
|
946
|
+
svgName: "ops-Empty-audio",
|
|
947
|
+
class: "!w-[40%] !h-[40%]"
|
|
948
|
+
})
|
|
949
|
+
])
|
|
950
|
+
],
|
|
951
|
+
6
|
|
952
|
+
/* CLASS, STYLE */
|
|
953
|
+
)
|
|
954
|
+
],
|
|
955
|
+
2
|
|
956
|
+
/* CLASS */
|
|
957
|
+
),
|
|
958
|
+
createCommentVNode(" \u63A7\u5236\u8FDB\u5EA6 "),
|
|
959
|
+
createElementVNode("div", { class: "px-2 box-border border-b border-border" }, [
|
|
960
|
+
createCommentVNode(" \u8FDB\u5EA6\u6761 "),
|
|
961
|
+
createElementVNode("div", { class: "relative flex items-center mt-2" }, [
|
|
962
|
+
withDirectives(createElementVNode("input", {
|
|
963
|
+
max: "100",
|
|
964
|
+
class: "hy-audio-progress relative w-[100%] h-[6px] rounded-[20px] outline-none appearance-none bg-[#eaf5f9]",
|
|
965
|
+
style: normalizeStyle({
|
|
966
|
+
background: `linear-gradient(to right, rgb(var(--hy-theme), 1) ${unref(getPercent)(
|
|
967
|
+
unref(value),
|
|
968
|
+
100
|
|
969
|
+
)}%, rgb(var(--hy-theme), 0.5) ${unref(getPercent)(unref(value), 100)}% `
|
|
970
|
+
}),
|
|
971
|
+
type: "range",
|
|
972
|
+
onMouseup: ($event) => unref(getNowWh)($event),
|
|
973
|
+
onMousedown: ($event) => isDrop.value = true,
|
|
974
|
+
"onUpdate:modelValue": ($event) => isRef(value) ? value.value = $event : null
|
|
975
|
+
}, null, 44, ["onMouseup", "onMousedown", "onUpdate:modelValue"]), [
|
|
976
|
+
[vModelText, unref(value)]
|
|
977
|
+
]),
|
|
978
|
+
createCommentVNode(" \u6253\u70B9\uFF08\u5BB9\u5668\u4E0D\u54CD\u5E94\u9F20\u6807\uFF0C\u4E0D\u5F71\u54CD\u8FDB\u5EA6\u6761\u62D6\u52A8\uFF0C\u53EA\u6709\u5706\u70B9\u53EF\u70B9\u51FB\uFF09 "),
|
|
979
|
+
createElementVNode("div", { class: "absolute left-0 right-0 top-1/2 h-0 pointer-events-none" }, [
|
|
980
|
+
(openBlock(true), createElementBlock(
|
|
981
|
+
Fragment,
|
|
982
|
+
null,
|
|
983
|
+
renderList(unref(pointMarkers), (item, index) => {
|
|
984
|
+
return openBlock(), createBlock(unref(ElPopover), {
|
|
985
|
+
key: item.id || index,
|
|
986
|
+
placement: "top",
|
|
987
|
+
teleported: !unref(isFullScreen),
|
|
988
|
+
"popper-class": "minWidth0_popover popover_darkColor liveBroadcast w-[200px]",
|
|
989
|
+
trigger: "hover"
|
|
990
|
+
}, {
|
|
991
|
+
reference: withCtx(() => [
|
|
992
|
+
createElementVNode("div", {
|
|
993
|
+
class: "absolute top-0 w-[6px] h-[6px] bg-main rounded-full -translate-x-1/2 -translate-y-1/2 pointer-events-auto cursor-pointer z-[1] hover:z-10",
|
|
994
|
+
style: normalizeStyle({ left: unref(getPointLeft)(item.percent) }),
|
|
995
|
+
onMousedown: withModifiers(() => {
|
|
996
|
+
}, ["stop"]),
|
|
997
|
+
onClick: withModifiers(($event) => unref(clickPoint)(item), ["stop"])
|
|
998
|
+
}, null, 44, ["onMousedown", "onClick"])
|
|
999
|
+
]),
|
|
1000
|
+
default: withCtx(() => [
|
|
1001
|
+
createElementVNode("div", { class: "text-xs text-main w-full px-3 py-2 box-border" }, [
|
|
1002
|
+
createElementVNode("div", { class: "flex items-center" }, [
|
|
1003
|
+
createElementVNode("div", { class: "w-[2px] h-[12px] bg-theme rounded" }),
|
|
1004
|
+
createElementVNode(
|
|
1005
|
+
"span",
|
|
1006
|
+
{ class: "ml-2" },
|
|
1007
|
+
toDisplayString(unref(formatSeconds)(item.time)),
|
|
1008
|
+
1
|
|
1009
|
+
/* TEXT */
|
|
1010
|
+
)
|
|
1011
|
+
]),
|
|
1012
|
+
createElementVNode(
|
|
1013
|
+
"div",
|
|
1014
|
+
{ class: "over_one_line mt-1" },
|
|
1015
|
+
toDisplayString(item.content),
|
|
1016
|
+
1
|
|
1017
|
+
/* TEXT */
|
|
1018
|
+
)
|
|
1019
|
+
])
|
|
1020
|
+
]),
|
|
1021
|
+
_: 2
|
|
1022
|
+
/* DYNAMIC */
|
|
1023
|
+
}, 1032, ["teleported"]);
|
|
1024
|
+
}),
|
|
1025
|
+
128
|
|
1026
|
+
/* KEYED_FRAGMENT */
|
|
1027
|
+
))
|
|
1028
|
+
])
|
|
1029
|
+
]),
|
|
1030
|
+
createElementVNode("div", { class: "flex items-center justify-center relative h-[46px]" }, [
|
|
1031
|
+
unref(audioState) !== "CAN_NOT_PLAY" ? (openBlock(), createElementBlock("div", {
|
|
1032
|
+
key: 0,
|
|
1033
|
+
class: "absolute left-[0px] flex w-[120px] leading-[20px] text-auxiliary"
|
|
1034
|
+
}, [
|
|
1035
|
+
createElementVNode(
|
|
1036
|
+
"span",
|
|
1037
|
+
{
|
|
1038
|
+
class: normalizeClass(["is-play-seconds", { "text-main": unref(curTime) !== 0 }])
|
|
1039
|
+
},
|
|
1040
|
+
toDisplayString(unref(formatSeconds)(unref(curTime))) + '" ',
|
|
1041
|
+
3
|
|
1042
|
+
/* TEXT, CLASS */
|
|
1043
|
+
),
|
|
1044
|
+
createElementVNode("span", { class: "mx-1" }, "/"),
|
|
1045
|
+
createElementVNode(
|
|
1046
|
+
"span",
|
|
1047
|
+
{ class: "total-seconds" },
|
|
1048
|
+
toDisplayString(unref(formatSeconds)(unref(totalTime))) + '" ',
|
|
1049
|
+
1
|
|
1050
|
+
/* TEXT */
|
|
1051
|
+
)
|
|
1052
|
+
])) : createCommentVNode("v-if", true),
|
|
1053
|
+
createElementVNode("div", { class: "center-operator flex w-[88px] justify-between items-center group-[.is-full]:h-[34px]" }, [
|
|
1054
|
+
createElementVNode("span", { onClick: unref(playPrevious) }, [
|
|
1055
|
+
createVNode(unref(HyIcon), {
|
|
1056
|
+
"svg-name": "ops-audio-previous",
|
|
1057
|
+
class: normalizeClass(centerIconClass)
|
|
1058
|
+
})
|
|
1059
|
+
], 8, ["onClick"]),
|
|
1060
|
+
!unref(canPlay) ? (openBlock(), createElementBlock("span", {
|
|
1061
|
+
key: 0,
|
|
1062
|
+
class: "text-info cursor-not-allowed"
|
|
1063
|
+
}, [
|
|
1064
|
+
createVNode(unref(HyIcon), {
|
|
1065
|
+
"svg-name": "ops-audio-media-center-audio-play",
|
|
1066
|
+
class: normalizeClass(centerIconClass)
|
|
1067
|
+
})
|
|
1068
|
+
])) : (openBlock(), createElementBlock("span", { key: 1 }, [
|
|
1069
|
+
unref(audioState) !== "PLAYING" ? (openBlock(), createElementBlock("span", {
|
|
1070
|
+
key: 0,
|
|
1071
|
+
onClick: ($event) => unref(playAudio)(unref(audioUrl))
|
|
1072
|
+
}, [
|
|
1073
|
+
createVNode(unref(HyIcon), {
|
|
1074
|
+
"svg-name": "ops-audio-media-center-audio-play",
|
|
1075
|
+
class: normalizeClass(centerIconClass)
|
|
1076
|
+
})
|
|
1077
|
+
], 8, ["onClick"])) : (openBlock(), createElementBlock("span", {
|
|
1078
|
+
key: 1,
|
|
1079
|
+
onClick: unref(pauseAudio)
|
|
1080
|
+
}, [
|
|
1081
|
+
createVNode(unref(HyIcon), {
|
|
1082
|
+
"svg-name": "ops-audio-media-center-audio-pause",
|
|
1083
|
+
class: normalizeClass(centerIconClass)
|
|
1084
|
+
})
|
|
1085
|
+
], 8, ["onClick"]))
|
|
1086
|
+
])),
|
|
1087
|
+
createElementVNode("span", { onClick: unref(playNext) }, [
|
|
1088
|
+
createVNode(unref(HyIcon), {
|
|
1089
|
+
"svg-name": "ops-audio-next",
|
|
1090
|
+
class: normalizeClass(centerIconClass)
|
|
1091
|
+
})
|
|
1092
|
+
], 8, ["onClick"])
|
|
1093
|
+
]),
|
|
1094
|
+
unref(audioState) !== "CAN_NOT_PLAY" ? (openBlock(), createElementBlock("div", {
|
|
1095
|
+
key: 1,
|
|
1096
|
+
class: "absolute right-[0px] flex items-center justify-end"
|
|
1097
|
+
}, [
|
|
1098
|
+
createCommentVNode(" \u901F\u5EA6 "),
|
|
1099
|
+
createVNode(unref(ElPopover), {
|
|
1100
|
+
placement: "top",
|
|
1101
|
+
"popper-class": "minWidth0_popover popover_darkColor liveBroadcast w-[62px]",
|
|
1102
|
+
trigger: "click"
|
|
1103
|
+
}, {
|
|
1104
|
+
reference: withCtx(() => [
|
|
1105
|
+
createElementVNode(
|
|
1106
|
+
"div",
|
|
1107
|
+
{ class: "w-[44px] h-[22px] leading-[18px] mr-3 overflow-hidden rounded border border-main text-center clickBox px-1 box-border" },
|
|
1108
|
+
toDisplayString(unref(speedLabel)),
|
|
1109
|
+
1
|
|
1110
|
+
/* TEXT */
|
|
1111
|
+
)
|
|
1112
|
+
]),
|
|
1113
|
+
default: withCtx(() => [
|
|
1114
|
+
createElementVNode("div", { class: "flex items-center justify-center p-[10px_0]" }, [
|
|
1115
|
+
createElementVNode("ul", { class: "speedList w-full text-auxiliary" }, [
|
|
1116
|
+
(openBlock(true), createElementBlock(
|
|
1117
|
+
Fragment,
|
|
1118
|
+
null,
|
|
1119
|
+
renderList(unref(speedList), (item, index) => {
|
|
1120
|
+
return openBlock(), createElementBlock("li", {
|
|
1121
|
+
class: normalizeClass(["clickBox h-[26px] leading-[26px] text-center hover:text-theme hover:bg-background-3 text-xs", { "text-theme bg-background-3": item.value === unref(speed) }]),
|
|
1122
|
+
onClick: ($event) => unref(speedFn)(item.value),
|
|
1123
|
+
key: index
|
|
1124
|
+
}, toDisplayString(item.label), 11, ["onClick"]);
|
|
1125
|
+
}),
|
|
1126
|
+
128
|
|
1127
|
+
/* KEYED_FRAGMENT */
|
|
1128
|
+
))
|
|
1129
|
+
])
|
|
1130
|
+
])
|
|
1131
|
+
]),
|
|
1132
|
+
_: 1
|
|
1133
|
+
/* STABLE */
|
|
1134
|
+
}),
|
|
1135
|
+
createCommentVNode(" \u58F0\u97F3 "),
|
|
1136
|
+
createVNode(unref(ElPopover), {
|
|
1137
|
+
placement: "top",
|
|
1138
|
+
teleported: !unref(isFullScreen),
|
|
1139
|
+
"popper-class": "popover_volumeSlider w-[40px]",
|
|
1140
|
+
trigger: "click"
|
|
1141
|
+
}, {
|
|
1142
|
+
reference: withCtx(() => [
|
|
1143
|
+
createElementVNode("div", null, [
|
|
1144
|
+
createVNode(unref(ElTooltip), {
|
|
1145
|
+
class: "item",
|
|
1146
|
+
effect: "dark",
|
|
1147
|
+
content: $t$1("adjustPlaybackVolume"),
|
|
1148
|
+
placement: "top",
|
|
1149
|
+
teleported: !unref(isFullScreen)
|
|
1150
|
+
}, {
|
|
1151
|
+
default: withCtx(() => [
|
|
1152
|
+
createVNode(unref(HyIcon), {
|
|
1153
|
+
"svg-name": "dispatch-share-audio-volumn",
|
|
1154
|
+
class: normalizeClass([rightIconClass, "mr-3"])
|
|
1155
|
+
})
|
|
1156
|
+
]),
|
|
1157
|
+
_: 1
|
|
1158
|
+
/* STABLE */
|
|
1159
|
+
}, 8, ["content", "teleported"])
|
|
1160
|
+
])
|
|
1161
|
+
]),
|
|
1162
|
+
default: withCtx(() => [
|
|
1163
|
+
createElementVNode("div", { class: "flex items-center justify-center" }, [
|
|
1164
|
+
createVNode(unref(ElSlider), {
|
|
1165
|
+
onInput: ($event) => unref(changeVolume)($event),
|
|
1166
|
+
class: "volume-slider",
|
|
1167
|
+
modelValue: unref(volumeValue),
|
|
1168
|
+
"onUpdate:modelValue": ($event) => isRef(volumeValue) ? volumeValue.value = $event : null,
|
|
1169
|
+
vertical: "",
|
|
1170
|
+
height: "105px"
|
|
1171
|
+
}, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"])
|
|
1172
|
+
])
|
|
1173
|
+
]),
|
|
1174
|
+
_: 1
|
|
1175
|
+
/* STABLE */
|
|
1176
|
+
}, 8, ["teleported"]),
|
|
1177
|
+
createCommentVNode(" \u653E\u5927 "),
|
|
1178
|
+
createVNode(unref(ElTooltip), {
|
|
1179
|
+
class: "item clickBox",
|
|
1180
|
+
effect: "dark",
|
|
1181
|
+
content: $t$1("fullScreenSwitch"),
|
|
1182
|
+
placement: "top",
|
|
1183
|
+
teleported: !unref(isFullScreen)
|
|
1184
|
+
}, {
|
|
1185
|
+
default: withCtx(() => [
|
|
1186
|
+
createVNode(unref(HyIcon), {
|
|
1187
|
+
onClick: unref(clickFullScreen),
|
|
1188
|
+
"svg-name": unref(isFullScreen) ? "ops-audio-reduce" : "ops-audio-fullscreen",
|
|
1189
|
+
class: normalizeClass([rightIconClass, "mr-3"])
|
|
1190
|
+
}, null, 8, ["onClick", "svg-name"])
|
|
1191
|
+
]),
|
|
1192
|
+
_: 1
|
|
1193
|
+
/* STABLE */
|
|
1194
|
+
}, 8, ["content", "teleported"]),
|
|
1195
|
+
createCommentVNode(" \u9690\u85CF/\u663E\u793A\u753B\u9762\uFF08\u5168\u5C4F\u65F6\u4E0D\u663E\u793A\uFF09 "),
|
|
1196
|
+
!unref(isFullScreen) ? (openBlock(), createElementBlock(
|
|
1197
|
+
Fragment,
|
|
1198
|
+
{ key: 0 },
|
|
1199
|
+
[
|
|
1200
|
+
unref(isHidePicture) ? (openBlock(), createElementBlock("div", {
|
|
1201
|
+
key: 0,
|
|
1202
|
+
onClick: ($event) => unref(setIsHidePicture)(false)
|
|
1203
|
+
}, [
|
|
1204
|
+
createVNode(unref(ElTooltip), {
|
|
1205
|
+
class: "item",
|
|
1206
|
+
effect: "dark",
|
|
1207
|
+
content: $t$1("showPicture"),
|
|
1208
|
+
placement: "top"
|
|
1209
|
+
}, {
|
|
1210
|
+
default: withCtx(() => [
|
|
1211
|
+
createVNode(unref(HyIcon), {
|
|
1212
|
+
"svg-name": "dispatch-share1-v3-ai-interpretation-expand",
|
|
1213
|
+
class: normalizeClass(rightIconClass)
|
|
1214
|
+
})
|
|
1215
|
+
]),
|
|
1216
|
+
_: 1
|
|
1217
|
+
/* STABLE */
|
|
1218
|
+
}, 8, ["content"])
|
|
1219
|
+
], 8, ["onClick"])) : (openBlock(), createElementBlock("div", {
|
|
1220
|
+
key: 1,
|
|
1221
|
+
onClick: ($event) => unref(setIsHidePicture)(true)
|
|
1222
|
+
}, [
|
|
1223
|
+
createVNode(unref(ElTooltip), {
|
|
1224
|
+
class: "item",
|
|
1225
|
+
effect: "dark",
|
|
1226
|
+
content: $t$1("hidePicture"),
|
|
1227
|
+
placement: "top"
|
|
1228
|
+
}, {
|
|
1229
|
+
default: withCtx(() => [
|
|
1230
|
+
createVNode(unref(HyIcon), {
|
|
1231
|
+
"svg-name": "dispatch-share1-v3-ai-interpretation-foldup",
|
|
1232
|
+
class: normalizeClass(rightIconClass)
|
|
1233
|
+
})
|
|
1234
|
+
]),
|
|
1235
|
+
_: 1
|
|
1236
|
+
/* STABLE */
|
|
1237
|
+
}, 8, ["content"])
|
|
1238
|
+
], 8, ["onClick"]))
|
|
1239
|
+
],
|
|
1240
|
+
64
|
|
1241
|
+
/* STABLE_FRAGMENT */
|
|
1242
|
+
)) : createCommentVNode("v-if", true)
|
|
1243
|
+
])) : createCommentVNode("v-if", true)
|
|
1244
|
+
])
|
|
1245
|
+
]),
|
|
1246
|
+
createCommentVNode(" \u5176\u4ED6\u529F\u80FD "),
|
|
1247
|
+
createElementVNode("div", { class: "px-2 box-border h-[40px] flex items-center justify-between" }, [
|
|
1248
|
+
createElementVNode("div", null, [
|
|
1249
|
+
unref(audioState) !== "CAN_NOT_PLAY" ? (openBlock(), createElementBlock("ul", {
|
|
1250
|
+
key: 0,
|
|
1251
|
+
class: "flex"
|
|
1252
|
+
}, [
|
|
1253
|
+
__props.playRulesType ? (openBlock(), createElementBlock("li", {
|
|
1254
|
+
key: 0,
|
|
1255
|
+
class: "mr-4 clickBox"
|
|
1256
|
+
}, [
|
|
1257
|
+
(openBlock(true), createElementBlock(
|
|
1258
|
+
Fragment,
|
|
1259
|
+
null,
|
|
1260
|
+
renderList(unref(playRuleslist), (item, index) => {
|
|
1261
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
1262
|
+
onClick: ($event) => unref(playRulesFn)(item.value),
|
|
1263
|
+
key: index + "playRuleslist"
|
|
1264
|
+
}, [
|
|
1265
|
+
createVNode(unref(HyIcon), {
|
|
1266
|
+
class: "!w-[12px] !h-[12px]",
|
|
1267
|
+
"svg-name": item.svgName
|
|
1268
|
+
}, null, 8, ["svg-name"]),
|
|
1269
|
+
createElementVNode(
|
|
1270
|
+
"span",
|
|
1271
|
+
{ class: "ml-2" },
|
|
1272
|
+
toDisplayString(item.label),
|
|
1273
|
+
1
|
|
1274
|
+
/* TEXT */
|
|
1275
|
+
)
|
|
1276
|
+
], 8, ["onClick"])), [
|
|
1277
|
+
[vShow, unref(playRules) === item.value]
|
|
1278
|
+
]);
|
|
1279
|
+
}),
|
|
1280
|
+
128
|
|
1281
|
+
/* KEYED_FRAGMENT */
|
|
1282
|
+
))
|
|
1283
|
+
])) : createCommentVNode("v-if", true),
|
|
1284
|
+
renderSlot(_ctx.$slots, "left-operation", {}, void 0, true),
|
|
1285
|
+
__props.downloadFilesType ? (openBlock(), createElementBlock("li", {
|
|
1286
|
+
key: 1,
|
|
1287
|
+
class: "mr-4 clickBox",
|
|
1288
|
+
onClick: unref(downloadFn)
|
|
1289
|
+
}, [
|
|
1290
|
+
createVNode(unref(HyIcon), {
|
|
1291
|
+
"svg-name": "ops-button-export",
|
|
1292
|
+
class: "!w-[12px] !h-[12px]"
|
|
1293
|
+
}),
|
|
1294
|
+
createElementVNode(
|
|
1295
|
+
"span",
|
|
1296
|
+
{ class: "ml-2" },
|
|
1297
|
+
toDisplayString($t$1("downloadFile")),
|
|
1298
|
+
1
|
|
1299
|
+
/* TEXT */
|
|
1300
|
+
)
|
|
1301
|
+
], 8, ["onClick"])) : createCommentVNode("v-if", true)
|
|
1302
|
+
])) : createCommentVNode("v-if", true)
|
|
1303
|
+
]),
|
|
1304
|
+
createElementVNode("div", null, [
|
|
1305
|
+
renderSlot(_ctx.$slots, "right-operation", {}, void 0, true)
|
|
1306
|
+
])
|
|
1307
|
+
])
|
|
1308
|
+
],
|
|
1309
|
+
2
|
|
1310
|
+
/* CLASS */
|
|
1311
|
+
)
|
|
1312
|
+
],
|
|
1313
|
+
2112
|
|
1314
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
1315
|
+
))
|
|
1316
|
+
]);
|
|
1317
|
+
};
|
|
1318
|
+
}
|
|
1319
|
+
});
|
|
1320
|
+
|
|
1321
|
+
export { _sfc_main as default };
|