xyvcard-live 0.0.1

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.
Files changed (42) hide show
  1. package/README.md +51 -0
  2. package/dist/add-CZ-qxdyj.mjs +784 -0
  3. package/dist/index-BEKuxMN9.mjs +4223 -0
  4. package/dist/index-BnJNPqw0.mjs +3249 -0
  5. package/dist/index-DLHRpKZf.mjs +4 -0
  6. package/dist/index-Jusy_c5g.mjs +1438 -0
  7. package/dist/index-fkh3q-6C.mjs +4 -0
  8. package/dist/index.mjs +6 -0
  9. package/dist/index.vue_vue_type_script_setup_true_lang-B2Da7LnF.mjs +494 -0
  10. package/dist/index.vue_vue_type_script_setup_true_lang-BM5U87cI.mjs +456 -0
  11. package/dist/info-DhG0Tqwk.mjs +404 -0
  12. package/dist/lives copy-Di8sUdq4.mjs +286 -0
  13. package/dist/lives-ftiJP8LL.mjs +70 -0
  14. package/dist/style.css +1 -0
  15. package/dts/src/App.vue.d.ts +2 -0
  16. package/dts/src/api/live/index.d.ts +12 -0
  17. package/dts/src/api/live/zb-live-comment/index.d.ts +22 -0
  18. package/dts/src/api/live/zb-live-comment/types.d.ts +82 -0
  19. package/dts/src/api/live/zb-live-user/index.d.ts +22 -0
  20. package/dts/src/api/live/zb-live-user/types.d.ts +108 -0
  21. package/dts/src/api/live/zb-live-video/index.d.ts +14 -0
  22. package/dts/src/api/live/zb-live-video/types.d.ts +124 -0
  23. package/dts/src/components/VideoUpload/index.vue.d.ts +41 -0
  24. package/dts/src/components/liveList/index.vue.d.ts +73 -0
  25. package/dts/src/constant.d.ts +53 -0
  26. package/dts/src/index.d.ts +7 -0
  27. package/dts/src/lang/index.d.ts +1 -0
  28. package/dts/src/lang/live/en.d.ts +59 -0
  29. package/dts/src/lang/live/zh-cn.d.ts +97 -0
  30. package/dts/src/main.d.ts +5 -0
  31. package/dts/src/permission.d.ts +1 -0
  32. package/dts/src/router/index.d.ts +10 -0
  33. package/dts/src/utils/copy.d.ts +1 -0
  34. package/dts/src/utils/timePlugin.d.ts +5 -0
  35. package/dts/src/views/live/zb-live-comment/index.vue.d.ts +2 -0
  36. package/dts/src/views/live/zb-live-user/index.vue.d.ts +2 -0
  37. package/dts/src/views/live/zb-live-video/add.vue.d.ts +2 -0
  38. package/dts/src/views/live/zb-live-video/index.vue.d.ts +2 -0
  39. package/dts/src/views/live/zb-live-video/info.vue.d.ts +2 -0
  40. package/dts/src/views/live/zb-live-video/lives copy.vue.d.ts +15 -0
  41. package/dts/src/views/live/zb-live-video/lives.vue.d.ts +16 -0
  42. package/package.json +58 -0
