hy-dispatch-ui-v3 0.1.6 → 0.2.0
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/README.md +47 -0
- package/dist/tailwind.css +349 -4
- package/es/components/appAudioPlayer/appAudioPlayer.vue.mjs +462 -0
- package/es/components/appAudioPlayer/index.mjs +6 -0
- package/es/components/appAudioPlayer/js/index.mjs +327 -0
- package/es/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
- package/es/components/appButton/style/appButton.scss +0 -1
- package/es/components/appConfigProvider/appConfigProvider.vue.mjs +22 -1
- package/es/components/appCutter/appCutter.vue.mjs +202 -129
- package/es/components/appDatePicker/appDatePicker.vue.mjs +1 -1
- package/es/components/appForm/appForm.vue.mjs +132 -209
- package/es/components/appForm/cpns/appFormItem.vue.mjs +312 -0
- package/es/components/appForm/cpns/arrayItem.vue.mjs +305 -0
- package/es/components/appForm/cpns/extraItem.vue.mjs +140 -0
- package/es/components/appForm/js/index.mjs +46 -24
- package/es/components/appForm/js/useAppForm.mjs +30 -6
- package/es/components/appForm/style/appForm.scss +53 -0
- package/es/components/appIcon/appIcon.vue.mjs +2 -1
- package/es/components/appIconBox/style/appIconBox.scss +0 -1
- package/es/components/appInput/appInput.vue.mjs +99 -0
- package/es/components/appInput/index.mjs +6 -0
- package/es/components/appMenu/appMenu.vue.mjs +129 -0
- package/es/components/appMenu/index.mjs +6 -0
- package/es/components/appMenu/style/appMenu.scss +145 -0
- package/es/components/appOrgCascader/appOrgCascader.vue.mjs +14 -10
- package/es/components/appSearch/appSearch.vue.mjs +55 -211
- package/es/components/appSearch/cpns/appSearchItem.vue.mjs +238 -0
- package/es/components/appSearch/js/index.mjs +20 -8
- package/es/components/appSearch/js/useAppSearch.mjs +10 -5
- package/es/components/appSearch/style/appSearch.scss +10 -0
- package/es/components/appTable/appTable.vue.mjs +312 -158
- package/es/components/appTable/cpns/columnSelect.vue.mjs +151 -156
- package/es/components/appTable/cpns/columnSelectItem.vue2.mjs +104 -110
- package/es/components/appTable/cpns/headerItem.vue.mjs +98 -0
- package/es/components/appTable/cpns/virtualTable.vue.mjs +560 -0
- package/es/components/appTable/js/index.mjs +46 -20
- package/es/components/appTable/js/search.mjs +1 -2
- package/es/components/appTable/js/useAppTable.mjs +58 -14
- package/es/components/appTable/style/appTable.scss +16 -0
- package/es/components/appTooltip/appTooltip.vue.mjs +24 -13
- package/es/components/appTree/appTree.vue.mjs +304 -0
- package/es/components/appTree/index.mjs +6 -0
- package/es/components/appTree/js/index.mjs +531 -0
- package/es/components/appUserAvatar/appUserAvatar.vue.mjs +9 -8
- package/es/components/appUserAvatar/style/appUserAvatar.scss +0 -1
- package/es/components/appVideoPlayer/appVideoPlayer.vue.mjs +647 -0
- package/es/components/appVideoPlayer/cpns/mediaLoading.vue.mjs +35 -0
- package/es/components/appVideoPlayer/index.mjs +6 -0
- package/es/components/appVideoPlayer/js/index.mjs +426 -0
- package/es/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
- package/es/components/appVideoPlayer/style/mediaLoading.scss +62 -0
- package/es/components/index.mjs +5 -0
- package/es/hooks/index.mjs +3 -0
- package/es/hooks/useApi.mjs +4 -4
- package/es/hooks/useAudioPlayerConfig.mjs +12 -0
- package/es/hooks/useGlobalConfig.mjs +18 -7
- package/es/hooks/useLocale.mjs +3 -11
- package/es/hooks/useMixins.mjs +1 -1
- package/es/hooks/usePermissionMap.mjs +12 -0
- package/es/hooks/useUserAvatarMap.mjs +2 -3
- package/es/hooks/useVideoPlayerConfig.mjs +12 -0
- package/es/index.mjs +14 -4
- package/es/locale/en.mjs +52 -3
- package/es/locale/zh_CN.mjs +48 -3
- package/es/make-installer.mjs +2 -0
- package/es/static/hy-svg-icons.js +462 -0
- package/es/static/protocolcheck.js +247 -0
- package/es/style/element/element.scss +9 -0
- package/es/style/element/index.scss +6 -3
- package/es/style/index.scss +11 -0
- package/es/style/theme.scss +73 -0
- package/es/utils/date.mjs +25 -1
- package/es/utils/file.mjs +5 -4
- package/es/utils/form.mjs +52 -0
- package/es/utils/handler.mjs +22 -2
- package/es/utils/index.mjs +6 -4
- package/es/utils/is.mjs +23 -2
- package/es/utils/loadScript.mjs +33 -0
- package/es/version.mjs +1 -1
- package/lib/components/appAudioPlayer/appAudioPlayer.vue.js +466 -0
- package/lib/components/appAudioPlayer/index.js +11 -0
- package/lib/components/appAudioPlayer/js/index.js +329 -0
- package/lib/components/appAudioPlayer/style/appAudioPlayer.scss +319 -0
- package/lib/components/appButton/style/appButton.scss +0 -1
- package/lib/components/appConfigProvider/appConfigProvider.vue.js +22 -1
- package/lib/components/appCutter/appCutter.vue.js +201 -128
- package/lib/components/appDatePicker/appDatePicker.vue.js +1 -1
- package/lib/components/appForm/appForm.vue.js +129 -206
- package/lib/components/appForm/cpns/appFormItem.vue.js +316 -0
- package/lib/components/appForm/cpns/arrayItem.vue.js +309 -0
- package/lib/components/appForm/cpns/extraItem.vue.js +144 -0
- package/lib/components/appForm/js/index.js +48 -23
- package/lib/components/appForm/js/useAppForm.js +30 -6
- package/lib/components/appForm/style/appForm.scss +53 -0
- package/lib/components/appIcon/appIcon.vue.js +2 -1
- package/lib/components/appIconBox/style/appIconBox.scss +0 -1
- package/lib/components/appInput/appInput.vue.js +103 -0
- package/lib/components/appInput/index.js +11 -0
- package/lib/components/appMenu/appMenu.vue.js +133 -0
- package/lib/components/appMenu/index.js +11 -0
- package/lib/components/appMenu/style/appMenu.scss +145 -0
- package/lib/components/appOrgCascader/appOrgCascader.vue.js +14 -10
- package/lib/components/appSearch/appSearch.vue.js +51 -207
- package/lib/components/appSearch/cpns/appSearchItem.vue.js +242 -0
- package/lib/components/appSearch/js/index.js +20 -7
- package/lib/components/appSearch/js/useAppSearch.js +10 -5
- package/lib/components/appSearch/style/appSearch.scss +10 -0
- package/lib/components/appTable/appTable.vue.js +319 -165
- package/lib/components/appTable/cpns/columnSelect.vue.js +151 -156
- package/lib/components/appTable/cpns/columnSelectItem.vue2.js +105 -111
- package/lib/components/appTable/cpns/headerItem.vue.js +102 -0
- package/lib/components/appTable/cpns/virtualTable.vue.js +564 -0
- package/lib/components/appTable/js/index.js +47 -19
- package/lib/components/appTable/js/search.js +1 -2
- package/lib/components/appTable/js/useAppTable.js +57 -13
- package/lib/components/appTable/style/appTable.scss +16 -0
- package/lib/components/appTooltip/appTooltip.vue.js +23 -12
- package/lib/components/appTree/appTree.vue.js +308 -0
- package/lib/components/appTree/index.js +11 -0
- package/lib/components/appTree/js/index.js +533 -0
- package/lib/components/appUserAvatar/appUserAvatar.vue.js +9 -8
- package/lib/components/appUserAvatar/style/appUserAvatar.scss +0 -1
- package/lib/components/appVideoPlayer/appVideoPlayer.vue.js +651 -0
- package/lib/components/appVideoPlayer/cpns/mediaLoading.vue.js +39 -0
- package/lib/components/appVideoPlayer/index.js +11 -0
- package/lib/components/appVideoPlayer/js/index.js +429 -0
- package/lib/components/appVideoPlayer/style/appVideoPlayer.scss +275 -0
- package/lib/components/appVideoPlayer/style/mediaLoading.scss +62 -0
- package/lib/components/index.js +42 -32
- package/lib/hooks/index.js +9 -0
- package/lib/hooks/useApi.js +4 -4
- package/lib/hooks/useAudioPlayerConfig.js +15 -0
- package/lib/hooks/useGlobalConfig.js +18 -7
- package/lib/hooks/useLocale.js +3 -11
- package/lib/hooks/useMixins.js +1 -1
- package/lib/hooks/usePermissionMap.js +15 -0
- package/lib/hooks/useUserAvatarMap.js +1 -2
- package/lib/hooks/useVideoPlayerConfig.js +15 -0
- package/lib/index.js +62 -33
- package/lib/locale/en.js +52 -3
- package/lib/locale/zh_CN.js +48 -3
- package/lib/make-installer.js +2 -0
- package/lib/static/hy-svg-icons.js +459 -8
- package/lib/static/protocolcheck.js +249 -0
- package/lib/style/element/element.scss +9 -0
- package/lib/style/element/index.scss +6 -3
- package/lib/style/index.scss +11 -0
- package/lib/style/theme.scss +73 -0
- package/lib/utils/date.js +25 -0
- package/lib/utils/file.js +4 -4
- package/lib/utils/form.js +57 -0
- package/lib/utils/handler.js +22 -1
- package/lib/utils/index.js +11 -1
- package/lib/utils/is.js +23 -1
- package/lib/utils/loadScript.js +37 -0
- package/lib/version.js +1 -1
- package/package.json +12 -10
- package/es/config/index.mjs +0 -1
- package/es/static/hy-svg-icons.mjs +0 -11
- package/lib/config/index.js +0 -2
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
import { defineComponent, useTemplateRef, onMounted, onUnmounted, openBlock, createElementBlock, normalizeClass, unref, createCommentVNode, createVNode, createElementVNode, toDisplayString, Fragment, createBlock, withCtx, createTextVNode, normalizeStyle, withDirectives, isRef, vModelText, renderList, renderSlot } from 'vue';
|
|
2
|
+
import { ElPopover, ElSlider } from 'element-plus';
|
|
3
|
+
import _sfc_main$1 from './cpns/mediaLoading.vue.mjs';
|
|
4
|
+
import { useVideoPlayer, useVideoResize } from './js/index.mjs';
|
|
5
|
+
import { protocolcheckLoad } from '../../utils/loadScript.mjs';
|
|
6
|
+
import { useLocale } from '../../hooks/useLocale.mjs';
|
|
7
|
+
import { useMixins } from '../../hooks/useMixins.mjs';
|
|
8
|
+
import { AppIcon } from '../appIcon/index.mjs';
|
|
9
|
+
import { AppButton } from '../appButton/index.mjs';
|
|
10
|
+
import { AppTooltip } from '../appTooltip/index.mjs';
|
|
11
|
+
import { useVideoPlayerConfig } from '../../hooks/useVideoPlayerConfig.mjs';
|
|
12
|
+
import { isBoolean, isNumber } from '../../utils/is.mjs';
|
|
13
|
+
|
|
14
|
+
import "./style/appVideoPlayer.scss";
|
|
15
|
+
|
|
16
|
+
const __default__ = defineComponent({
|
|
17
|
+
name: "AppVideoPlayer"
|
|
18
|
+
});
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
|
|
20
|
+
props: {
|
|
21
|
+
type: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: () => {
|
|
24
|
+
const { videoPlayerConfig } = useVideoPlayerConfig();
|
|
25
|
+
const { type } = videoPlayerConfig.value;
|
|
26
|
+
if (["default", "analyse"].includes(type)) return type;
|
|
27
|
+
return "default";
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
// 播放列表
|
|
31
|
+
playList: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: () => []
|
|
34
|
+
},
|
|
35
|
+
// 播放速度
|
|
36
|
+
speed: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: () => {
|
|
39
|
+
const { videoPlayerConfig } = useVideoPlayerConfig();
|
|
40
|
+
if (isNumber(videoPlayerConfig.value.speed)) {
|
|
41
|
+
return videoPlayerConfig.value.speed;
|
|
42
|
+
}
|
|
43
|
+
return 1;
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
// 播放规则
|
|
47
|
+
playRules: {
|
|
48
|
+
type: Number,
|
|
49
|
+
default: () => {
|
|
50
|
+
const { videoPlayerConfig } = useVideoPlayerConfig();
|
|
51
|
+
if ([1, 2, 3].includes) {
|
|
52
|
+
return videoPlayerConfig.value.playRules;
|
|
53
|
+
}
|
|
54
|
+
return 3;
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
// 是否显示播放规则
|
|
58
|
+
showPlayRules: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: () => {
|
|
61
|
+
const { videoPlayerConfig } = useVideoPlayerConfig();
|
|
62
|
+
const { showPlayRules } = videoPlayerConfig.value;
|
|
63
|
+
return isBoolean(showPlayRules) ? showPlayRules : true;
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
// 是否显示下载文件
|
|
67
|
+
showDownloadFiles: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: () => {
|
|
70
|
+
const { videoPlayerConfig } = useVideoPlayerConfig();
|
|
71
|
+
const { showDownloadFiles } = videoPlayerConfig.value;
|
|
72
|
+
return isBoolean(showDownloadFiles) ? showDownloadFiles : true;
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
// 是否显示展开控件
|
|
76
|
+
showShrink: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: () => {
|
|
79
|
+
const { videoPlayerConfig } = useVideoPlayerConfig();
|
|
80
|
+
const { showShrink } = videoPlayerConfig.value;
|
|
81
|
+
return isBoolean(showShrink) ? showShrink : false;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
// 是否显示全屏控件
|
|
85
|
+
showFullScreen: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: () => {
|
|
88
|
+
const { videoPlayerConfig } = useVideoPlayerConfig();
|
|
89
|
+
const { showFullScreen } = videoPlayerConfig.value;
|
|
90
|
+
return isBoolean(showFullScreen) ? showFullScreen : true;
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
// VLC协议
|
|
94
|
+
vlcProtocol: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: () => {
|
|
97
|
+
const { videoPlayerConfig } = useVideoPlayerConfig();
|
|
98
|
+
return videoPlayerConfig.value.vlcProtocol || "hyvlc";
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
// VLC下载地址
|
|
102
|
+
vlcAddress: {
|
|
103
|
+
type: String,
|
|
104
|
+
default: () => {
|
|
105
|
+
const { videoPlayerConfig } = useVideoPlayerConfig();
|
|
106
|
+
return videoPlayerConfig.value.vlcAddress;
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
// 下载处理
|
|
110
|
+
downloadFn: {
|
|
111
|
+
type: Function
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
emits: [
|
|
115
|
+
"canplay",
|
|
116
|
+
"timeupdate",
|
|
117
|
+
"play-start",
|
|
118
|
+
"play-ended",
|
|
119
|
+
"play-previous",
|
|
120
|
+
"play-next"
|
|
121
|
+
],
|
|
122
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
123
|
+
const props = __props;
|
|
124
|
+
const emits = __emit;
|
|
125
|
+
const { t } = useLocale();
|
|
126
|
+
const videoWrapperRef = useTemplateRef("videoWrapperRef");
|
|
127
|
+
const videoRef = useTemplateRef("videoRef");
|
|
128
|
+
const {
|
|
129
|
+
// useVideoPlayer
|
|
130
|
+
speed,
|
|
131
|
+
playRules,
|
|
132
|
+
loading,
|
|
133
|
+
videoItem,
|
|
134
|
+
videoUrl,
|
|
135
|
+
currentDuration,
|
|
136
|
+
totalDuration,
|
|
137
|
+
progress,
|
|
138
|
+
isDrop,
|
|
139
|
+
isFullScreen,
|
|
140
|
+
volumeValue,
|
|
141
|
+
hasVLC,
|
|
142
|
+
isCanNotPlayType,
|
|
143
|
+
videoState,
|
|
144
|
+
speedLabel,
|
|
145
|
+
isCanPlay,
|
|
146
|
+
isAnalyseType,
|
|
147
|
+
// 配置
|
|
148
|
+
speedList,
|
|
149
|
+
playRulesList,
|
|
150
|
+
// 函数
|
|
151
|
+
playVideo,
|
|
152
|
+
pauseVideo,
|
|
153
|
+
playPrevious,
|
|
154
|
+
playNext,
|
|
155
|
+
playRulesHandler,
|
|
156
|
+
speedHandler,
|
|
157
|
+
changeVolume,
|
|
158
|
+
getNowWh,
|
|
159
|
+
setVideoCurrentTime,
|
|
160
|
+
getPercent,
|
|
161
|
+
initFullScreenEvent,
|
|
162
|
+
destroyFullScreenEvent,
|
|
163
|
+
onFullScreenHandler,
|
|
164
|
+
openVLC,
|
|
165
|
+
downloadVLC,
|
|
166
|
+
onDownloadHandler,
|
|
167
|
+
// useVideoResize
|
|
168
|
+
isExpand,
|
|
169
|
+
videoHeight,
|
|
170
|
+
onSwitchShrink,
|
|
171
|
+
listenerVideoWrapper,
|
|
172
|
+
unlistenerVideoWrapper
|
|
173
|
+
} = useMixins(
|
|
174
|
+
{
|
|
175
|
+
props,
|
|
176
|
+
emits,
|
|
177
|
+
videoWrapperRef,
|
|
178
|
+
videoRef
|
|
179
|
+
},
|
|
180
|
+
[useVideoPlayer, useVideoResize]
|
|
181
|
+
);
|
|
182
|
+
protocolcheckLoad();
|
|
183
|
+
onMounted(() => {
|
|
184
|
+
initFullScreenEvent();
|
|
185
|
+
listenerVideoWrapper();
|
|
186
|
+
});
|
|
187
|
+
onUnmounted(() => {
|
|
188
|
+
destroyFullScreenEvent();
|
|
189
|
+
unlistenerVideoWrapper();
|
|
190
|
+
});
|
|
191
|
+
__expose({
|
|
192
|
+
playVideo,
|
|
193
|
+
pauseVideo,
|
|
194
|
+
setVideoCurrentTime
|
|
195
|
+
});
|
|
196
|
+
return (_ctx, _cache) => {
|
|
197
|
+
return openBlock(), createElementBlock(
|
|
198
|
+
"div",
|
|
199
|
+
{
|
|
200
|
+
ref_key: "videoWrapperRef",
|
|
201
|
+
ref: videoWrapperRef,
|
|
202
|
+
class: normalizeClass(["video-player-content", {
|
|
203
|
+
"video-player-content-pick-up": !unref(isExpand) && !unref(isFullScreen),
|
|
204
|
+
"full-video-player-content": unref(isFullScreen)
|
|
205
|
+
}])
|
|
206
|
+
},
|
|
207
|
+
[
|
|
208
|
+
createCommentVNode(" loading "),
|
|
209
|
+
unref(loading) ? (openBlock(), createElementBlock("div", {
|
|
210
|
+
key: 0,
|
|
211
|
+
class: "w-full h-full flex flex-col justify-center items-center absolute left-0 top-0"
|
|
212
|
+
}, [
|
|
213
|
+
createVNode(_sfc_main$1),
|
|
214
|
+
createElementVNode(
|
|
215
|
+
"span",
|
|
216
|
+
{ class: "text-xs text-theme mt-4" },
|
|
217
|
+
"..." + toDisplayString(unref(t)("videoPlayer.videoResourcesAreLoading")) + "...",
|
|
218
|
+
1
|
|
219
|
+
/* TEXT */
|
|
220
|
+
)
|
|
221
|
+
])) : createCommentVNode("v-if", true),
|
|
222
|
+
createCommentVNode(" \u65E0\u6CD5\u64AD\u653E "),
|
|
223
|
+
unref(videoState) === "CAN_NOT_PLAY" ? (openBlock(), createElementBlock("div", {
|
|
224
|
+
key: 1,
|
|
225
|
+
class: "w-full h-full flex flex-col justify-center items-center px-[34px]"
|
|
226
|
+
}, [
|
|
227
|
+
createCommentVNode(" \u91C7\u96C6\u7AD9\u6587\u4EF6 "),
|
|
228
|
+
unref(videoItem) && unref(videoItem).csFile === 1 && unref(videoItem).onlineState !== 1 ? (openBlock(), createElementBlock(
|
|
229
|
+
Fragment,
|
|
230
|
+
{ key: 0 },
|
|
231
|
+
[
|
|
232
|
+
createElementVNode("div", { class: "w-[54px] h-[54px] rounded-full border-[2px] border-dangerv2 flex justify-center items-center shadow-[0px_0px_10px_2px_var(--dangerv2)]" }, [
|
|
233
|
+
createElementVNode("div", { class: "w-[42px] h-[42px] rounded-full border-[1px] border-dashed border-dangerv2 flex justify-center items-center" }, [
|
|
234
|
+
createVNode(unref(AppIcon), {
|
|
235
|
+
"svg-name": "player-icon_brokLink",
|
|
236
|
+
class: "!w-[24px] !h-[24px] text-dangerv2"
|
|
237
|
+
})
|
|
238
|
+
])
|
|
239
|
+
]),
|
|
240
|
+
createElementVNode(
|
|
241
|
+
"span",
|
|
242
|
+
{ class: "text-xs text-auxiliary mt-4" },
|
|
243
|
+
toDisplayString(unref(t)("videoPlayer.fileLoadingFailed")),
|
|
244
|
+
1
|
|
245
|
+
/* TEXT */
|
|
246
|
+
),
|
|
247
|
+
createElementVNode(
|
|
248
|
+
"span",
|
|
249
|
+
{ class: "text-xs text-auxiliary" },
|
|
250
|
+
toDisplayString(_ctx.$t(
|
|
251
|
+
"pleaseCheckWhetherTheCollectionStationIsOnlineAndWhetherTheFileExists"
|
|
252
|
+
)),
|
|
253
|
+
1
|
|
254
|
+
/* TEXT */
|
|
255
|
+
)
|
|
256
|
+
],
|
|
257
|
+
64
|
|
258
|
+
/* STABLE_FRAGMENT */
|
|
259
|
+
)) : (openBlock(), createElementBlock(
|
|
260
|
+
Fragment,
|
|
261
|
+
{ key: 1 },
|
|
262
|
+
[
|
|
263
|
+
createCommentVNode(" \u666E\u901A\u6587\u4EF6 "),
|
|
264
|
+
createElementVNode("div", { class: "flex items-center justify-center text-auxiliary" }, [
|
|
265
|
+
createVNode(unref(AppIcon), {
|
|
266
|
+
"svg-name": "player-media-center-right-ripple",
|
|
267
|
+
className: "!w-[12px] !h-[12px]"
|
|
268
|
+
}),
|
|
269
|
+
createVNode(unref(AppIcon), {
|
|
270
|
+
"svg-name": "player-media-center-video",
|
|
271
|
+
className: "!w-[40px] !h-[40px] mx-1"
|
|
272
|
+
}),
|
|
273
|
+
createVNode(unref(AppIcon), {
|
|
274
|
+
"svg-name": "player-media-center-left-ripple",
|
|
275
|
+
className: "!w-[12px] !h-[12px]"
|
|
276
|
+
})
|
|
277
|
+
]),
|
|
278
|
+
createElementVNode(
|
|
279
|
+
"div",
|
|
280
|
+
{ class: "text-theme text-center mt-3 mb-[14px]" },
|
|
281
|
+
toDisplayString(unref(isCanNotPlayType) ? unref(t)("videoPlayer.vlcPlayerTip") : unref(t)("theVideoCannotBePlayed")),
|
|
282
|
+
1
|
|
283
|
+
/* TEXT */
|
|
284
|
+
),
|
|
285
|
+
unref(isCanNotPlayType) ? (openBlock(), createElementBlock("div", {
|
|
286
|
+
key: 0,
|
|
287
|
+
class: "flex justify-center"
|
|
288
|
+
}, [
|
|
289
|
+
unref(hasVLC) ? (openBlock(), createBlock(unref(AppButton), {
|
|
290
|
+
key: 0,
|
|
291
|
+
onClick: unref(openVLC)
|
|
292
|
+
}, {
|
|
293
|
+
default: withCtx(() => [
|
|
294
|
+
createTextVNode(
|
|
295
|
+
toDisplayString(unref(t)("videoPlayer.clickPlay")),
|
|
296
|
+
1
|
|
297
|
+
/* TEXT */
|
|
298
|
+
)
|
|
299
|
+
]),
|
|
300
|
+
_: 1
|
|
301
|
+
/* STABLE */
|
|
302
|
+
}, 8, ["onClick"])) : (openBlock(), createBlock(unref(AppButton), {
|
|
303
|
+
key: 1,
|
|
304
|
+
onClick: unref(downloadVLC)
|
|
305
|
+
}, {
|
|
306
|
+
default: withCtx(() => [
|
|
307
|
+
createTextVNode(
|
|
308
|
+
toDisplayString(unref(t)("videoPlayer.toDownloadVlc")),
|
|
309
|
+
1
|
|
310
|
+
/* TEXT */
|
|
311
|
+
)
|
|
312
|
+
]),
|
|
313
|
+
_: 1
|
|
314
|
+
/* STABLE */
|
|
315
|
+
}, 8, ["onClick"]))
|
|
316
|
+
])) : createCommentVNode("v-if", true)
|
|
317
|
+
],
|
|
318
|
+
64
|
|
319
|
+
/* STABLE_FRAGMENT */
|
|
320
|
+
)),
|
|
321
|
+
createCommentVNode(" \u5207\u6362\u89C6\u9891\u63A7\u4EF6 "),
|
|
322
|
+
__props.playList?.length > 1 ? (openBlock(), createElementBlock(
|
|
323
|
+
Fragment,
|
|
324
|
+
{ key: 2 },
|
|
325
|
+
[
|
|
326
|
+
createElementVNode("div", { class: "vlc-between-control left-0" }, [
|
|
327
|
+
createVNode(unref(AppTooltip), {
|
|
328
|
+
isAlways: "",
|
|
329
|
+
content: "\u67E5\u770B\u4E0A\u4E00\u6761\u89C6\u9891"
|
|
330
|
+
}, {
|
|
331
|
+
default: withCtx(() => [
|
|
332
|
+
createElementVNode("div", {
|
|
333
|
+
class: "w-[30px] h-[30px] bg-[#3D6286] flex items-center justify-center cursor-pointer",
|
|
334
|
+
onClick: unref(playPrevious)
|
|
335
|
+
}, [
|
|
336
|
+
createVNode(unref(AppIcon), {
|
|
337
|
+
"svg-name": "player--previous",
|
|
338
|
+
className: "!w-3 !h-3 text-main"
|
|
339
|
+
})
|
|
340
|
+
], 8, ["onClick"])
|
|
341
|
+
]),
|
|
342
|
+
_: 1
|
|
343
|
+
/* STABLE */
|
|
344
|
+
})
|
|
345
|
+
]),
|
|
346
|
+
createElementVNode("div", { class: "vlc-between-control right-0" }, [
|
|
347
|
+
createVNode(unref(AppTooltip), {
|
|
348
|
+
isAlways: "",
|
|
349
|
+
content: "\u67E5\u770B\u4E0B\u4E00\u6761\u89C6\u9891"
|
|
350
|
+
}, {
|
|
351
|
+
default: withCtx(() => [
|
|
352
|
+
createElementVNode("div", {
|
|
353
|
+
class: "w-[30px] h-[30px] bg-[#3D6286] flex items-center justify-center cursor-pointer",
|
|
354
|
+
onClick: unref(playNext)
|
|
355
|
+
}, [
|
|
356
|
+
createVNode(unref(AppIcon), {
|
|
357
|
+
"svg-name": "player--next",
|
|
358
|
+
className: "!w-3 !h-3 text-main"
|
|
359
|
+
})
|
|
360
|
+
], 8, ["onClick"])
|
|
361
|
+
]),
|
|
362
|
+
_: 1
|
|
363
|
+
/* STABLE */
|
|
364
|
+
})
|
|
365
|
+
])
|
|
366
|
+
],
|
|
367
|
+
64
|
|
368
|
+
/* STABLE_FRAGMENT */
|
|
369
|
+
)) : createCommentVNode("v-if", true)
|
|
370
|
+
])) : (openBlock(), createElementBlock(
|
|
371
|
+
Fragment,
|
|
372
|
+
{ key: 2 },
|
|
373
|
+
[
|
|
374
|
+
createCommentVNode(" \u53EF\u4EE5\u64AD\u653E "),
|
|
375
|
+
createElementVNode(
|
|
376
|
+
"video",
|
|
377
|
+
{
|
|
378
|
+
ref_key: "videoRef",
|
|
379
|
+
ref: videoRef,
|
|
380
|
+
style: normalizeStyle({ height: unref(videoHeight) })
|
|
381
|
+
},
|
|
382
|
+
[
|
|
383
|
+
createElementVNode("source", { type: "video/mp4" }),
|
|
384
|
+
createElementVNode("source", { type: "video/webm" }),
|
|
385
|
+
createElementVNode("source", { type: "video/ogg" }),
|
|
386
|
+
createTextVNode(
|
|
387
|
+
" " + toDisplayString(unref(t)("videoPlayer.yourBrowserDoesNotSupportHTMLVideoPlayback")),
|
|
388
|
+
1
|
|
389
|
+
/* TEXT */
|
|
390
|
+
)
|
|
391
|
+
],
|
|
392
|
+
4
|
|
393
|
+
/* STYLE */
|
|
394
|
+
),
|
|
395
|
+
createElementVNode("div", { class: "operator-box" }, [
|
|
396
|
+
createElementVNode("div", { class: "progress-box" }, [
|
|
397
|
+
withDirectives(createElementVNode("input", {
|
|
398
|
+
"onUpdate:modelValue": ($event) => isRef(progress) ? progress.value = $event : null,
|
|
399
|
+
type: "range",
|
|
400
|
+
max: "100",
|
|
401
|
+
style: normalizeStyle({
|
|
402
|
+
background: `linear-gradient(to right, rgba(var(--hy-theme)) ${unref(getPercent)(
|
|
403
|
+
unref(progress),
|
|
404
|
+
100
|
|
405
|
+
)}%, rgba(var(--hy-theme), 0.5) ${unref(getPercent)(unref(progress), 100)}% `
|
|
406
|
+
}),
|
|
407
|
+
onMousedown: ($event) => isDrop.value = true,
|
|
408
|
+
onMouseup: ($event) => unref(getNowWh)($event)
|
|
409
|
+
}, null, 44, ["onUpdate:modelValue", "onMousedown", "onMouseup"]), [
|
|
410
|
+
[vModelText, unref(progress)]
|
|
411
|
+
])
|
|
412
|
+
]),
|
|
413
|
+
createElementVNode("div", { class: "left-operator" }, [
|
|
414
|
+
createElementVNode(
|
|
415
|
+
"span",
|
|
416
|
+
{ class: "text-main" },
|
|
417
|
+
toDisplayString(unref(currentDuration)),
|
|
418
|
+
1
|
|
419
|
+
/* TEXT */
|
|
420
|
+
),
|
|
421
|
+
createTextVNode(" / "),
|
|
422
|
+
createElementVNode(
|
|
423
|
+
"span",
|
|
424
|
+
null,
|
|
425
|
+
toDisplayString(unref(totalDuration)),
|
|
426
|
+
1
|
|
427
|
+
/* TEXT */
|
|
428
|
+
)
|
|
429
|
+
]),
|
|
430
|
+
unref(isCanPlay) ? (openBlock(), createElementBlock(
|
|
431
|
+
"div",
|
|
432
|
+
{
|
|
433
|
+
key: 0,
|
|
434
|
+
class: normalizeClass(["center-operator", { "center-analyse": unref(isAnalyseType) }])
|
|
435
|
+
},
|
|
436
|
+
[
|
|
437
|
+
createElementVNode("div", { onClick: unref(playPrevious) }, [
|
|
438
|
+
createVNode(unref(AppIcon), {
|
|
439
|
+
"svg-name": unref(isAnalyseType) ? "player--interpretation-last" : "player-audio_previous-btn",
|
|
440
|
+
"class-name": "last-icon"
|
|
441
|
+
}, null, 8, ["svg-name"])
|
|
442
|
+
], 8, ["onClick"]),
|
|
443
|
+
unref(videoState) !== "PLAYING" ? (openBlock(), createElementBlock("div", {
|
|
444
|
+
key: 0,
|
|
445
|
+
onClick: ($event) => unref(playVideo)(unref(videoUrl))
|
|
446
|
+
}, [
|
|
447
|
+
createVNode(unref(AppIcon), { "svg-name": "player-audio_play-btn" })
|
|
448
|
+
], 8, ["onClick"])) : createCommentVNode("v-if", true),
|
|
449
|
+
unref(videoState) === "PLAYING" ? (openBlock(), createElementBlock("div", {
|
|
450
|
+
key: 1,
|
|
451
|
+
onClick: unref(pauseVideo)
|
|
452
|
+
}, [
|
|
453
|
+
createVNode(unref(AppIcon), { "svg-name": "player-audio_pause-btn" })
|
|
454
|
+
], 8, ["onClick"])) : createCommentVNode("v-if", true),
|
|
455
|
+
createElementVNode("div", { onClick: unref(playNext) }, [
|
|
456
|
+
createVNode(unref(AppIcon), {
|
|
457
|
+
"svg-name": unref(isAnalyseType) ? "player--interpretation-next" : "player-audio_next-btn",
|
|
458
|
+
"class-name": "next-icon"
|
|
459
|
+
}, null, 8, ["svg-name"])
|
|
460
|
+
], 8, ["onClick"])
|
|
461
|
+
],
|
|
462
|
+
2
|
|
463
|
+
/* CLASS */
|
|
464
|
+
)) : createCommentVNode("v-if", true),
|
|
465
|
+
createElementVNode("div", { class: "right-operator" }, [
|
|
466
|
+
createCommentVNode(" \u901F\u5EA6 "),
|
|
467
|
+
createVNode(unref(ElPopover), {
|
|
468
|
+
placement: "top",
|
|
469
|
+
trigger: "click",
|
|
470
|
+
appendToBody: false,
|
|
471
|
+
"popper-class": "popover-speed"
|
|
472
|
+
}, {
|
|
473
|
+
reference: withCtx(() => [
|
|
474
|
+
createElementVNode(
|
|
475
|
+
"div",
|
|
476
|
+
{ class: "speed-box" },
|
|
477
|
+
toDisplayString(unref(speedLabel)),
|
|
478
|
+
1
|
|
479
|
+
/* TEXT */
|
|
480
|
+
)
|
|
481
|
+
]),
|
|
482
|
+
default: withCtx(() => [
|
|
483
|
+
createElementVNode("div", { class: "flex items-center justify-center py-[10px]" }, [
|
|
484
|
+
createElementVNode("ul", { class: "speed-list" }, [
|
|
485
|
+
(openBlock(true), createElementBlock(
|
|
486
|
+
Fragment,
|
|
487
|
+
null,
|
|
488
|
+
renderList(unref(speedList), (item, index) => {
|
|
489
|
+
return openBlock(), createElementBlock("li", {
|
|
490
|
+
key: index,
|
|
491
|
+
class: normalizeClass(["clickBox", { selectBox: item.value === unref(speed) }]),
|
|
492
|
+
onClick: ($event) => unref(speedHandler)(item.value)
|
|
493
|
+
}, toDisplayString(item.label), 11, ["onClick"]);
|
|
494
|
+
}),
|
|
495
|
+
128
|
|
496
|
+
/* KEYED_FRAGMENT */
|
|
497
|
+
))
|
|
498
|
+
])
|
|
499
|
+
])
|
|
500
|
+
]),
|
|
501
|
+
_: 1
|
|
502
|
+
/* STABLE */
|
|
503
|
+
}),
|
|
504
|
+
createCommentVNode(" \u58F0\u97F3 "),
|
|
505
|
+
createVNode(unref(ElPopover), {
|
|
506
|
+
placement: "top",
|
|
507
|
+
appendToBody: false,
|
|
508
|
+
trigger: "click",
|
|
509
|
+
"popper-class": "popover-volume-slider"
|
|
510
|
+
}, {
|
|
511
|
+
reference: withCtx(() => [
|
|
512
|
+
createElementVNode("div", { class: "flex items-center justify-center" }, [
|
|
513
|
+
createVNode(unref(AppTooltip), {
|
|
514
|
+
isAlways: "",
|
|
515
|
+
content: unref(t)("videoPlayer.adjustPlaybackVolume")
|
|
516
|
+
}, {
|
|
517
|
+
default: withCtx(() => [
|
|
518
|
+
createVNode(unref(AppIcon), {
|
|
519
|
+
"svg-name": "player-audio_volumn",
|
|
520
|
+
"class-name": "volume-icon"
|
|
521
|
+
})
|
|
522
|
+
]),
|
|
523
|
+
_: 1
|
|
524
|
+
/* STABLE */
|
|
525
|
+
}, 8, ["content"])
|
|
526
|
+
])
|
|
527
|
+
]),
|
|
528
|
+
default: withCtx(() => [
|
|
529
|
+
createElementVNode("div", { class: "flex items-center justify-center" }, [
|
|
530
|
+
createVNode(unref(ElSlider), {
|
|
531
|
+
modelValue: unref(volumeValue),
|
|
532
|
+
"onUpdate:modelValue": ($event) => isRef(volumeValue) ? volumeValue.value = $event : null,
|
|
533
|
+
vertical: "",
|
|
534
|
+
height: "105px",
|
|
535
|
+
onInput: ($event) => unref(changeVolume)($event)
|
|
536
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "onInput"])
|
|
537
|
+
])
|
|
538
|
+
]),
|
|
539
|
+
_: 1
|
|
540
|
+
/* STABLE */
|
|
541
|
+
}),
|
|
542
|
+
createCommentVNode(" \u653E\u5927 "),
|
|
543
|
+
__props.showFullScreen ? (openBlock(), createBlock(unref(AppTooltip), {
|
|
544
|
+
key: 0,
|
|
545
|
+
isAlways: "",
|
|
546
|
+
content: unref(t)("videoPlayer.fullScreenSwitch")
|
|
547
|
+
}, {
|
|
548
|
+
default: withCtx(() => [
|
|
549
|
+
createVNode(unref(AppIcon), {
|
|
550
|
+
"svg-name": unref(isFullScreen) ? "player-audio_reduce" : "player-audio_enlarge",
|
|
551
|
+
onClick: unref(onFullScreenHandler)
|
|
552
|
+
}, null, 8, ["svg-name", "onClick"])
|
|
553
|
+
]),
|
|
554
|
+
_: 1
|
|
555
|
+
/* STABLE */
|
|
556
|
+
}, 8, ["content"])) : createCommentVNode("v-if", true),
|
|
557
|
+
createCommentVNode(" \u6536\u8D77/\u5C55\u5F00 "),
|
|
558
|
+
!unref(isFullScreen) && __props.showShrink ? (openBlock(), createBlock(unref(AppTooltip), {
|
|
559
|
+
key: 1,
|
|
560
|
+
isAlways: "",
|
|
561
|
+
content: unref(isExpand) ? "\u6536\u8D77" : "\u5C55\u5F00"
|
|
562
|
+
}, {
|
|
563
|
+
default: withCtx(() => [
|
|
564
|
+
createVNode(unref(AppIcon), {
|
|
565
|
+
"svg-name": unref(isExpand) ? "player--interpretation-foldup" : "player--interpretation-expand",
|
|
566
|
+
onClick: unref(onSwitchShrink)
|
|
567
|
+
}, null, 8, ["svg-name", "onClick"])
|
|
568
|
+
]),
|
|
569
|
+
_: 1
|
|
570
|
+
/* STABLE */
|
|
571
|
+
}, 8, ["content"])) : createCommentVNode("v-if", true)
|
|
572
|
+
])
|
|
573
|
+
])
|
|
574
|
+
],
|
|
575
|
+
64
|
|
576
|
+
/* STABLE_FRAGMENT */
|
|
577
|
+
)),
|
|
578
|
+
createCommentVNode(" \u89C6\u9891\u989D\u5916\u529F\u80FD "),
|
|
579
|
+
(__props.showDownloadFiles || __props.showPlayRules) && unref(isExpand) ? (openBlock(), createElementBlock(
|
|
580
|
+
"div",
|
|
581
|
+
{
|
|
582
|
+
key: 3,
|
|
583
|
+
class: normalizeClass(["float-operator-item", {
|
|
584
|
+
"!right-[43px]": unref(videoState) === "CAN_NOT_PLAY" && __props.playList?.length > 1
|
|
585
|
+
}])
|
|
586
|
+
},
|
|
587
|
+
[
|
|
588
|
+
createCommentVNode(" \u4E0B\u8F7D "),
|
|
589
|
+
__props.showDownloadFiles ? (openBlock(), createBlock(unref(AppTooltip), {
|
|
590
|
+
key: 0,
|
|
591
|
+
isAlways: "",
|
|
592
|
+
content: unref(t)("videoPlayer.downloadFile")
|
|
593
|
+
}, {
|
|
594
|
+
default: withCtx(() => [
|
|
595
|
+
createVNode(unref(AppIcon), {
|
|
596
|
+
"svg-name": "player-audio_down-btn",
|
|
597
|
+
onClick: unref(onDownloadHandler)
|
|
598
|
+
}, null, 8, ["onClick"])
|
|
599
|
+
]),
|
|
600
|
+
_: 1
|
|
601
|
+
/* STABLE */
|
|
602
|
+
}, 8, ["content"])) : createCommentVNode("v-if", true),
|
|
603
|
+
createCommentVNode(" \u64AD\u653E\u89C4\u5219 "),
|
|
604
|
+
__props.showPlayRules && unref(videoState) !== "CAN_NOT_PLAY" ? (openBlock(true), createElementBlock(
|
|
605
|
+
Fragment,
|
|
606
|
+
{ key: 1 },
|
|
607
|
+
renderList(unref(playRulesList), (item, index) => {
|
|
608
|
+
return openBlock(), createElementBlock(
|
|
609
|
+
Fragment,
|
|
610
|
+
{ key: index },
|
|
611
|
+
[
|
|
612
|
+
unref(playRules) === item.value ? (openBlock(), createBlock(unref(AppTooltip), {
|
|
613
|
+
key: 0,
|
|
614
|
+
isAlways: "",
|
|
615
|
+
content: item.label
|
|
616
|
+
}, {
|
|
617
|
+
default: withCtx(() => [
|
|
618
|
+
createVNode(unref(AppIcon), {
|
|
619
|
+
"svg-name": item.svgName,
|
|
620
|
+
onClick: ($event) => unref(playRulesHandler)(item.value)
|
|
621
|
+
}, null, 8, ["svg-name", "onClick"])
|
|
622
|
+
]),
|
|
623
|
+
_: 2
|
|
624
|
+
/* DYNAMIC */
|
|
625
|
+
}, 1032, ["content"])) : createCommentVNode("v-if", true)
|
|
626
|
+
],
|
|
627
|
+
64
|
|
628
|
+
/* STABLE_FRAGMENT */
|
|
629
|
+
);
|
|
630
|
+
}),
|
|
631
|
+
128
|
|
632
|
+
/* KEYED_FRAGMENT */
|
|
633
|
+
)) : createCommentVNode("v-if", true),
|
|
634
|
+
renderSlot(_ctx.$slots, "pight-control-ranel")
|
|
635
|
+
],
|
|
636
|
+
2
|
|
637
|
+
/* CLASS */
|
|
638
|
+
)) : createCommentVNode("v-if", true)
|
|
639
|
+
],
|
|
640
|
+
2
|
|
641
|
+
/* CLASS */
|
|
642
|
+
);
|
|
643
|
+
};
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { openBlock, createElementBlock, normalizeStyle, createElementVNode } from 'vue';
|
|
2
|
+
|
|
3
|
+
import "../style/mediaLoading.scss";
|
|
4
|
+
|
|
5
|
+
const _sfc_main = {
|
|
6
|
+
__name: "mediaLoading",
|
|
7
|
+
props: {
|
|
8
|
+
width: {
|
|
9
|
+
type: Number,
|
|
10
|
+
default: 60
|
|
11
|
+
},
|
|
12
|
+
height: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: 60
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
return (_ctx, _cache) => {
|
|
19
|
+
return openBlock(), createElementBlock(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
class: "tech-loader",
|
|
23
|
+
style: normalizeStyle({ width: __props.width + "px", height: __props.height + "px" })
|
|
24
|
+
},
|
|
25
|
+
[
|
|
26
|
+
createElementVNode("div", { class: "tech-center-dot" })
|
|
27
|
+
],
|
|
28
|
+
4
|
|
29
|
+
/* STYLE */
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { _sfc_main as default };
|