@@ -0,0 +1,784 @@
1
+ import { defineComponent as se, mergeModels as oe, ref as S, useModel as fe, onUnmounted as ye, resolveComponent as _, createBlock as E, openBlock as s, withCtx as o, createVNode as n, createElementBlock as M, createCommentVNode as b, createElementVNode as g, createTextVNode as Y, toDisplayString as w, getCurrentInstance as Te, reactive as re, watch as K, computed as _e, onMounted as Ve, unref as t, Fragment as Q, renderList as ee } from "vue";
2
+ import { ElMessageBox as ne, ElMessage as V, genFileId as ge } from "element-plus";
3
+ import { fileApi as le, routerUtil as de } from "jmash-core";
4
+ import { useRoute as ue, useRouter as he } from "vue-router";
5
+ import { l as F, _ as me, D as U, C as m } from "./index-BnJNPqw0.mjs";
6
+ import { useI18n as ve } from "vue-i18n";
7
+ import Ee from "./lives-ftiJP8LL.mjs";
8
+ const be = { class: "el-upload__text" }, ke = {
9
+ key: 0,
10
+ class: "video-preview"
11
+ }, Ue = ["src"], Me = { class: "dialog-footer" }, Se = /* @__PURE__ */ se({
12
+ __name: "index",
13
+ props: /* @__PURE__ */ oe({
14
+ limit: {
15
+ type: Number,
16
+ default: 1
17
+ },
18
+ // 视频大小限制
19
+ videoMaxSize: {
20
+ type: Number,
21
+ default: 500
22
+ }
23
+ }, {
24
+ modelValue: { type: Boolean, required: !0 },
25
+ modelModifiers: {}
26
+ }),
27
+ emits: /* @__PURE__ */ oe(["filesResponse", "uploadFileList"], ["update:modelValue"]),
28
+ setup(B, { expose: ae, emit: N }) {
29
+ const { t: c } = ve(), e = ue(), $ = S(le.uploadUrl()), T = S(le.authHeader()), y = S(), I = fe(B, "modelValue"), p = S([]), P = S("");
30
+ let k = null;
31
+ const q = B, x = N, j = () => {
32
+ I.value = !1;
33
+ }, A = async (u) => {
34
+ if (!u || u.status !== "ready") return;
35
+ const v = u.raw, h = [".mp4", ".flv", ".mov", ".avi", ".mkv"], l = v.name.toLowerCase();
36
+ if (!h.some((r) => l.endsWith(r))) {
37
+ ne.confirm(c("video.onlySupportVideo"), c("file.warning"), {
38
+ confirmButtonText: c("common.confirm"),
39
+ cancelButtonText: c("common.cancel"),
40
+ type: "warning"
41
+ }).catch(() => {
42
+ const r = p.value.findIndex(
43
+ (O) => O.uid === u.uid
44
+ );
45
+ r !== -1 && p.value.splice(r, 1);
46
+ });
47
+ return;
48
+ }
49
+ if (!(u.size / 1024 / 1024 < q.videoMaxSize))
50
+ return X(
51
+ u,
52
+ c("video.videoLtRequired", { size: q.videoMaxSize })
53
+ );
54
+ k = URL.createObjectURL(v), P.value = k;
55
+ }, W = async (u, v) => {
56
+ if (console.log("文件上传返回结果:", u, v), !u.fileSrc) {
57
+ V.error(c("video.uploadFail") || "视频上传失败,未获取到文件路径"), L();
58
+ return;
59
+ }
60
+ try {
61
+ const h = {
62
+ tenant: e.query.tenant,
63
+ requestId: Math.random() * 10 + "",
64
+ mediaFile: u.fileSrc
65
+ };
66
+ console.log("调用liveVideoUpload参数:", h);
67
+ const l = await F.liveVideoUpload(
68
+ h
69
+ );
70
+ if (console.log("liveVideoUpload接口返回:", l), !l || !l.data || !l.data.mediaUrl) {
71
+ V.error("视频上传成功,但腾讯云点播未返回播放地址"), L();
72
+ return;
73
+ }
74
+ const a = {
75
+ ...u,
76
+ // 保留原有的fileSrc等信息
77
+ playUrl: l.data.mediaUrl,
78
+ // 腾讯云真实播放地址 ✅
79
+ // totalSeconds: response.data.totalSeconds || 0, // 视频时长(秒) ✅
80
+ fileName: v.name,
81
+ fileSize: v.size
82
+ };
83
+ V({ message: c("video.uploadSuccess"), type: "success" }), P.value = a.playUrl, k = null, x("filesResponse", a), x("uploadFileList", v), setTimeout(() => {
84
+ I.value = !1;
85
+ }, 800);
86
+ } catch (h) {
87
+ console.error("调用liveVideoUpload接口失败:", h), V.error(
88
+ c("video.uploadFail") || "视频文件上传成功,但同步至腾讯云点播失败,请重试"
89
+ ), L();
90
+ }
91
+ }, Z = (u) => {
92
+ y.value.clearFiles();
93
+ const v = u[0];
94
+ v.uid = ge(), y.value.handleStart(v);
95
+ }, D = () => {
96
+ L();
97
+ }, C = () => {
98
+ L(), H();
99
+ };
100
+ function z() {
101
+ if (p.value.length === 0) {
102
+ V.warning(c("video.pleaseSelectVideo"));
103
+ return;
104
+ }
105
+ y.value.submit();
106
+ }
107
+ const H = () => {
108
+ y.value && (y.value.clearFiles(), p.value = []);
109
+ }, L = () => {
110
+ k && (URL.revokeObjectURL(k), P.value = "", k = null);
111
+ }, X = async (u, v) => new Promise((h) => {
112
+ ne.confirm(v, c("file.warning"), {
113
+ confirmButtonText: c("common.confirm"),
114
+ cancelButtonText: c("common.cancel"),
115
+ type: "warning"
116
+ }).then(() => {
117
+ h(!0);
118
+ }).catch(() => {
119
+ const l = p.value.findIndex(
120
+ (a) => a.name === u.name
121
+ );
122
+ l !== -1 && p.value.splice(l, 1), h(!1);
123
+ });
124
+ });
125
+ return ye(() => {
126
+ L();
127
+ }), ae({ clearFileList: H }), (u, v) => {
128
+ const h = _("upload-filled"), l = _("el-icon"), a = _("el-upload"), d = _("el-button"), f = _("el-dialog");
129
+ return s(), E(f, {
130
+ modelValue: I.value,
131
+ "onUpdate:modelValue": v[1] || (v[1] = (r) => I.value = r),
132
+ width: "700px",
133
+ "close-on-click-modal": !1,
134
+ onClose: C
135
+ }, {
136
+ footer: o(() => [
137
+ g("div", Me, [
138
+ n(d, { onClick: j }, {
139
+ default: o(() => [
140
+ Y(w(u.$t("common.cancel")), 1)
141
+ ]),
142
+ _: 1
143
+ }),
144
+ n(d, {
145
+ type: "primary",
146
+ onClick: z
147
+ }, {
148
+ default: o(() => [
149
+ Y(w(u.$t("common.confirm")), 1)
150
+ ]),
151
+ _: 1
152
+ })
153
+ ])
154
+ ]),
155
+ default: o(() => [
156
+ n(a, {
157
+ ref_key: "uploadRef",
158
+ ref: y,
159
+ "file-list": p.value,
160
+ "onUpdate:fileList": v[0] || (v[0] = (r) => p.value = r),
161
+ action: $.value,
162
+ headers: T.value,
163
+ drag: "",
164
+ limit: q.limit,
165
+ "on-exceed": Z,
166
+ "auto-upload": !1,
167
+ "on-change": A,
168
+ "on-success": W,
169
+ "on-remove": D,
170
+ accept: "video/mp4,video/flv,video/mov,video/avi,video/mkv"
171
+ }, {
172
+ tip: o(() => [...v[2] || (v[2] = [
173
+ g("div", { class: "el-upload__tip" }, " 注:可上传mp4/flv/mov/avi/mkv格式视频,图片/文档类文件不支持 ", -1)
174
+ ])]),
175
+ default: o(() => [
176
+ n(l, { class: "el-icon--upload" }, {
177
+ default: o(() => [
178
+ n(h)
179
+ ]),
180
+ _: 1
181
+ }),
182
+ g("div", be, [
183
+ Y(w(u.$t("common.dragFiles")), 1),
184
+ g("em", null, w(u.$t("video.uploadEvent")), 1)
185
+ ])
186
+ ]),
187
+ _: 1
188
+ }, 8, ["file-list", "action", "headers", "limit"]),
189
+ P.value ? (s(), M("div", ke, [
190
+ v[3] || (v[3] = g("h4", { style: { "font-size": "14px", margin: "15px 0 10px", color: "#333" } }, " 视频预览 ", -1)),
191
+ g("video", {
192
+ src: P.value,
193
+ controls: "",
194
+ width: "100%",
195
+ "max-height": "300px",
196
+ playsinline: ""
197
+ }, " 您的浏览器不支持视频预览 ", 8, Ue)
198
+ ])) : b("", !0)
199
+ ]),
200
+ _: 1
201
+ }, 8, ["modelValue"]);
202
+ };
203
+ }
204
+ }), we = /* @__PURE__ */ me(Se, [["__scopeId", "data-v-3e7c6d31"]]), Pe = { class: "app-container" }, Le = { class: "search-container" }, Ye = {
205
+ key: 0,
206
+ class: "live-tip-text"
207
+ }, Ie = {
208
+ key: 0,
209
+ class: "setting-status"
210
+ }, De = {
211
+ key: 1,
212
+ class: "setting-status"
213
+ }, Re = {
214
+ key: 0,
215
+ class: "setting-status"
216
+ }, Ne = {
217
+ key: 1,
218
+ class: "setting-status"
219
+ }, $e = ["src"], qe = ["src"], Ce = { class: "files-list" }, Fe = { class: "files-list" }, xe = { class: "files-list" }, ze = { class: "button-container" }, He = "https://mm.sooyie.cn/v1/file/range/", Oe = /* @__PURE__ */ se({
220
+ __name: "add",
221
+ setup(B) {
222
+ const { proxy: ae } = Te(), N = (l) => !l || l.startsWith("http://") || l.startsWith("https://") || l.startsWith(He) ? l : le.fileCompleteRangeUrl(l), c = S();
223
+ let e = re({
224
+ requestId: Math.random() * 10 + "",
225
+ updateMask: ""
226
+ });
227
+ const $ = (l) => {
228
+ let a = "liveName,liveType,startTime,showMode,preStreamPic,liveStreamPic,bgPic,streamerName,liveDescprition,replayMode,playUrl";
229
+ return l === m.REPLAY_MODE.end && (a += ",replayEndTime"), e.liveType !== m.LIVE_TYPE.live && (a += ",endTime"), a;
230
+ };
231
+ e.updateMask = $(e.replayMode), K(
232
+ () => e.replayMode,
233
+ () => {
234
+ e.updateMask = $(e.replayMode);
235
+ }
236
+ );
237
+ const T = S(null), y = S(null), I = _e(() => k.query.copy === "true");
238
+ Ve(() => {
239
+ U.liveTypeEnum.values && U.liveTypeEnum.values.length > 0 && (e.liveType = U.liveTypeEnum.values[0].key), U.replayModeEnum.values && U.replayModeEnum.values.length > 0 && (e.replayMode = U.replayModeEnum.values[1].key), U.showModeEnum.values && U.showModeEnum.values.length > 0 && (e.showMode = U.showModeEnum.values[0].key), q();
240
+ });
241
+ const { t: p } = ve(), P = he(), k = ue(), q = async () => {
242
+ const l = k.query.liveId;
243
+ if (l)
244
+ try {
245
+ const a = await F.findById({ liveId: l });
246
+ if (!a.data) {
247
+ V.warning("未获取到直播数据");
248
+ return;
249
+ }
250
+ a.data.liveType === m.LIVE_TYPE.fake_live ? T.value = {
251
+ playUrl: N(a.data.playUrl),
252
+ totalSeconds: a.data.totalSeconds || 0
253
+ } : a.data.liveType === m.LIVE_TYPE.vod && (y.value = {
254
+ playUrl: N(a.data.playUrl)
255
+ });
256
+ const d = (f) => {
257
+ if (!f) return;
258
+ const r = new Date(f);
259
+ if (!(isNaN(r.getTime()) || r.getFullYear() === 1970))
260
+ return r.toISOString();
261
+ };
262
+ if (a.data.startTime && (e.startTime = d(a.data.startTime)), a.data.endTime && (e.endTime = d(a.data.endTime)), a.data.replayEndTime && (e.replayEndTime = d(a.data.replayEndTime)), a.data.replayStartTime && (e.replayStartTime = d(a.data.replayStartTime)), I.value) {
263
+ const f = { ...a.data };
264
+ delete f.liveId, f.liveName = `${f.liveName}`, e.liveId = void 0, Object.assign(e, f), V.info("已加载原直播数据,当前为复制模式(创建新直播)");
265
+ } else
266
+ Object.assign(e, a.data);
267
+ } catch (a) {
268
+ console.error("获取直播详情失败:", a), V.error("获取直播详情失败");
269
+ }
270
+ }, x = re({
271
+ liveType: [
272
+ {
273
+ required: !0,
274
+ message: p("liveVideo.liveTypeRequired"),
275
+ trigger: "change"
276
+ }
277
+ ],
278
+ liveName: [
279
+ {
280
+ required: !0,
281
+ message: p("liveVideo.liveNameRequired"),
282
+ trigger: "blur"
283
+ }
284
+ ],
285
+ startTime: [
286
+ {
287
+ required: !0,
288
+ message: p("liveVideo.startTimeRequired"),
289
+ trigger: "change"
290
+ }
291
+ ],
292
+ streamerName: [
293
+ {
294
+ required: !0,
295
+ message: p("liveVideo.streamerNameRequired"),
296
+ trigger: "blur"
297
+ }
298
+ ],
299
+ preStreamPic: [
300
+ {
301
+ required: !0,
302
+ message: p("liveVideo.preStreamPicRequired"),
303
+ trigger: "change"
304
+ }
305
+ ],
306
+ endTime: [
307
+ {
308
+ required: !0,
309
+ message: p("liveVideo.endTimeRequired"),
310
+ trigger: "change"
311
+ },
312
+ {
313
+ validator: (l, a, d) => {
314
+ if (e.liveType === m.LIVE_TYPE.vod && e.startTime && a) {
315
+ const f = new Date(e.startTime).getTime();
316
+ new Date(a).getTime() <= f ? d(new Error("结束时间必须大于开始时间")) : d();
317
+ } else
318
+ d();
319
+ },
320
+ trigger: "change"
321
+ }
322
+ ],
323
+ replayEndTime: [
324
+ {
325
+ required: !0,
326
+ message: p("liveVideo.replayEndTimeRequired"),
327
+ trigger: "change",
328
+ validator: (l, a, d) => {
329
+ e.replayMode === m.REPLAY_MODE.end && !a ? d(new Error(p("liveVideo.replayEndTimeRequired"))) : d();
330
+ }
331
+ }
332
+ ]
333
+ });
334
+ function j() {
335
+ de.closeTagView(k.fullPath, P, !1);
336
+ }
337
+ function A(l) {
338
+ e.preStreamPic = l.response.fileSrc;
339
+ }
340
+ function W(l) {
341
+ e.liveStreamPic = l.response.fileSrc;
342
+ }
343
+ function Z(l) {
344
+ e.bgPic = l.response.fileSrc;
345
+ }
346
+ const D = S({
347
+ visible: !1
348
+ }), C = S(!1);
349
+ function z() {
350
+ D.value.visible = !0;
351
+ }
352
+ const H = () => {
353
+ C.value = !0;
354
+ }, L = (l) => {
355
+ if (console.log(l, "=>files "), l != null && l.playUrl) {
356
+ const a = l.playUrl;
357
+ y.value = {
358
+ playUrl: a,
359
+ totalSeconds: l.totalSeconds || 0
360
+ }, e.playUrl = a, V.success("本地视频上传成功!");
361
+ } else
362
+ V.error("视频地址解析失败,请重新上传");
363
+ }, X = (l) => {
364
+ T.value = null, y.value = null;
365
+ const a = N(l.playUrl);
366
+ e.liveType === m.LIVE_TYPE.fake_live ? (T.value = {
367
+ playUrl: a,
368
+ totalSeconds: l.totalSeconds || 0,
369
+ liveId: l.liveId,
370
+ liveName: l.liveName
371
+ }, u()) : e.liveType === m.LIVE_TYPE.vod && (y.value = {
372
+ playUrl: a,
373
+ liveId: l.liveId,
374
+ liveName: l.liveName
375
+ }), e.playUrl = a, c.value && c.value.validateField("fakeLiveSetting");
376
+ }, u = () => {
377
+ if (T.value && e.startTime) {
378
+ const l = new Date(e.startTime).getTime(), a = (T.value.totalSeconds || 0) * 1e3, d = new Date(l + a);
379
+ e.endTime = d.toISOString(), c.value && c.value.validateField("endTime");
380
+ }
381
+ }, v = () => {
382
+ e.playUrl = "", e.liveType === m.LIVE_TYPE.fake_live && T.value ? u() : e.endTime = "";
383
+ };
384
+ K(
385
+ () => e.startTime,
386
+ (l) => {
387
+ e.liveType === m.LIVE_TYPE.fake_live && T.value && l && u();
388
+ }
389
+ ), K(
390
+ () => e.replayMode,
391
+ (l) => {
392
+ l !== m.REPLAY_MODE.end && (e.replayEndTime = void 0), e.updateMask = $(l);
393
+ }
394
+ );
395
+ const h = async () => {
396
+ var a;
397
+ if (e.liveType === m.LIVE_TYPE.fake_live && !T.value) {
398
+ V.error(p("liveVideo.fakeLiveRequired"));
399
+ return;
400
+ }
401
+ if (e.liveType === m.LIVE_TYPE.vod && !y.value) {
402
+ V.error(p("liveVideo.vodRequired"));
403
+ return;
404
+ }
405
+ if (await ((a = c.value) == null ? void 0 : a.validate()))
406
+ try {
407
+ let d;
408
+ if (I.value) {
409
+ const f = { ...e };
410
+ delete f.liveId, d = await F.create(f);
411
+ } else k.query.liveId ? d = await F.update(e) : d = await F.create(e);
412
+ d.status === 200 && (V.success(p("common.submitSuccess")), de.closeTagView(k.fullPath, P, !1));
413
+ } catch (d) {
414
+ V.error(p("common.submitFail") + d.message);
415
+ }
416
+ };
417
+ return (l, a) => {
418
+ const d = _("el-radio"), f = _("el-radio-group"), r = _("el-form-item"), O = _("el-input"), G = _("el-date-picker"), J = _("jmash-single-image-upload"), pe = _("jmash-editor"), ce = _("el-form"), te = _("el-button");
419
+ return s(), M("div", Pe, [
420
+ g("div", Le, [
421
+ n(ce, {
422
+ ref_key: "liveFormRef",
423
+ ref: c,
424
+ model: t(e),
425
+ rules: x,
426
+ style: { "max-width": "800px" },
427
+ "label-width": "auto"
428
+ }, {
429
+ default: o(() => {
430
+ var R, ie;
431
+ return [
432
+ n(r, {
433
+ label: l.$t("liveVideo.liveType"),
434
+ prop: "liveType"
435
+ }, {
436
+ default: o(() => [
437
+ n(f, {
438
+ modelValue: t(e).liveType,
439
+ "onUpdate:modelValue": a[0] || (a[0] = (i) => t(e).liveType = i),
440
+ onChange: v
441
+ }, {
442
+ default: o(() => [
443
+ (s(!0), M(Q, null, ee(t(U).liveTypeEnum.values, (i) => (s(), E(d, {
444
+ key: i.key,
445
+ border: !0,
446
+ value: i.key
447
+ }, {
448
+ default: o(() => [
449
+ Y(w(i.value), 1)
450
+ ]),
451
+ _: 2
452
+ }, 1032, ["value"]))), 128))
453
+ ]),
454
+ _: 1
455
+ }, 8, ["modelValue"])
456
+ ]),
457
+ _: 1
458
+ }, 8, ["label"]),
459
+ t(e).liveType === t(m).LIVE_TYPE.live ? (s(), M("div", Ye, " 实时直播形式,根据实际画面进行传播,无法快进或回放 ")) : b("", !0),
460
+ t(e).liveType === t(m).LIVE_TYPE.fake_live ? (s(), E(r, {
461
+ key: 1,
462
+ label: l.$t("liveVideo.fakeLive")
463
+ }, {
464
+ default: o(() => {
465
+ var i;
466
+ return [
467
+ g("button", {
468
+ type: "button",
469
+ class: "fakeLive",
470
+ onClick: z
471
+ }, " 伪直播设置 "),
472
+ (i = T.value) != null && i.playUrl ? (s(), M("div", De, "已设置")) : (s(), M("div", Ie, " 未设置 "))
473
+ ];
474
+ }),
475
+ _: 1
476
+ }, 8, ["label"])) : b("", !0),
477
+ t(e).liveType === t(m).LIVE_TYPE.vod ? (s(), E(r, {
478
+ key: 2,
479
+ label: l.$t("liveVideo.vod")
480
+ }, {
481
+ default: o(() => {
482
+ var i;
483
+ return [
484
+ g("button", {
485
+ type: "button",
486
+ class: "fakeLive",
487
+ onClick: z
488
+ }, " 点播设置 "),
489
+ g("button", {
490
+ type: "button",
491
+ class: "fakeLive",
492
+ onClick: H
493
+ }, " 从本地上传视频 "),
494
+ (i = y.value) != null && i.playUrl ? (s(), M("div", Ne, "已设置")) : (s(), M("div", Re, "未设置"))
495
+ ];
496
+ }),
497
+ _: 1
498
+ }, 8, ["label"])) : b("", !0),
499
+ (R = T.value) != null && R.playUrl && t(e).liveType === t(m).LIVE_TYPE.fake_live ? (s(), E(r, {
500
+ key: 3,
501
+ label: "视频预览"
502
+ }, {
503
+ default: o(() => {
504
+ var i;
505
+ return [
506
+ (i = T.value) != null && i.playUrl ? (s(), M("video", {
507
+ key: 0,
508
+ src: T.value.playUrl,
509
+ controls: "",
510
+ width: "400",
511
+ height: "250",
512
+ autoplay: "",
513
+ muted: "",
514
+ playsinline: ""
515
+ }, " 您的浏览器不支持视频播放 ", 8, $e)) : b("", !0)
516
+ ];
517
+ }),
518
+ _: 1
519
+ })) : b("", !0),
520
+ (ie = y.value) != null && ie.playUrl && t(e).liveType === t(m).LIVE_TYPE.vod ? (s(), E(r, {
521
+ key: 4,
522
+ label: "视频预览"
523
+ }, {
524
+ default: o(() => {
525
+ var i;
526
+ return [
527
+ (i = y.value) != null && i.playUrl ? (s(), M("video", {
528
+ key: 0,
529
+ src: y.value.playUrl,
530
+ controls: "",
531
+ width: "400",
532
+ height: "250",
533
+ autoplay: "",
534
+ muted: "",
535
+ playsinline: ""
536
+ }, " 您的浏览器不支持视频播放 ", 8, qe)) : b("", !0)
537
+ ];
538
+ }),
539
+ _: 1
540
+ })) : b("", !0),
541
+ n(r, {
542
+ label: l.$t("liveVideo.liveName"),
543
+ prop: "liveName"
544
+ }, {
545
+ default: o(() => [
546
+ n(O, {
547
+ modelValue: t(e).liveName,
548
+ "onUpdate:modelValue": a[1] || (a[1] = (i) => t(e).liveName = i),
549
+ placeholder: l.$t("liveVideo.liveNameRequired"),
550
+ maxlength: "100",
551
+ "show-word-limit": "",
552
+ clearable: ""
553
+ }, null, 8, ["modelValue", "placeholder"])
554
+ ]),
555
+ _: 1
556
+ }, 8, ["label"]),
557
+ n(r, {
558
+ label: l.$t("liveVideo.startTime"),
559
+ prop: "startTime"
560
+ }, {
561
+ default: o(() => [
562
+ n(G, {
563
+ modelValue: t(e).startTime,
564
+ "onUpdate:modelValue": a[2] || (a[2] = (i) => t(e).startTime = i),
565
+ type: "datetime",
566
+ placeholder: l.$t("liveVideo.startTimeRequired"),
567
+ format: "YYYY-MM-DD HH:mm:ss",
568
+ "value-format": "YYYY-MM-DDTHH:mm:ssZ",
569
+ class: "w-full"
570
+ }, null, 8, ["modelValue", "placeholder"])
571
+ ]),
572
+ _: 1
573
+ }, 8, ["label"]),
574
+ t(e).liveType !== t(m).LIVE_TYPE.live ? (s(), E(r, {
575
+ key: 5,
576
+ label: l.$t("liveVideo.endTime"),
577
+ prop: "endTime"
578
+ }, {
579
+ default: o(() => [
580
+ n(G, {
581
+ modelValue: t(e).endTime,
582
+ "onUpdate:modelValue": a[3] || (a[3] = (i) => t(e).endTime = i),
583
+ type: "datetime",
584
+ placeholder: l.$t("liveVideo.endTimeRequired"),
585
+ format: "YYYY-MM-DD HH:mm:ss",
586
+ "value-format": "YYYY-MM-DDTHH:mm:ssZ",
587
+ class: "w-full",
588
+ disabled: t(e).liveType === t(m).LIVE_TYPE.fake_live
589
+ }, null, 8, ["modelValue", "placeholder", "disabled"])
590
+ ]),
591
+ _: 1
592
+ }, 8, ["label"])) : b("", !0),
593
+ n(r, {
594
+ label: l.$t("liveVideo.streamerName"),
595
+ prop: "streamerName"
596
+ }, {
597
+ default: o(() => [
598
+ n(O, {
599
+ modelValue: t(e).streamerName,
600
+ "onUpdate:modelValue": a[4] || (a[4] = (i) => t(e).streamerName = i),
601
+ placeholder: l.$t("liveVideo.streamerNameRequired"),
602
+ "show-word-limit": "",
603
+ clearable: ""
604
+ }, null, 8, ["modelValue", "placeholder"])
605
+ ]),
606
+ _: 1
607
+ }, 8, ["label"]),
608
+ n(r, {
609
+ label: l.$t("liveVideo.showMode"),
610
+ prop: "showMode"
611
+ }, {
612
+ default: o(() => [
613
+ n(f, {
614
+ modelValue: t(e).showMode,
615
+ "onUpdate:modelValue": a[5] || (a[5] = (i) => t(e).showMode = i)
616
+ }, {
617
+ default: o(() => [
618
+ (s(!0), M(Q, null, ee(t(U).showModeEnum.values, (i) => (s(), E(d, {
619
+ key: i.key,
620
+ value: i.key
621
+ }, {
622
+ default: o(() => [
623
+ Y(w(i.value), 1)
624
+ ]),
625
+ _: 2
626
+ }, 1032, ["value"]))), 128))
627
+ ]),
628
+ _: 1
629
+ }, 8, ["modelValue"])
630
+ ]),
631
+ _: 1
632
+ }, 8, ["label"]),
633
+ n(r, {
634
+ label: l.$t("liveVideo.preStreamPic"),
635
+ prop: "preStreamPic"
636
+ }, {
637
+ default: o(() => [
638
+ g("div", Ce, [
639
+ n(J, {
640
+ "picture-url": t(e).preStreamPic,
641
+ onImageSrc: A,
642
+ width: 80,
643
+ type: "trans"
644
+ }, null, 8, ["picture-url"])
645
+ ])
646
+ ]),
647
+ _: 1
648
+ }, 8, ["label"]),
649
+ n(r, {
650
+ label: l.$t("liveVideo.liveStreamPic"),
651
+ prop: "liveStreamPic"
652
+ }, {
653
+ default: o(() => [
654
+ g("div", Fe, [
655
+ n(J, {
656
+ "picture-url": t(e).liveStreamPic,
657
+ onImageSrc: W,
658
+ width: 80,
659
+ type: "trans"
660
+ }, null, 8, ["picture-url"])
661
+ ])
662
+ ]),
663
+ _: 1
664
+ }, 8, ["label"]),
665
+ t(e).showMode === t(m).SHOW_MODE.vertical ? (s(), E(r, {
666
+ key: 6,
667
+ label: l.$t("liveVideo.bgPic"),
668
+ prop: "bgPic"
669
+ }, {
670
+ default: o(() => [
671
+ g("div", xe, [
672
+ n(J, {
673
+ "picture-url": t(e).bgPic,
674
+ onImageSrc: Z,
675
+ width: 80,
676
+ type: "trans"
677
+ }, null, 8, ["picture-url"])
678
+ ])
679
+ ]),
680
+ _: 1
681
+ }, 8, ["label"])) : b("", !0),
682
+ t(e).liveType !== t(m).LIVE_TYPE.vod ? (s(), E(r, {
683
+ key: 7,
684
+ label: l.$t("liveVideo.replayMode"),
685
+ prop: "replayMode"
686
+ }, {
687
+ default: o(() => [
688
+ n(f, {
689
+ modelValue: t(e).replayMode,
690
+ "onUpdate:modelValue": a[6] || (a[6] = (i) => t(e).replayMode = i)
691
+ }, {
692
+ default: o(() => [
693
+ (s(!0), M(Q, null, ee(t(U).replayModeEnum.values, (i) => (s(), E(d, {
694
+ key: i.key,
695
+ border: !0,
696
+ value: i.key
697
+ }, {
698
+ default: o(() => [
699
+ Y(w(i.value), 1)
700
+ ]),
701
+ _: 2
702
+ }, 1032, ["value"]))), 128))
703
+ ]),
704
+ _: 1
705
+ }, 8, ["modelValue"])
706
+ ]),
707
+ _: 1
708
+ }, 8, ["label"])) : b("", !0),
709
+ t(e).replayMode === t(m).REPLAY_MODE.end && t(e).liveType !== t(m).LIVE_TYPE.vod ? (s(), E(r, {
710
+ key: 8,
711
+ label: l.$t("liveVideo.replayEndTime"),
712
+ prop: "replayEndTime"
713
+ }, {
714
+ default: o(() => [
715
+ n(G, {
716
+ modelValue: t(e).replayEndTime,
717
+ "onUpdate:modelValue": a[7] || (a[7] = (i) => t(e).replayEndTime = i),
718
+ type: "datetime",
719
+ placeholder: l.$t("liveVideo.replayEndTimeRequired"),
720
+ format: "YYYY-MM-DD HH:mm:ss",
721
+ "value-format": "YYYY-MM-DDTHH:mm:ssZ",
722
+ class: "w-full"
723
+ }, null, 8, ["modelValue", "placeholder"])
724
+ ]),
725
+ _: 1
726
+ }, 8, ["label"])) : b("", !0),
727
+ n(r, {
728
+ label: l.$t("liveVideo.liveDescprition"),
729
+ prop: "liveDescprition"
730
+ }, {
731
+ default: o(() => [
732
+ n(pe, {
733
+ modelValue: t(e).liveDescprition,
734
+ "onUpdate:modelValue": a[8] || (a[8] = (i) => t(e).liveDescprition = i),
735
+ style: { width: "100%" }
736
+ }, null, 8, ["modelValue"])
737
+ ]),
738
+ _: 1
739
+ }, 8, ["label"])
740
+ ];
741
+ }),
742
+ _: 1
743
+ }, 8, ["model", "rules"]),
744
+ g("div", ze, [
745
+ n(te, {
746
+ type: "primary",
747
+ onClick: j
748
+ }, {
749
+ default: o(() => [
750
+ Y(w(l.$t("common.back")), 1)
751
+ ]),
752
+ _: 1
753
+ }),
754
+ n(te, {
755
+ type: "primary",
756
+ onClick: h
757
+ }, {
758
+ default: o(() => [
759
+ Y(w(l.$t("common.confirm")), 1)
760
+ ]),
761
+ _: 1
762
+ })
763
+ ])
764
+ ]),
765
+ D.value.visible ? (s(), E(Ee, {
766
+ key: 0,
767
+ modelValue: D.value.visible,
768
+ "onUpdate:modelValue": a[9] || (a[9] = (R) => D.value.visible = R),
769
+ width: "1200px",
770
+ onConfirmSelect: X
771
+ }, null, 8, ["modelValue"])) : b("", !0),
772
+ n(we, {
773
+ modelValue: C.value,
774
+ "onUpdate:modelValue": a[10] || (a[10] = (R) => C.value = R),
775
+ "video-max-size": 800,
776
+ onFilesResponse: L
777
+ }, null, 8, ["modelValue"])
778
+ ]);
779
+ };
780
+ }
781
+ }), Je = /* @__PURE__ */ me(Oe, [["__scopeId", "data-v-f4a47fea"]]);
782
+ export {
783
+ Je as default
784
+ };