vue-video-plus 1.0.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 +23 -0
- package/dist/favicon.ico +0 -0
- package/dist/style.css +1 -0
- package/dist/vueVideo-es.js +830 -0
- package/dist/vueVideo-umd.js +1 -0
- package/package.json +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# vueVideo++
|
|
2
|
+
|
|
3
|
+
使用 Vue3 构建的多功能视频播放器
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
npm install vueVideo
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
npm i vue3-video-play --save
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
pnpm 安装
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
pnpm i vue3-video-play --save
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
yarn 安装
|
|
20
|
+
|
|
21
|
+
```javascript
|
|
22
|
+
yarn add vue3-video-play --save
|
|
23
|
+
```
|
package/dist/favicon.ico
ADDED
|
Binary file
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import"//at.alicdn.com/t/c/font_4726673_pdcujlcxe7l.css";.icon[data-v-e77fda1f]{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}.rotating[data-v-e77fda1f]{animation:rotating-e77fda1f 2s linear infinite}@keyframes rotating-e77fda1f{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.cc[data-v-e77fda1f]{background-color:red}html[data-v-139d9272],body[data-v-139d9272],div[data-v-139d9272],span[data-v-139d9272],applet[data-v-139d9272],object[data-v-139d9272],iframe[data-v-139d9272],h1[data-v-139d9272],h2[data-v-139d9272],h3[data-v-139d9272],h4[data-v-139d9272],h5[data-v-139d9272],h6[data-v-139d9272],p[data-v-139d9272],blockquote[data-v-139d9272],pre[data-v-139d9272],a[data-v-139d9272],abbr[data-v-139d9272],acronym[data-v-139d9272],address[data-v-139d9272],big[data-v-139d9272],cite[data-v-139d9272],code[data-v-139d9272],del[data-v-139d9272],dfn[data-v-139d9272],em[data-v-139d9272],img[data-v-139d9272],ins[data-v-139d9272],kbd[data-v-139d9272],q[data-v-139d9272],s[data-v-139d9272],samp[data-v-139d9272],small[data-v-139d9272],strike[data-v-139d9272],strong[data-v-139d9272],sub[data-v-139d9272],sup[data-v-139d9272],tt[data-v-139d9272],var[data-v-139d9272],b[data-v-139d9272],u[data-v-139d9272],i[data-v-139d9272],center[data-v-139d9272],dl[data-v-139d9272],dt[data-v-139d9272],dd[data-v-139d9272],ol[data-v-139d9272],ul[data-v-139d9272],li[data-v-139d9272],fieldset[data-v-139d9272],form[data-v-139d9272],label[data-v-139d9272],legend[data-v-139d9272],table[data-v-139d9272],caption[data-v-139d9272],tbody[data-v-139d9272],tfoot[data-v-139d9272],thead[data-v-139d9272],tr[data-v-139d9272],th[data-v-139d9272],td[data-v-139d9272],article[data-v-139d9272],aside[data-v-139d9272],canvas[data-v-139d9272],details[data-v-139d9272],embed[data-v-139d9272],figure[data-v-139d9272],figcaption[data-v-139d9272],footer[data-v-139d9272],header[data-v-139d9272],hgroup[data-v-139d9272],menu[data-v-139d9272],nav[data-v-139d9272],output[data-v-139d9272],ruby[data-v-139d9272],section[data-v-139d9272],summary[data-v-139d9272],time[data-v-139d9272],mark[data-v-139d9272],audio[data-v-139d9272],video[data-v-139d9272]{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article[data-v-139d9272],aside[data-v-139d9272],details[data-v-139d9272],figcaption[data-v-139d9272],figure[data-v-139d9272],footer[data-v-139d9272],header[data-v-139d9272],hgroup[data-v-139d9272],menu[data-v-139d9272],nav[data-v-139d9272],section[data-v-139d9272]{display:block}body[data-v-139d9272]{line-height:1}ol[data-v-139d9272],ul[data-v-139d9272]{list-style:none}blockquote[data-v-139d9272],q[data-v-139d9272]{quotes:none}blockquote[data-v-139d9272]:before,blockquote[data-v-139d9272]:after,q[data-v-139d9272]:before,q[data-v-139d9272]:after{content:"";content:none}table[data-v-139d9272]{border-collapse:collapse;border-spacing:0}textarea[data-v-139d9272]{font-family:inherit}.iconfont[data-v-139d9272]{display:inline-block}.d-flex-x[data-v-139d9272],.d-flex-y[data-v-139d9272],.d-flex-center[data-v-139d9272]{display:flex}.d-flex-x[data-v-139d9272]{align-items:center}.d-flex-y[data-v-139d9272]{justify-content:center}.d-flex-center[data-v-139d9272]{justify-content:center;align-items:center}.mr5[data-v-139d9272]{margin-right:5px}.mr10[data-v-139d9272]{margin-right:10px}.ml5[data-v-139d9272]{margin-left:5px}.ml10[data-v-139d9272]{margin-left:10px}.d-pointer[data-v-139d9272]{cursor:pointer}.rotating[data-v-139d9272]{animation:rotating-139d9272 2s linear infinite}@keyframes rotating-139d9272{to{-webkit-transform:rotate(360deg)}}.d-fade-in-enter-active[data-v-139d9272],.d-fade-in-leave-active[data-v-139d9272]{transition:.5s}.d-fade-in-enter-from[data-v-139d9272],.d-fade-in-leave-to[data-v-139d9272]{opacity:0}.scale-out-enter-active[data-v-139d9272],.scale-out-leave-active[data-v-139d9272]{transition:.3s}.scale-out-leave-to[data-v-139d9272]{transform:scale(1.6);opacity:0}.rotateHover[data-v-139d9272]{transition:.2s}.rotateHover[data-v-139d9272]:hover{transform:rotate(90deg)}.scaleHover[data-v-139d9272]{transition:.2s}.scaleHover[data-v-139d9272]:hover{transform:scale(1.2)}.f50[data-v-139d9272]{font-size:50px}.f24[data-v-139d9272]{font-size:24px}.loading[data-v-139d9272]{position:absolute;left:0;right:0;bottom:0;top:0;display:flex;align-items:center;justify-content:center;background:#0000004d;z-index:2;color:#efefef;text-align:center;font-size:13px}.progress[data-v-87b818ab]{position:relative}.progress .progress__runway[data-v-87b818ab]{width:100%;height:var(--f07c1458);background-color:#333;position:relative;cursor:pointer;vertical-align:middle}.progress .progress__runway .progress__cursor[data-v-87b818ab],.progress .progress__runway .progress__preload[data-v-87b818ab],.progress .progress__runway .progress__bar[data-v-87b818ab]{position:absolute;top:0;left:0;height:100%}.progress .progress__runway .progress__cursor[data-v-87b818ab]{display:none;z-index:1;width:1px;background-color:#fff;pointer-events:none}.progress .progress__runway .progress__cursor .progress__tips[data-v-87b818ab]{pointer-events:none;color:#fff;position:absolute;white-space:nowrap;z-index:2;bottom:14px;left:50%;padding:4px;box-sizing:border-box;display:block;font-size:12px;background:#0009;border-radius:3px;transform:translate(-50%)}.progress .progress__runway:hover .progress__cursor[data-v-87b818ab]{display:block}.progress .progress__runway .progress__preload[data-v-87b818ab]{background:#717171}.progress .progress__runway .progress__bar[data-v-87b818ab]{background:linear-gradient(to right,#52a0fd,#00e2fa 80%,#00e2fa)}.progress .progress__runway .progress__bar[data-v-87b818ab]:before{display:block;content:"";position:absolute;right:-6px;top:50%;width:16px;height:16px;transition:.2s;transform:translateY(-50%) scale(1);border-radius:50%;background:#fff}.progress.is-vertical[data-v-87b818ab]{height:100%;display:inline-block}.progress.is-vertical .progress__runway[data-v-87b818ab]{position:relative;height:100%;width:var(--f07c1458);margin:0 6px}.progress.is-vertical .progress__runway .progress__preload[data-v-87b818ab],.progress.is-vertical .progress__runway .progress__bar[data-v-87b818ab],.progress.is-vertical .progress__runway .progress__cursor[data-v-87b818ab]{bottom:0;top:auto;width:100%}.progress.is-vertical .progress__runway .progress__cursor[data-v-87b818ab]{height:1px}.progress.is-vertical .progress__runway .progress__bar[data-v-87b818ab]:before{top:-6px;left:50%;width:12px;height:12px;transform:translate(-50%) scale(1)}.switch[data-v-059db622]{position:relative;height:18px;width:var(--cb3ceaa8);background:#757575;border-radius:10px;display:inline-flex;align-items:center;vertical-align:middle}.switch .switch_input[data-v-059db622]{position:relative;z-index:1;margin:0;width:100%;height:100%;opacity:0}.switch .switch_action[data-v-059db622]{position:absolute;transition:.2s;left:2px;top:2px;z-index:0;height:14px;width:14px;background:#fff;border-radius:50%}.switch.is-checked[data-v-059db622]{background-color:var(--1150cc63)}.switch.is-checked .switch_action[data-v-059db622]{background:#fff;left:24px}html[data-v-02a06568],body[data-v-02a06568],div[data-v-02a06568],span[data-v-02a06568],applet[data-v-02a06568],object[data-v-02a06568],iframe[data-v-02a06568],h1[data-v-02a06568],h2[data-v-02a06568],h3[data-v-02a06568],h4[data-v-02a06568],h5[data-v-02a06568],h6[data-v-02a06568],p[data-v-02a06568],blockquote[data-v-02a06568],pre[data-v-02a06568],a[data-v-02a06568],abbr[data-v-02a06568],acronym[data-v-02a06568],address[data-v-02a06568],big[data-v-02a06568],cite[data-v-02a06568],code[data-v-02a06568],del[data-v-02a06568],dfn[data-v-02a06568],em[data-v-02a06568],img[data-v-02a06568],ins[data-v-02a06568],kbd[data-v-02a06568],q[data-v-02a06568],s[data-v-02a06568],samp[data-v-02a06568],small[data-v-02a06568],strike[data-v-02a06568],strong[data-v-02a06568],sub[data-v-02a06568],sup[data-v-02a06568],tt[data-v-02a06568],var[data-v-02a06568],b[data-v-02a06568],u[data-v-02a06568],i[data-v-02a06568],center[data-v-02a06568],dl[data-v-02a06568],dt[data-v-02a06568],dd[data-v-02a06568],ol[data-v-02a06568],ul[data-v-02a06568],li[data-v-02a06568],fieldset[data-v-02a06568],form[data-v-02a06568],label[data-v-02a06568],legend[data-v-02a06568],table[data-v-02a06568],caption[data-v-02a06568],tbody[data-v-02a06568],tfoot[data-v-02a06568],thead[data-v-02a06568],tr[data-v-02a06568],th[data-v-02a06568],td[data-v-02a06568],article[data-v-02a06568],aside[data-v-02a06568],canvas[data-v-02a06568],details[data-v-02a06568],embed[data-v-02a06568],figure[data-v-02a06568],figcaption[data-v-02a06568],footer[data-v-02a06568],header[data-v-02a06568],hgroup[data-v-02a06568],menu[data-v-02a06568],nav[data-v-02a06568],output[data-v-02a06568],ruby[data-v-02a06568],section[data-v-02a06568],summary[data-v-02a06568],time[data-v-02a06568],mark[data-v-02a06568],audio[data-v-02a06568],video[data-v-02a06568]{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article[data-v-02a06568],aside[data-v-02a06568],details[data-v-02a06568],figcaption[data-v-02a06568],figure[data-v-02a06568],footer[data-v-02a06568],header[data-v-02a06568],hgroup[data-v-02a06568],menu[data-v-02a06568],nav[data-v-02a06568],section[data-v-02a06568]{display:block}body[data-v-02a06568]{line-height:1}ol[data-v-02a06568],ul[data-v-02a06568]{list-style:none}blockquote[data-v-02a06568],q[data-v-02a06568]{quotes:none}blockquote[data-v-02a06568]:before,blockquote[data-v-02a06568]:after,q[data-v-02a06568]:before,q[data-v-02a06568]:after{content:"";content:none}table[data-v-02a06568]{border-collapse:collapse;border-spacing:0}textarea[data-v-02a06568]{font-family:inherit}.d-fade-in-enter-active[data-v-02a06568],.d-fade-in-leave-active[data-v-02a06568]{transition:.5s}.d-fade-in-enter-from[data-v-02a06568],.d-fade-in-leave-to[data-v-02a06568]{opacity:0}.scale-out-enter-active[data-v-02a06568],.scale-out-leave-active[data-v-02a06568]{transition:.3s}.scale-out-leave-to[data-v-02a06568]{transform:scale(1.6);opacity:0}.rotateHover[data-v-02a06568]{transition:.2s}.rotateHover[data-v-02a06568]:hover{transform:rotate(90deg)}.scaleHover[data-v-02a06568]{transition:.2s}.scaleHover[data-v-02a06568]:hover{transform:scale(1.2)}.rotating[data-v-02a06568]{animation:rotating-02a06568 2s linear infinite}@keyframes rotating-02a06568{to{-webkit-transform:rotate(360deg)}}.iconfont[data-v-02a06568]{display:inline-block}.d-flex-x[data-v-02a06568],.d-flex-y[data-v-02a06568],.d-flex-center[data-v-02a06568]{display:flex}.d-flex-x[data-v-02a06568]{align-items:center}.d-flex-y[data-v-02a06568]{justify-content:center}.d-flex-center[data-v-02a06568]{justify-content:center;align-items:center}.mr5[data-v-02a06568]{margin-right:5px}.mr10[data-v-02a06568]{margin-right:10px}.ml5[data-v-02a06568]{margin-left:5px}.ml10[data-v-02a06568]{margin-left:10px}.d-pointer[data-v-02a06568]{cursor:pointer}.player-wrap[data-v-02a06568]{--primary-color: var(--2011da3e);width:var(--224f4e1e);height:var(--0dcb7bcf)}.player-wrap[data-v-02a06568]{position:relative;overflow:hidden;background-color:#000}.player-wrap.web-full-screen[data-v-02a06568]{z-index:9999999;position:fixed;left:0;top:0;width:100vw!important;height:100vh!important}.player-wrap .Player[data-v-02a06568]{border:1px soid red;position:relative;z-index:1;width:100%;height:100%}.player-wrap .Player .d-player-video-poster[data-v-02a06568]{position:absolute;height:100%;width:100%;top:0;left:0}.player-wrap .Player .d-player-video-poster img[data-v-02a06568]{display:block;width:100%;height:100%;object-fit:cover}.player-wrap .Player .Player-video[data-v-02a06568]{width:100%;height:100%;transition:.2s}.player-wrap .Player .Player-video.video-mirror[data-v-02a06568]{transform:rotateY(180deg)}.player-wrap .player-control[data-v-02a06568]{transition:.1s;transform:translateY(40px);position:absolute;z-index:2;left:0;bottom:0;height:50px;width:100%;color:#fff}.player-wrap .player-control .control-progress[data-v-02a06568]{width:100%;position:relative;height:10px;cursor:pointer}.player-wrap .player-control .control-progress .progress-bar[data-v-02a06568]{position:absolute;left:0;right:0;bottom:0;width:100%;transition:height .1s;height:3px;z-index:1}.player-wrap .player-control .control-progress .progress-bar[data-v-02a06568] .progress__runway{transition:height .1s;height:100%}.player-wrap .player-control .control-progress .progress-bar[data-v-02a06568] .progress__runway .progress__bar:before{transform:translateY(-50%) scale(0)}.player-wrap .player-control .control-progress:hover .progress-bar[data-v-02a06568]{height:100%}.player-wrap .player-control .control-progress:hover .progress-bar[data-v-02a06568] .progress__bar:before{transform:translateY(-50%) scale(1)!important}.player-wrap .player-control .control-tool[data-v-02a06568]{position:absolute;padding:0 10px;background:#000c;display:flex;justify-content:space-between;align-items:center;top:10px;left:0;bottom:0;width:100%;box-sizing:border-box}.player-wrap .player-control .control-tool .tool-bar[data-v-02a06568]{display:flex;height:100%}.player-wrap .player-control .control-tool .tool-bar .tool-item[data-v-02a06568]{position:relative;height:100%;cursor:pointer;text-align:center;padding:0 8px;display:flex;align-items:center;font-size:13px}.player-wrap .player-control .control-tool .tool-bar .tool-item .tool-item-main[data-v-02a06568]{position:absolute;white-space:nowrap;z-index:2;bottom:98%;left:50%;padding:6px 16px;box-sizing:border-box;display:none;background:#000000f2;border-radius:5px;transform:translate(-50%)}.player-wrap .player-control .control-tool .tool-bar .tool-item:hover .tool-item-main[data-v-02a06568]{display:flex}.player-wrap .player-control .control-tool .tool-time[data-v-02a06568]{font-size:12px;color:#fff;font-weight:300}.player-wrap .player-control .control-tool .tool-time .total-time[data-v-02a06568]{color:#fffc}.player-wrap .player-control .control-tool .volume-box[data-v-02a06568]{height:160px;width:50px;display:flex;align-items:center;justify-content:center}.player-wrap .player-control .control-tool .volume-box .volume-main[data-v-02a06568]{height:90%;display:flex;width:60px;flex-direction:column;align-items:center}.player-wrap .player-control .control-tool .volume-box .volume-main .volume-text-size[data-v-02a06568]{margin-bottom:10px;font-size:12px;font-weight:400}.player-wrap .player-control .control-tool .volume-box .volume-main.is-muted[data-v-02a06568] .progress__bar{height:0!important}.player-wrap .player-control .control-tool .speed-main[data-v-02a06568]{padding:0 10px}.player-wrap .player-control .control-tool .speed-main li[data-v-02a06568]{cursor:pointer;line-height:34px;font-size:12px;color:#fff}.player-wrap .player-control .control-tool .speed-main li[data-v-02a06568]:hover{opacity:.8}.player-wrap .player-control .control-tool .speed-main li.speed-active[data-v-02a06568]{color:rgba(var(--primary-color),1);font-weight:700}.player-wrap.player-wrap-hover .player-control[data-v-02a06568]{transform:translateY(0)}.player-state[data-v-02a06568],.player-input[data-v-02a06568]{position:absolute;left:0;top:0;right:0;bottom:40px;display:flex;justify-content:center;align-items:center;overflow:hidden;z-index:1}.player-input[data-v-02a06568]{width:100%;border:none;opacity:0;cursor:default}.play-btn[data-v-02a06568]{width:90px;height:90px;color:#fff;display:flex;align-items:center;justify-content:center;background-color:#000000b3;border-radius:50%}.d-player-lightoff[data-v-02a06568]{position:fixed;left:0;top:0;width:100vw;height:100vh;background-color:#000000e6}.is-lightoff[data-v-02a06568]{z-index:999998}@keyframes showAni-02a06568{0%{display:none}50%{display:block}to{display:none}}.showH[data-v-02a06568]:hover{-webkit-animation:showAni-02a06568 .5s;animation:showAni-02a06568 .5s}@keyframes biggerAni-02a06568{0%{transform:scale(1);opacity:.8}50%{transform:scale(1.2);opacity:1}to{transform:scale(1);opacity:.8}}.biggerAni[data-v-02a06568]:hover{-webkit-animation:biggerAni-02a06568 .5s;animation:biggerAni-02a06568 .5s}@keyframes biggerScaleAni-02a06568{0%{transform:scale(1);opacity:.8}50%{transform:scale(1.2);opacity:1}to{transform:scale(1);opacity:.8;transform:rotate(90deg)}}.biggerScaleAni[data-v-02a06568]:hover{-webkit-animation:biggerScaleAni-02a06568 .5s;animation:biggerScaleAni-02a06568 .5s}.icon[data-v-7d306b2a]{display:inline-block;cursor:pointer;overflow:hidden}
|
|
@@ -0,0 +1,830 @@
|
|
|
1
|
+
import { openBlock as g, createElementBlock as f, createStaticVNode as ne, defineComponent as q, normalizeClass as M, normalizeStyle as V, createElementVNode as o, getCurrentInstance as ae, computed as H, withDirectives as $, toDisplayString as L, createCommentVNode as D, createVNode as y, vShow as F, createTextVNode as A, useCssVars as j, ref as O, reactive as oe, withModifiers as ie, nextTick as le, unref as J, watch as se, onMounted as re, resolveComponent as K, mergeProps as ce, Transition as ue, withCtx as de, Fragment as pe, renderList as me } from "vue";
|
|
2
|
+
import "//at.alicdn.com/t/c/font_4726673_rs88m9qadnr.js";
|
|
3
|
+
const ge = "data:image/svg+xml,%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20%3e%3cg%20id='pc'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='默认态-全集/暂停态'%20transform='translate(-1065.000000,%20-614.000000)'%20%3e%3cg%20id='编组-3备份'%20transform='translate(-3.166993,%200.000000)'%3e%3cg%20id='编组-9'%20transform='translate(774.166993,%20614.000000)'%3e%3cg%20id='编组-3'%20transform='translate(132.000000,%200.000000)'%3e%3cg%20id='网页全屏'%20transform='translate(162.000000,%200.000000)'%3e%3crect%20id='矩形'%20fill='%23D8D8D8'%20opacity='0'%20x='0'%20y='0'%20width='24'%20height='24'%20%3e%3c/rect%3e%3cg%20id='编组-16'%20transform='translate(1.900000,%201.900000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%20%3e%3cpath%20d='M14.6997998,-1.84741111e-13%20C17.7374765,-1.84741111e-13%2020.2,2.46252353%2020.2,5.50020024%20L20.2,5.50020024%20L20.2,14.6997998%20C20.2,17.7374765%2017.7374765,20.2%2014.6997998,20.2%20L14.6997998,20.2%20L5.50020024,20.2%20C2.46252353,20.2%204.26325641e-14,17.7374765%204.26325641e-14,14.6997998%20L4.26325641e-14,14.6997998%20L4.26325641e-14,5.50020024%20C4.26325641e-14,2.46252353%202.46252353,-1.84741111e-13%205.50020024,-1.84741111e-13%20L5.50020024,-1.84741111e-13%20Z%20M14.6997998,2.2%20L5.50020024,2.2%20C3.67754998,2.2%202.2,3.67754998%202.2,5.50020024%20L2.2,5.50020024%20L2.2,14.6997998%20C2.2,16.52245%203.67754998,18%205.50020024,18%20L5.50020024,18%20L14.6997998,18%20C16.52245,18%2018,16.52245%2018,14.6997998%20L18,14.6997998%20L18,5.50020024%20C18,3.67754998%2016.52245,2.2%2014.6997998,2.2%20L14.6997998,2.2%20Z%20M15.9422599,11.7135175%20L15.9422599,14.9311645%20C15.9422599,15.4981769%2015.5132492,15.9649884%2014.962117,16.0247099%20L14.8422599,16.0311645%20L11.6246128,16.0311645%20L11.6246128,13.8311645%20L13.7428727,13.831682%20L13.7422599,11.7135175%20L15.9422599,11.7135175%20Z%20M8.53049519,4.30175278%20L8.53049519,6.50175278%20L6.412,6.501%20L6.41284813,8.61939984%20L4.21284813,8.61939984%20L4.21284813,5.40175278%20C4.21284813,4.83474044%204.64185883,4.36792892%205.19299101,4.30820743%20L5.31284813,4.30175278%20L8.53049519,4.30175278%20Z'%20id='形状结合'%20%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e", I = (t, a) => {
|
|
4
|
+
const c = t.__vccOpts || t;
|
|
5
|
+
for (const [n, e] of a)
|
|
6
|
+
c[n] = e;
|
|
7
|
+
return c;
|
|
8
|
+
}, fe = {}, ve = {
|
|
9
|
+
id: "mySvg",
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11
|
+
viewBox: "0 0 88 88",
|
|
12
|
+
width: "22",
|
|
13
|
+
height: "22",
|
|
14
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
15
|
+
style: { width: "22", height: "22", transform: "translate3d(0px, 0px, 0px)" }
|
|
16
|
+
};
|
|
17
|
+
function ye(t, a) {
|
|
18
|
+
return g(), f("div", null, [
|
|
19
|
+
(g(), f("svg", ve, a[0] || (a[0] = [
|
|
20
|
+
ne('<defs><clipPath id="__lottie_element_139"><rect width="76" height="76" x="0" y="0"></rect></clipPath></defs><g clip-path="url(#__lottie_element_139)"><g transform="matrix(1,0,0,1,41,41)" opacity="1" style="display:block;"><g opacity="1" transform="matrix(1,0,0,1,0,0)"><path fill="rgb(255,255,255)" fill-opacity="1" d=" M26,-28 C30.420000076293945,-28 34,-24.420000076293945 34,-20 C34,-20 34,4 34,4 C34,4 26,4 26,4 C26,4 26,-16.799999237060547 26,-16.799999237060547 C26,-18.56999969482422 24.56999969482422,-20 22.799999237060547,-20 C22.799999237060547,-20 -22.799999237060547,-20 -22.799999237060547,-20 C-24.510000228881836,-20 -25.899999618530273,-18.65999984741211 -25.989999771118164,-16.979999542236328 C-25.989999771118164,-16.979999542236328 -26,-16.799999237060547 -26,-16.799999237060547 C-26,-16.799999237060547 -26,16.799999237060547 -26,16.799999237060547 C-26,18.510000228881836 -24.65999984741211,19.899999618530273 -22.979999542236328,19.989999771118164 C-22.979999542236328,19.989999771118164 -22.799999237060547,20 -22.799999237060547,20 C-22.799999237060547,20 2,20 2,20 C2,20 2,28 2,28 C2,28 -26,28 -26,28 C-30.420000076293945,28 -34,24.420000076293945 -34,20 C-34,20 -34,-20 -34,-20 C-34,-24.420000076293945 -30.420000076293945,-28 -26,-28 C-26,-28 26,-28 26,-28z"></path></g></g><g transform="matrix(1,0,0,1,67,65)" opacity="1" style="display:block;"><g opacity="1" transform="matrix(1,0,0,1,0,0)"><path fill="rgb(255,255,255)" fill-opacity="1" d=" M16,-8 C16,-8 16,8 16,8 C16,10.208999633789062 14.208999633789062,12 12,12 C12,12 -12,12 -12,12 C-14.208999633789062,12 -16,10.208999633789062 -16,8 C-16,8 -16,-8 -16,-8 C-16,-10.208999633789062 -14.208999633789062,-12 -12,-12 C-12,-12 12,-12 12,-12 C14.208999633789062,-12 16,-10.208999633789062 16,-8z"></path></g></g><g id="myg" style="" transform="matrix(1,0,0,1,30.496000289916992,33.74300003051758)" opacity="0.09982599999383127"><g pointer-events="none" opacity="1" transform="matrix(1,0,0,1,0,0)"><path fill="rgb(255,255,255)" fill-opacity="1" d=" M-4.038000106811523,-9.809000015258789 C-4.038000106811523,-9.809000015258789 2.2820000648498535,-3.499000072479248 2.2820000648498535,-3.499000072479248 C2.2820000648498535,-3.499000072479248 2.2820000648498535,-7.599999904632568 2.2820000648498535,-7.599999904632568 C2.2820000648498535,-8.65999984741211 3.0920000076293945,-9.520000457763672 4.131999969482422,-9.600000381469727 C4.131999969482422,-9.600000381469727 4.2820000648498535,-9.600000381469727 4.2820000648498535,-9.600000381469727 C4.2820000648498535,-9.600000381469727 8.281999588012695,-9.600000381469727 8.281999588012695,-9.600000381469727 C9.331999778747559,-9.600000381469727 10.192000389099121,-8.788999557495117 10.272000312805176,-7.749000072479248 C10.272000312805176,-7.749000072479248 10.281999588012695,-7.599999904632568 10.281999588012695,-7.599999904632568 C10.281999588012695,-7.599999904632568 10.281999588012695,8.399999618530273 10.281999588012695,8.399999618530273 C10.281999588012695,9.449999809265137 9.461999893188477,10.321000099182129 8.432000160217285,10.390999794006348 C8.432000160217285,10.390999794006348 8.281999588012695,10.399999618530273 8.281999588012695,10.399999618530273 C8.281999588012695,10.399999618530273 -7.7179999351501465,10.399999618530273 -7.7179999351501465,10.399999618530273 C-8.777999877929688,10.399999618530273 -9.637999534606934,9.581000328063965 -9.718000411987305,8.550999641418457 C-9.718000411987305,8.550999641418457 -9.718000411987305,8.399999618530273 -9.718000411987305,8.399999618530273 C-9.718000411987305,8.399999618530273 -9.718000411987305,4.400000095367432 -9.718000411987305,4.400000095367432 C-9.718000411987305,3.3399999141693115 -8.907999992370605,2.4800000190734863 -7.868000030517578,2.4000000953674316 C-7.868000030517578,2.4000000953674316 -7.7179999351501465,2.4000000953674316 -7.7179999351501465,2.4000000953674316 C-7.7179999351501465,2.4000000953674316 -3.138000011444092,2.4000000953674316 -3.138000011444092,2.4000000953674316 C-3.138000011444092,2.4000000953674316 -9.687999725341797,-4.159999847412109 -9.687999725341797,-4.159999847412109 C-10.477999687194824,-4.940000057220459 -10.477999687194824,-6.199999809265137 -9.687999725341797,-6.989999771118164 C-9.687999725341797,-6.989999771118164 -6.868000030517578,-9.809000015258789 -6.868000030517578,-9.809000015258789 C-6.078000068664551,-10.598999977111816 -4.817999839782715,-10.598999977111816 -4.038000106811523,-9.809000015258789z"></path></g><animate href="#myg" attributeName="opacity" to="0.8" dur="0.8s" begin="mySvg.mouseover"></animate><animateTransform id="#myg" attributeName="transform" type="translate" from="30.49 33.74" to="46 45" dur="0.8s" begin="mySvg.mouseover" calcMode="discrete"></animateTransform></g></g>', 2)
|
|
21
|
+
])))
|
|
22
|
+
]);
|
|
23
|
+
}
|
|
24
|
+
const he = /* @__PURE__ */ I(fe, [["render", ye]]), Q = [
|
|
25
|
+
//当浏览器开始查找音频/视频时触发。
|
|
26
|
+
"loadstart",
|
|
27
|
+
//当音频/视频已开始或不再暂停时触发。
|
|
28
|
+
"play",
|
|
29
|
+
//当音频/视频已暂停时触发。
|
|
30
|
+
"pause",
|
|
31
|
+
// 当音频/视频在因缓冲而暂停或停止后已就绪时触发。
|
|
32
|
+
"playing",
|
|
33
|
+
//当用户开始移动/跳跃到音频/视频中的新位置时触发。
|
|
34
|
+
"seeking",
|
|
35
|
+
//当用户已移动/跳跃到音频/视频中的新位置时触发。
|
|
36
|
+
"seeked",
|
|
37
|
+
//当视频由于需要缓冲下一帧而停止时触发。
|
|
38
|
+
//当浏览器可以开始播放音频/视频时触发。
|
|
39
|
+
"canplay",
|
|
40
|
+
"waiting",
|
|
41
|
+
//当音频/视频的时长已更改时触发。
|
|
42
|
+
"durationchange",
|
|
43
|
+
//当浏览器正在下载音频/视频时触发。
|
|
44
|
+
"progress",
|
|
45
|
+
//当目前的播放位置已更改时触发
|
|
46
|
+
"timeupdate",
|
|
47
|
+
//当目前的播放列表已结束时触发。
|
|
48
|
+
"ended",
|
|
49
|
+
//当在音频/视频加载期间发生错误时触发。
|
|
50
|
+
"error",
|
|
51
|
+
//当浏览器尝试获取媒体数据,但数据不可用时触发
|
|
52
|
+
"stalled"
|
|
53
|
+
], Ce = {
|
|
54
|
+
width: { type: String, default: "800px" },
|
|
55
|
+
height: { type: String, default: "450px" },
|
|
56
|
+
color: { type: String, default: "#409eff" },
|
|
57
|
+
src: { required: !0, type: String, default: "" },
|
|
58
|
+
//视频源
|
|
59
|
+
title: { type: String, default: "" },
|
|
60
|
+
//视频名称
|
|
61
|
+
type: { type: String, default: "video/mp4" },
|
|
62
|
+
//视频类型
|
|
63
|
+
poster: { type: String, default: "" },
|
|
64
|
+
//封面
|
|
65
|
+
webFullScreen: { type: Boolean, default: !1 },
|
|
66
|
+
//网页全屏
|
|
67
|
+
speed: { type: Boolean, default: !0 },
|
|
68
|
+
//是否支持快进快退 //移动端不支持
|
|
69
|
+
currentTime: { type: Number, default: 0 },
|
|
70
|
+
//当前播放时间
|
|
71
|
+
playsinline: { type: Boolean, default: !1 },
|
|
72
|
+
//ios端 点击播放是否全屏
|
|
73
|
+
muted: { type: Boolean, default: !0 },
|
|
74
|
+
//静音
|
|
75
|
+
speedRate: {
|
|
76
|
+
type: Array,
|
|
77
|
+
default: () => ["2.0", "1.5", "1.25", "1.0", "0.75", "0.5"]
|
|
78
|
+
},
|
|
79
|
+
//播放倍速
|
|
80
|
+
autoPlay: { type: Boolean, default: !1 },
|
|
81
|
+
//自动播放
|
|
82
|
+
loop: { type: Boolean, default: !1 },
|
|
83
|
+
//循环播放
|
|
84
|
+
mirror: { type: Boolean, default: !1 },
|
|
85
|
+
//镜像画面
|
|
86
|
+
lightOff: { type: Boolean, default: !1 },
|
|
87
|
+
//关灯模式
|
|
88
|
+
volume: { type: Number, default: 0.3 },
|
|
89
|
+
//默认音量大小
|
|
90
|
+
control: { type: Boolean, default: !0 },
|
|
91
|
+
//是否显示控制器
|
|
92
|
+
//配置播放器按钮
|
|
93
|
+
controlBtns: {
|
|
94
|
+
type: Array,
|
|
95
|
+
default: [
|
|
96
|
+
"audioTrack",
|
|
97
|
+
"quality",
|
|
98
|
+
"speedRate",
|
|
99
|
+
"volume",
|
|
100
|
+
"setting",
|
|
101
|
+
"pip",
|
|
102
|
+
"pageFullScreen",
|
|
103
|
+
"fullScreen"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
//是否显示控制器
|
|
107
|
+
preload: { type: String, default: "auto" }
|
|
108
|
+
//预加载
|
|
109
|
+
}, we = (t) => `${parseInt("0x" + t.slice(1, 3))},${parseInt(
|
|
110
|
+
"0x" + t.slice(3, 5)
|
|
111
|
+
)},${parseInt("0x" + t.slice(5, 7))}`, xe = (t) => t.charAt(0).toUpperCase() + t.slice(1), Se = "ontouchstart" in window, X = (t) => {
|
|
112
|
+
let a = ~~(t / 3600), c = ~~(t % 3600 / 60), n = ~~(t % 60);
|
|
113
|
+
return a = a < 10 ? "0" + a : a, c = c < 10 ? "0" + c : c, n = n < 10 ? "0" + n : n, `${a}:${c}:${n}`;
|
|
114
|
+
}, _e = (t) => {
|
|
115
|
+
document.pictureInPictureElement ? document.exitPictureInPicture().catch((a) => {
|
|
116
|
+
console.log(a, "Video failed to leave Picture-in-Picture mode.");
|
|
117
|
+
}) : t.requestPictureInPicture().catch((a) => {
|
|
118
|
+
console.log(a, "Video failed to enter Picture-in-Picture mode.");
|
|
119
|
+
});
|
|
120
|
+
}, be = (t) => {
|
|
121
|
+
let a = document, c = document.fullscreenElement;
|
|
122
|
+
return c ? (document.exitFullscreen || a.webkitExitFullScreen).call(a) : t.requestFullscreen.call(t), !c;
|
|
123
|
+
}, Te = ["xlink:href", "fill"], Pe = /* @__PURE__ */ q({
|
|
124
|
+
__name: "SvgIcon",
|
|
125
|
+
props: {
|
|
126
|
+
//复杂写法
|
|
127
|
+
//xlink:href属性值前缀
|
|
128
|
+
prefix: {
|
|
129
|
+
type: String,
|
|
130
|
+
default: "#icon-"
|
|
131
|
+
},
|
|
132
|
+
//图标的名字
|
|
133
|
+
name: String,
|
|
134
|
+
//接受父组件传递过来的颜色
|
|
135
|
+
color: {
|
|
136
|
+
type: String
|
|
137
|
+
// default: "",
|
|
138
|
+
},
|
|
139
|
+
//接受父组件传递过来宽度
|
|
140
|
+
width: {
|
|
141
|
+
type: String,
|
|
142
|
+
default: "16px"
|
|
143
|
+
},
|
|
144
|
+
//接受父组件传递过来的高度
|
|
145
|
+
height: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: "16px"
|
|
148
|
+
},
|
|
149
|
+
class: {
|
|
150
|
+
type: String
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
setup(t) {
|
|
154
|
+
return (a, c) => (g(), f("div", null, [
|
|
155
|
+
(g(), f("svg", {
|
|
156
|
+
class: M(["icon", t.class]),
|
|
157
|
+
style: V({ width: t.width, height: t.height })
|
|
158
|
+
}, [
|
|
159
|
+
o("use", {
|
|
160
|
+
"xlink:href": t.prefix + t.name,
|
|
161
|
+
fill: t.color
|
|
162
|
+
}, null, 8, Te)
|
|
163
|
+
], 6))
|
|
164
|
+
]));
|
|
165
|
+
}
|
|
166
|
+
}), U = /* @__PURE__ */ I(Pe, [["__scopeId", "data-v-e77fda1f"]]), Be = { key: 0 }, ke = { class: "mr5" }, Le = { class: "mr5" }, Ve = /* @__PURE__ */ q({
|
|
167
|
+
__name: "Loading",
|
|
168
|
+
props: {
|
|
169
|
+
loadType: String,
|
|
170
|
+
text: {
|
|
171
|
+
type: String,
|
|
172
|
+
default: ""
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
setup(t) {
|
|
176
|
+
const { proxy: a } = ae(), c = ["loadstart", "waiting", "ended", "error", "stalled"], n = t, e = () => {
|
|
177
|
+
a.$parent.play();
|
|
178
|
+
}, m = H(() => {
|
|
179
|
+
let l = "background: rgba(0, 0, 0, .1);z-index:1";
|
|
180
|
+
return n.loadType == "loadstart" && (l = "background: rgba(0, 0, 0, 1);;z-index:3"), l;
|
|
181
|
+
});
|
|
182
|
+
return (l, p) => $((g(), f("div", {
|
|
183
|
+
class: "loading",
|
|
184
|
+
style: V(m.value)
|
|
185
|
+
}, [
|
|
186
|
+
o("div", null, [
|
|
187
|
+
t.loadType == "loadstart" ? (g(), f("span", Be, [
|
|
188
|
+
p[0] || (p[0] = o("i", { class: "rotating iconfont icon-loading f50" }, null, -1)),
|
|
189
|
+
o("p", null, L(t.text), 1)
|
|
190
|
+
])) : D("", !0),
|
|
191
|
+
$(o("span", null, [
|
|
192
|
+
y(U, {
|
|
193
|
+
color: "#fff",
|
|
194
|
+
name: "loading",
|
|
195
|
+
width: "40",
|
|
196
|
+
height: "40",
|
|
197
|
+
class: "rotating"
|
|
198
|
+
}),
|
|
199
|
+
p[1] || (p[1] = o("p", { style: { "margin-top": "6px" } }, "正在缓冲...", -1))
|
|
200
|
+
], 512), [
|
|
201
|
+
[F, t.loadType == "waiting"]
|
|
202
|
+
]),
|
|
203
|
+
$(o("span", null, [
|
|
204
|
+
o("p", {
|
|
205
|
+
onClick: e,
|
|
206
|
+
class: "d-flex-x d-pointer"
|
|
207
|
+
}, [
|
|
208
|
+
o("span", ke, [
|
|
209
|
+
y(U, {
|
|
210
|
+
color: "#fff",
|
|
211
|
+
name: "replay",
|
|
212
|
+
width: "26",
|
|
213
|
+
height: "26"
|
|
214
|
+
}),
|
|
215
|
+
p[2] || (p[2] = A("重新播放 "))
|
|
216
|
+
])
|
|
217
|
+
])
|
|
218
|
+
], 512), [
|
|
219
|
+
[F, t.loadType == "ended"]
|
|
220
|
+
]),
|
|
221
|
+
$(o("span", null, [
|
|
222
|
+
o("p", {
|
|
223
|
+
onClick: e,
|
|
224
|
+
class: "d-flex-x d-pointer"
|
|
225
|
+
}, [
|
|
226
|
+
o("span", Le, [
|
|
227
|
+
y(U, {
|
|
228
|
+
color: "#fff",
|
|
229
|
+
name: "replay",
|
|
230
|
+
width: "26",
|
|
231
|
+
height: "26"
|
|
232
|
+
}),
|
|
233
|
+
p[3] || (p[3] = A(" 请求错误 "))
|
|
234
|
+
])
|
|
235
|
+
])
|
|
236
|
+
], 512), [
|
|
237
|
+
[F, t.loadType == "error" || t.loadType == "stalled"]
|
|
238
|
+
])
|
|
239
|
+
])
|
|
240
|
+
], 4)), [
|
|
241
|
+
[F, c.includes(t.loadType)]
|
|
242
|
+
]);
|
|
243
|
+
}
|
|
244
|
+
}), $e = /* @__PURE__ */ I(Ve, [["__scopeId", "data-v-139d9272"]]), W = function(t, a, c, n = !1) {
|
|
245
|
+
t && a && c && t.addEventListener(a, c, n);
|
|
246
|
+
}, R = function(t, a, c, n = !1) {
|
|
247
|
+
t && a && c && t.removeEventListener(a, c, n);
|
|
248
|
+
}, Fe = /* @__PURE__ */ q({
|
|
249
|
+
__name: "ProgressBar",
|
|
250
|
+
props: {
|
|
251
|
+
modelValue: {
|
|
252
|
+
required: !0,
|
|
253
|
+
type: Number,
|
|
254
|
+
default: 0
|
|
255
|
+
},
|
|
256
|
+
disabled: {
|
|
257
|
+
type: Boolean,
|
|
258
|
+
default: !1
|
|
259
|
+
},
|
|
260
|
+
vertical: {
|
|
261
|
+
type: Boolean,
|
|
262
|
+
default: !1
|
|
263
|
+
},
|
|
264
|
+
hover: { type: Boolean, default: !0 },
|
|
265
|
+
// 鼠标hover位置
|
|
266
|
+
hoverText: { type: String, default: "" },
|
|
267
|
+
// 鼠标hover时间提示
|
|
268
|
+
preload: { type: Number, default: 0 },
|
|
269
|
+
// 预加载load
|
|
270
|
+
size: {
|
|
271
|
+
type: String,
|
|
272
|
+
default: "10px"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
emits: ["update:modelValue", "change", "onMousemove"],
|
|
276
|
+
setup(t, { emit: a }) {
|
|
277
|
+
j((r) => ({
|
|
278
|
+
f07c1458: t.size
|
|
279
|
+
}));
|
|
280
|
+
const c = O(), n = O(), e = t, m = a, l = oe({
|
|
281
|
+
dragging: !1,
|
|
282
|
+
//拖拽状态
|
|
283
|
+
mousePosition: 0,
|
|
284
|
+
//鼠标位置
|
|
285
|
+
hoverTipsPos: "50%"
|
|
286
|
+
//提示偏移位置
|
|
287
|
+
}), p = H(() => {
|
|
288
|
+
let r = e.modelValue < 0 ? 0 : e.modelValue > 1 ? 1 : e.modelValue;
|
|
289
|
+
return e.vertical ? `height:${r * 100}%` : `width:${r * 100}%`;
|
|
290
|
+
}), v = H(() => {
|
|
291
|
+
let r = e.preload < 0 ? 0 : e.preload > 1 ? 1 : e.preload;
|
|
292
|
+
return e.vertical ? `height:${r * 100}%` : `width:${r * 100}%`;
|
|
293
|
+
}), u = H(() => {
|
|
294
|
+
let r = l.mousePosition < 0 ? 0 : l.mousePosition > 1 ? 1 : l.mousePosition;
|
|
295
|
+
return e.vertical ? `bottom:${r * 100}%` : `left:${r * 100}%`;
|
|
296
|
+
}), b = (r) => {
|
|
297
|
+
r.preventDefault();
|
|
298
|
+
}, z = (r) => {
|
|
299
|
+
console.log("鼠标按下了"), !e.disabled && (r.preventDefault(), l.dragging = !0, B(r), W(window, "mousemove", T), W(window, "touchmove", T), W(window, "mouseup", w), W(window, "touchend", w));
|
|
300
|
+
}, P = (r) => {
|
|
301
|
+
if (!e.hover) return;
|
|
302
|
+
let d = E(r);
|
|
303
|
+
if (m("onMousemove", r, d), l.mousePosition = d, e.vertical) return;
|
|
304
|
+
let h = c.value, x = n.value.clientWidth / 2, S = r.clientX - h.getBoundingClientRect().left;
|
|
305
|
+
S < x ? (console.log("11"), l.hoverTipsPos = x - S + "px") : h.clientWidth - S < x ? (console.log("22"), l.hoverTipsPos = h.clientWidth - S - x + "px") : l.hoverTipsPos = "50%";
|
|
306
|
+
}, B = (r) => {
|
|
307
|
+
let d = E(r);
|
|
308
|
+
m("update:modelValue", d), m("change", r, d);
|
|
309
|
+
}, E = (r) => {
|
|
310
|
+
let d = c.value, h = 0;
|
|
311
|
+
if (e.vertical) {
|
|
312
|
+
let x = d.clientHeight;
|
|
313
|
+
h = (d.getBoundingClientRect().bottom - r.clientY) / x;
|
|
314
|
+
} else
|
|
315
|
+
h = (r.clientX - d.getBoundingClientRect().left) / d.clientWidth;
|
|
316
|
+
return h < 0 ? 0 : h > 1 ? 1 : h;
|
|
317
|
+
}, T = (r) => {
|
|
318
|
+
B(r);
|
|
319
|
+
}, w = (r) => {
|
|
320
|
+
l.dragging && (R(window, "mousemove", T), R(window, "touchmove", T), R(window, "mouseup", w), R(window, "touchend", w), R(window, "contextmenu", w), setTimeout(() => {
|
|
321
|
+
l.dragging = !1;
|
|
322
|
+
}, 0));
|
|
323
|
+
};
|
|
324
|
+
return (r, d) => (g(), f("div", {
|
|
325
|
+
ref_key: "refProgress",
|
|
326
|
+
ref: c,
|
|
327
|
+
class: M(["progress", { "is-vertical": e.vertical }]),
|
|
328
|
+
onMousedown: ie(z, ["stop"]),
|
|
329
|
+
onContextmenu: b
|
|
330
|
+
}, [
|
|
331
|
+
o("div", {
|
|
332
|
+
class: "progress__runway",
|
|
333
|
+
onMousemove: P
|
|
334
|
+
}, [
|
|
335
|
+
$(o("div", {
|
|
336
|
+
class: "progress__cursor",
|
|
337
|
+
style: V(u.value)
|
|
338
|
+
}, [
|
|
339
|
+
$(o("div", {
|
|
340
|
+
class: "progress__tips",
|
|
341
|
+
ref_key: "refTips",
|
|
342
|
+
ref: n,
|
|
343
|
+
style: V({ left: l.hoverTipsPos })
|
|
344
|
+
}, L(t.hoverText), 5), [
|
|
345
|
+
[F, e.hoverText]
|
|
346
|
+
])
|
|
347
|
+
], 4), [
|
|
348
|
+
[F, t.hover]
|
|
349
|
+
]),
|
|
350
|
+
o("div", {
|
|
351
|
+
class: "progress__preload",
|
|
352
|
+
style: V(v.value)
|
|
353
|
+
}, null, 4),
|
|
354
|
+
o("div", {
|
|
355
|
+
class: "progress__bar",
|
|
356
|
+
style: V(p.value)
|
|
357
|
+
}, null, 4)
|
|
358
|
+
], 32)
|
|
359
|
+
], 34));
|
|
360
|
+
}
|
|
361
|
+
}), ee = /* @__PURE__ */ I(Fe, [["__scopeId", "data-v-87b818ab"]]);
|
|
362
|
+
function Me(t, a, c) {
|
|
363
|
+
var n = c || {}, e = n.noTrailing, m = e === void 0 ? !1 : e, l = n.noLeading, p = l === void 0 ? !1 : l, v = n.debounceMode, u = v === void 0 ? void 0 : v, b, z = !1, P = 0;
|
|
364
|
+
function B() {
|
|
365
|
+
b && clearTimeout(b);
|
|
366
|
+
}
|
|
367
|
+
function E(w) {
|
|
368
|
+
var r = w || {}, d = r.upcomingOnly, h = d === void 0 ? !1 : d;
|
|
369
|
+
B(), z = !h;
|
|
370
|
+
}
|
|
371
|
+
function T() {
|
|
372
|
+
for (var w = arguments.length, r = new Array(w), d = 0; d < w; d++)
|
|
373
|
+
r[d] = arguments[d];
|
|
374
|
+
var h = this, x = Date.now() - P;
|
|
375
|
+
if (z)
|
|
376
|
+
return;
|
|
377
|
+
function S() {
|
|
378
|
+
P = Date.now(), a.apply(h, r);
|
|
379
|
+
}
|
|
380
|
+
function N() {
|
|
381
|
+
b = void 0;
|
|
382
|
+
}
|
|
383
|
+
!p && u && !b && S(), B(), u === void 0 && x > t ? p ? (P = Date.now(), m || (b = setTimeout(u ? N : S, t))) : S() : m !== !0 && (b = setTimeout(u ? N : S, u === void 0 ? t - x : t));
|
|
384
|
+
}
|
|
385
|
+
return T.cancel = E, T;
|
|
386
|
+
}
|
|
387
|
+
function Ie(t, a, c) {
|
|
388
|
+
var n = {}, e = n.atBegin, m = e === void 0 ? !1 : e;
|
|
389
|
+
return Me(t, a, {
|
|
390
|
+
debounceMode: m !== !1
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
const ze = ["checked"], Ee = /* @__PURE__ */ q({
|
|
394
|
+
__name: "Switch",
|
|
395
|
+
props: {
|
|
396
|
+
modelValue: {
|
|
397
|
+
//绑定值,必须等于active-value或inactive-value,默认为Boolean类型
|
|
398
|
+
type: [Number, String, Boolean]
|
|
399
|
+
},
|
|
400
|
+
//switch组件的宽度(px)
|
|
401
|
+
width: {
|
|
402
|
+
type: String,
|
|
403
|
+
default: "40px"
|
|
404
|
+
},
|
|
405
|
+
//switch 打开时的值
|
|
406
|
+
trueValue: {
|
|
407
|
+
type: [Number, String, Boolean],
|
|
408
|
+
default: !0
|
|
409
|
+
},
|
|
410
|
+
//switch关闭时的值
|
|
411
|
+
falseValue: {
|
|
412
|
+
type: [Number, String, Boolean],
|
|
413
|
+
default: !0
|
|
414
|
+
},
|
|
415
|
+
//switch打开是的背景色
|
|
416
|
+
activeColor: {
|
|
417
|
+
type: [String],
|
|
418
|
+
default: "#409EFF"
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
emits: ["update:modelValue", "change"],
|
|
422
|
+
setup(t, { emit: a }) {
|
|
423
|
+
j((p) => ({
|
|
424
|
+
cb3ceaa8: t.width,
|
|
425
|
+
"1150cc63": t.activeColor
|
|
426
|
+
}));
|
|
427
|
+
const c = t, n = a, e = O(), m = H(() => c.modelValue === c.trueValue), l = (p) => {
|
|
428
|
+
le(() => {
|
|
429
|
+
const v = p.target.checked;
|
|
430
|
+
n("update:modelValue", v), n("change", v);
|
|
431
|
+
});
|
|
432
|
+
};
|
|
433
|
+
return (p, v) => (g(), f("div", {
|
|
434
|
+
class: M(["switch", { "is-checked": m.value }])
|
|
435
|
+
}, [
|
|
436
|
+
o("input", {
|
|
437
|
+
type: "checkbox",
|
|
438
|
+
class: "switch_input",
|
|
439
|
+
ref_key: "input",
|
|
440
|
+
ref: e,
|
|
441
|
+
checked: m.value,
|
|
442
|
+
onChange: v[0] || (v[0] = (u) => l(u))
|
|
443
|
+
}, null, 40, ze),
|
|
444
|
+
v[1] || (v[1] = o("span", { class: "switch_action" }, null, -1))
|
|
445
|
+
], 2));
|
|
446
|
+
}
|
|
447
|
+
}), Y = /* @__PURE__ */ I(Ee, [["__scopeId", "data-v-059db622"]]), De = {
|
|
448
|
+
class: "Player",
|
|
449
|
+
id: "PlayerVideo"
|
|
450
|
+
}, Ae = ["src", "loop", "poster", "volume", "muted"], He = { class: "player-state" }, Ne = { class: "play-btn" }, Re = {
|
|
451
|
+
class: "player-control",
|
|
452
|
+
ref: "refPlayerControl"
|
|
453
|
+
}, Oe = { class: "control-progress" }, qe = { class: "tool-bar" }, We = { class: "tool-item tool-time audioTrack-btn" }, Ue = { class: "total-time" }, Ze = { class: "tool-bar" }, Xe = {
|
|
454
|
+
key: 0,
|
|
455
|
+
class: "tool-item speedRate-btn"
|
|
456
|
+
}, Ye = { class: "tool-item-main" }, je = { class: "speed-main" }, Ge = ["onClick"], Je = {
|
|
457
|
+
key: 1,
|
|
458
|
+
class: "tool-item volume-btn"
|
|
459
|
+
}, Ke = {
|
|
460
|
+
class: "tool-item-main volume-box",
|
|
461
|
+
style: { width: "52px" }
|
|
462
|
+
}, Qe = { class: "volume-text-size" }, et = { class: "tool-item setting-btn" }, tt = { class: "biggerScaleAni" }, ot = { class: "tool-item-main" }, lt = { class: "speed-main" }, nt = { class: "biggerAni" }, at = /* @__PURE__ */ q({
|
|
463
|
+
__name: "Main",
|
|
464
|
+
props: Ce,
|
|
465
|
+
emits: [
|
|
466
|
+
...Q,
|
|
467
|
+
"mirrorChange",
|
|
468
|
+
"loopChange",
|
|
469
|
+
"lightOffChange"
|
|
470
|
+
],
|
|
471
|
+
setup(t, { expose: a, emit: c }) {
|
|
472
|
+
j((s) => ({
|
|
473
|
+
"2011da3e": J(S),
|
|
474
|
+
"224f4e1e": s.width,
|
|
475
|
+
"0dcb7bcf": s.height
|
|
476
|
+
}));
|
|
477
|
+
const n = t, e = oe({
|
|
478
|
+
Video: null,
|
|
479
|
+
...n,
|
|
480
|
+
muted: n.muted,
|
|
481
|
+
playBtnState: n.autoPlay ? "pause" : "play",
|
|
482
|
+
// 播放按钮状态
|
|
483
|
+
loadStateType: "loadstart",
|
|
484
|
+
// 加载状态类型 //loadstart初始化 waiting缓冲 ended播放结束
|
|
485
|
+
fullScreen: !1,
|
|
486
|
+
handleType: "",
|
|
487
|
+
//当前操作类型
|
|
488
|
+
//当前播放时间
|
|
489
|
+
currentTime: "00:00:00",
|
|
490
|
+
// 当前缓冲进度
|
|
491
|
+
preloadBar: 0,
|
|
492
|
+
//总时长
|
|
493
|
+
totalTime: "00:00:00",
|
|
494
|
+
//是否悬停在视频上
|
|
495
|
+
isVideoHovering: !0,
|
|
496
|
+
speedActive: "1.0",
|
|
497
|
+
//当前活动的倍速
|
|
498
|
+
playProgress: 0,
|
|
499
|
+
//播放进度
|
|
500
|
+
isMultiplesPlay: !1,
|
|
501
|
+
//是否倍速播放
|
|
502
|
+
longPressTimeout: null,
|
|
503
|
+
progressCursorTime: "00:00:00",
|
|
504
|
+
//进度条光标时间
|
|
505
|
+
qualityLevels: [],
|
|
506
|
+
//分辨率数组
|
|
507
|
+
currentLevel: 0
|
|
508
|
+
//首选分辨率
|
|
509
|
+
}), m = c, l = O(), p = O(), v = (...s) => (i) => s.reverse().reduce((C, k) => k(C), i), u = Q.reduce((s, i) => {
|
|
510
|
+
let C = `on${xe(i)}`;
|
|
511
|
+
return s[C] = (k) => {
|
|
512
|
+
e.loadStateType = i, m(i, k);
|
|
513
|
+
}, s;
|
|
514
|
+
}, {});
|
|
515
|
+
u.onCanplay = v(u.onCanplay, () => {
|
|
516
|
+
e.playBtnState != "play" && (console.log(l.value), l.value.play()), e.autoPlay && (l.value.play(), e.playBtnState = "pause");
|
|
517
|
+
}), u.onDurationchange = (s) => {
|
|
518
|
+
m("durationchange", s), console.log("资源长度"), n.currentTime != 0 && (l.value.currentTime = n.currentTime), u.onTimeupdate(s);
|
|
519
|
+
}, u.onEnded = v(u.onEnded, () => {
|
|
520
|
+
e.playBtnState = "replay";
|
|
521
|
+
}), u.onError = v(u.onError, () => {
|
|
522
|
+
e.playBtnState = "replay";
|
|
523
|
+
}), u.onProgress = (s) => {
|
|
524
|
+
m("progress", s);
|
|
525
|
+
let i = s.target.duration, C = s.target.buffered, k = s.target.buffered.length && s.target.buffered.end(C - 1);
|
|
526
|
+
e.preloadBar = k / i;
|
|
527
|
+
};
|
|
528
|
+
const b = (s, i) => {
|
|
529
|
+
let C = l.value.duration || l.value.target.duration;
|
|
530
|
+
l.value.currentTime = C * i, e.playBtnState == "play" && (l.value.play(), e.playBtnState = "pause");
|
|
531
|
+
}, z = (s, i) => {
|
|
532
|
+
e.progressCursorTime = X(l.value.duration * i);
|
|
533
|
+
}, P = Ie(2500, () => {
|
|
534
|
+
e.isVideoHovering = !1;
|
|
535
|
+
}), B = (s) => {
|
|
536
|
+
e.isVideoHovering = !0, P();
|
|
537
|
+
}, E = () => {
|
|
538
|
+
}, T = (s) => {
|
|
539
|
+
e.speedActive = s, l.value.playbackRate = s;
|
|
540
|
+
}, w = (s) => {
|
|
541
|
+
m("loopChange", s, l.value);
|
|
542
|
+
}, r = () => {
|
|
543
|
+
_e(l.value);
|
|
544
|
+
}, d = () => {
|
|
545
|
+
e.fullScreen = be(p.value);
|
|
546
|
+
}, h = () => {
|
|
547
|
+
e.muted = !e.muted, e.volume == 0 && (e.volume = 0.05);
|
|
548
|
+
};
|
|
549
|
+
u.onTimeupdate = (s) => {
|
|
550
|
+
m("timeupdate", s);
|
|
551
|
+
let i = s.duration || s.target.duration || 0, C = s.currentTime || s.target.currentTime;
|
|
552
|
+
e.playProgress = C / i, e.currentTime = X(C), e.totalTime = X(i);
|
|
553
|
+
};
|
|
554
|
+
const x = () => {
|
|
555
|
+
l.value.canPlayType(n.type) || console.error(
|
|
556
|
+
"vue3-video-play: Format not supported,Check the [type] parameter"
|
|
557
|
+
), (l.value.canPlayType(n.type) || l.value.canPlayType("application/vnd.apple.mpegurl")) && (console.log("ccccc"), e.muted = n.autoPlay);
|
|
558
|
+
};
|
|
559
|
+
se(
|
|
560
|
+
() => n.src,
|
|
561
|
+
(s) => {
|
|
562
|
+
le(() => {
|
|
563
|
+
console.log(s, "scr"), x();
|
|
564
|
+
});
|
|
565
|
+
},
|
|
566
|
+
{ immediate: !0 }
|
|
567
|
+
);
|
|
568
|
+
const S = we(e.color), N = () => {
|
|
569
|
+
console.log(n.controlBtns.includes("volume"), "vol"), e.loadStateType = "play", l.value.play().catch(() => {
|
|
570
|
+
l.value.load(), console.log(l.value.readyState, "readysat."), console.log(l.value.networkState, "netwoir"), l.value.readyState && setTimeout(() => {
|
|
571
|
+
l.value.play().catch(() => {
|
|
572
|
+
console.log(l.value.readyState), e.playBtnState = "replay", e.loadStateType = "error";
|
|
573
|
+
});
|
|
574
|
+
}, 200);
|
|
575
|
+
}), e.playBtnState = "pause", console.log(e.loadStateType, "state");
|
|
576
|
+
}, G = () => {
|
|
577
|
+
l.value.pause(), e.playBtnState = "play";
|
|
578
|
+
}, Z = (s) => {
|
|
579
|
+
s && s.preventDefault(), console.log(l.value.src), e.playBtnState == "play" || e.playBtnState == "replay" ? N() : e.playBtnState == "pause" && G();
|
|
580
|
+
};
|
|
581
|
+
return re(() => {
|
|
582
|
+
e.Video = l.value;
|
|
583
|
+
}), a({
|
|
584
|
+
play: N,
|
|
585
|
+
//播放
|
|
586
|
+
pause: G,
|
|
587
|
+
//暂停
|
|
588
|
+
togglePlay: Z
|
|
589
|
+
//暂停或播放
|
|
590
|
+
}), (s, i) => {
|
|
591
|
+
const C = K("SvgIcon"), k = K("Icon");
|
|
592
|
+
return g(), f("div", {
|
|
593
|
+
ref_key: "playerWrap",
|
|
594
|
+
ref: p,
|
|
595
|
+
id: "playerWrap",
|
|
596
|
+
class: M(["player-wrap", {
|
|
597
|
+
"web-full-screen": e.webFullScreen,
|
|
598
|
+
"is-lightoff": e.lightOff,
|
|
599
|
+
"player-wrap-hover": e.playBtnState == "play" || e.isVideoHovering
|
|
600
|
+
}]),
|
|
601
|
+
onMousemove: B
|
|
602
|
+
}, [
|
|
603
|
+
o("div", De, [
|
|
604
|
+
o("video", ce({
|
|
605
|
+
width: "100%",
|
|
606
|
+
height: "100%",
|
|
607
|
+
src: s.src,
|
|
608
|
+
ref_key: "v",
|
|
609
|
+
ref: l
|
|
610
|
+
}, J(u), {
|
|
611
|
+
class: "Player-video",
|
|
612
|
+
id: "v",
|
|
613
|
+
loop: e.loop,
|
|
614
|
+
poster: s.poster,
|
|
615
|
+
volume: e.volume,
|
|
616
|
+
muted: e.muted,
|
|
617
|
+
fill: "cover"
|
|
618
|
+
}), " 您的浏览器不支持Video标签。 ", 16, Ae)
|
|
619
|
+
]),
|
|
620
|
+
o("div", He, [
|
|
621
|
+
y(ue, { name: "scale-out" }, {
|
|
622
|
+
default: de(() => [
|
|
623
|
+
$(o("div", Ne, [
|
|
624
|
+
y(C, {
|
|
625
|
+
color: "#fff",
|
|
626
|
+
name: "play",
|
|
627
|
+
width: "40",
|
|
628
|
+
height: "40"
|
|
629
|
+
})
|
|
630
|
+
], 512), [
|
|
631
|
+
[F, e.playBtnState == "play"]
|
|
632
|
+
])
|
|
633
|
+
]),
|
|
634
|
+
_: 1
|
|
635
|
+
})
|
|
636
|
+
]),
|
|
637
|
+
o("input", {
|
|
638
|
+
readonly: !0,
|
|
639
|
+
type: "input",
|
|
640
|
+
onClick: Z,
|
|
641
|
+
class: "player-input",
|
|
642
|
+
maxlength: "0"
|
|
643
|
+
}),
|
|
644
|
+
y($e, {
|
|
645
|
+
loadType: e.loadStateType
|
|
646
|
+
}, null, 8, ["loadType"]),
|
|
647
|
+
o("div", Re, [
|
|
648
|
+
o("div", Oe, [
|
|
649
|
+
y(ee, {
|
|
650
|
+
class: "progress-bar",
|
|
651
|
+
onOnMousemove: z,
|
|
652
|
+
onChange: b,
|
|
653
|
+
modelValue: e.playProgress,
|
|
654
|
+
"onUpdate:modelValue": i[0] || (i[0] = (_) => e.playProgress = _),
|
|
655
|
+
preload: e.preloadBar,
|
|
656
|
+
hoverText: e.progressCursorTime
|
|
657
|
+
}, null, 8, ["modelValue", "preload", "hoverText"])
|
|
658
|
+
]),
|
|
659
|
+
o("div", {
|
|
660
|
+
class: "control-tool",
|
|
661
|
+
onClick: E
|
|
662
|
+
}, [
|
|
663
|
+
o("div", qe, [
|
|
664
|
+
o("div", {
|
|
665
|
+
class: "tool-item",
|
|
666
|
+
onClick: Z
|
|
667
|
+
}, [
|
|
668
|
+
y(k, {
|
|
669
|
+
size: "24",
|
|
670
|
+
icon: `icon-${e.playBtnState}`
|
|
671
|
+
}, null, 8, ["icon"])
|
|
672
|
+
]),
|
|
673
|
+
o("div", We, [
|
|
674
|
+
o("span", null, L(e.currentTime), 1),
|
|
675
|
+
i[5] || (i[5] = o("span", { style: { margin: "0 3px" } }, "/", -1)),
|
|
676
|
+
o("span", Ue, L(e.totalTime), 1)
|
|
677
|
+
])
|
|
678
|
+
]),
|
|
679
|
+
o("div", Ze, [
|
|
680
|
+
i[12] || (i[12] = o("div", { class: "tool-item quality-btn" }, [
|
|
681
|
+
o("div", { class: "tool-item-main" }, [
|
|
682
|
+
o("ul", {
|
|
683
|
+
class: "speed-main",
|
|
684
|
+
style: { "text-align": "center" }
|
|
685
|
+
}, [
|
|
686
|
+
o("li")
|
|
687
|
+
])
|
|
688
|
+
])
|
|
689
|
+
], -1)),
|
|
690
|
+
n.controlBtns.includes("speedRate") ? (g(), f("div", Xe, [
|
|
691
|
+
A(L(e.speedActive == "1.0" ? "倍速" : e.speedActive + "x") + " ", 1),
|
|
692
|
+
o("div", Ye, [
|
|
693
|
+
o("ul", je, [
|
|
694
|
+
(g(!0), f(pe, null, me(e.speedRate, (_) => (g(), f("li", {
|
|
695
|
+
class: M({ "speed-active": e.speedActive == _ }),
|
|
696
|
+
onClick: (ut) => T(_)
|
|
697
|
+
}, L(_) + "X ", 11, Ge))), 256))
|
|
698
|
+
])
|
|
699
|
+
])
|
|
700
|
+
])) : D("", !0),
|
|
701
|
+
n.controlBtns.includes("volume") ? (g(), f("div", Je, [
|
|
702
|
+
o("div", Ke, [
|
|
703
|
+
o("div", {
|
|
704
|
+
class: M(["volume-main", { "is-muted": e.muted }])
|
|
705
|
+
}, [
|
|
706
|
+
o("span", Qe, L(e.muted ? 0 : ~~(e.volume * 100)) + "% ", 1),
|
|
707
|
+
y(ee, {
|
|
708
|
+
onChange: i[1] || (i[1] = (_) => e.muted = !1),
|
|
709
|
+
hover: !1,
|
|
710
|
+
size: "5px",
|
|
711
|
+
vertical: !0,
|
|
712
|
+
modelValue: e.volume,
|
|
713
|
+
"onUpdate:modelValue": i[2] || (i[2] = (_) => e.volume = _)
|
|
714
|
+
}, null, 8, ["modelValue"])
|
|
715
|
+
], 2)
|
|
716
|
+
]),
|
|
717
|
+
o("span", {
|
|
718
|
+
onClick: h,
|
|
719
|
+
class: "biggerAni",
|
|
720
|
+
style: { display: "flex" }
|
|
721
|
+
}, [
|
|
722
|
+
y(C, {
|
|
723
|
+
name: `volume-${e.volume == 0 || e.muted ? "mute" : e.volume > 0.5 ? "up" : "down"}`,
|
|
724
|
+
width: "25",
|
|
725
|
+
height: "25",
|
|
726
|
+
color: "#fff"
|
|
727
|
+
}, null, 8, ["name"])
|
|
728
|
+
])
|
|
729
|
+
])) : D("", !0),
|
|
730
|
+
o("div", et, [
|
|
731
|
+
o("span", tt, [
|
|
732
|
+
y(C, {
|
|
733
|
+
name: "shezhi",
|
|
734
|
+
width: "22",
|
|
735
|
+
height: "22",
|
|
736
|
+
color: "#fff"
|
|
737
|
+
})
|
|
738
|
+
]),
|
|
739
|
+
o("div", ot, [
|
|
740
|
+
o("ul", lt, [
|
|
741
|
+
o("li", null, [
|
|
742
|
+
i[6] || (i[6] = A(" 镜像画面 ")),
|
|
743
|
+
y(Y)
|
|
744
|
+
]),
|
|
745
|
+
o("li", null, [
|
|
746
|
+
i[7] || (i[7] = A(" 循环播放 ")),
|
|
747
|
+
y(Y, {
|
|
748
|
+
onChange: w,
|
|
749
|
+
modelValue: e.loop,
|
|
750
|
+
"onUpdate:modelValue": i[3] || (i[3] = (_) => e.loop = _)
|
|
751
|
+
}, null, 8, ["modelValue"])
|
|
752
|
+
]),
|
|
753
|
+
o("li", null, [
|
|
754
|
+
i[8] || (i[8] = A("关灯模式")),
|
|
755
|
+
y(Y)
|
|
756
|
+
])
|
|
757
|
+
])
|
|
758
|
+
])
|
|
759
|
+
]),
|
|
760
|
+
n.controlBtns.includes("pip") ? (g(), f("div", {
|
|
761
|
+
key: 2,
|
|
762
|
+
class: "tool-item pip-btn",
|
|
763
|
+
onClick: r
|
|
764
|
+
}, [
|
|
765
|
+
y(he, {
|
|
766
|
+
class: "biggerAni",
|
|
767
|
+
style: { position: "relative", top: "2px" }
|
|
768
|
+
}),
|
|
769
|
+
i[9] || (i[9] = o("div", { class: "tool-item-main" }, "画中画", -1))
|
|
770
|
+
])) : D("", !0),
|
|
771
|
+
n.controlBtns.includes("pageFullScreen") ? (g(), f("div", {
|
|
772
|
+
key: 3,
|
|
773
|
+
class: "tool-item pip-btn",
|
|
774
|
+
onClick: i[4] || (i[4] = (_) => e.webFullScreen = !e.webFullScreen)
|
|
775
|
+
}, i[10] || (i[10] = [
|
|
776
|
+
o("img", {
|
|
777
|
+
width: "20px",
|
|
778
|
+
height: "20px",
|
|
779
|
+
class: "webfullscreen-icon biggerAni",
|
|
780
|
+
src: ge,
|
|
781
|
+
alt: ""
|
|
782
|
+
}, null, -1),
|
|
783
|
+
o("div", { class: "tool-item-main" }, "网页全屏", -1)
|
|
784
|
+
]))) : D("", !0),
|
|
785
|
+
n.controlBtns.includes("fullScreen") ? (g(), f("div", {
|
|
786
|
+
key: 4,
|
|
787
|
+
class: "tool-item fullScreen-btn",
|
|
788
|
+
onClick: d
|
|
789
|
+
}, [
|
|
790
|
+
i[11] || (i[11] = o("div", { class: "tool-item-main" }, "全屏", -1)),
|
|
791
|
+
o("span", nt, [
|
|
792
|
+
y(C, {
|
|
793
|
+
name: "fullscreen",
|
|
794
|
+
width: "20",
|
|
795
|
+
height: "20",
|
|
796
|
+
color: "#fff"
|
|
797
|
+
})
|
|
798
|
+
])
|
|
799
|
+
])) : D("", !0)
|
|
800
|
+
])
|
|
801
|
+
])
|
|
802
|
+
], 512)
|
|
803
|
+
], 34);
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
}), it = /* @__PURE__ */ I(at, [["__scopeId", "data-v-02a06568"]]), st = {
|
|
807
|
+
name: "icon"
|
|
808
|
+
}, rt = /* @__PURE__ */ Object.assign(st, {
|
|
809
|
+
props: {
|
|
810
|
+
icon: String,
|
|
811
|
+
size: [Number, String]
|
|
812
|
+
},
|
|
813
|
+
setup(t) {
|
|
814
|
+
const a = t, c = H(() => ({ fontSize: /^\d+$/.test(a.size) ? a.size + "px" : a.size }));
|
|
815
|
+
return (n, e) => (g(), f("i", {
|
|
816
|
+
class: M(["icon iconfont", t.icon]),
|
|
817
|
+
style: V(c.value)
|
|
818
|
+
}, null, 6));
|
|
819
|
+
}
|
|
820
|
+
}), ct = /* @__PURE__ */ I(rt, [["__scopeId", "data-v-7d306b2a"]]), te = { Main: it, SvgIcon: U, Icon: ct }, mt = {
|
|
821
|
+
//务必叫做install方法
|
|
822
|
+
install(t) {
|
|
823
|
+
Object.keys(te).forEach((a) => {
|
|
824
|
+
t.component(a, te[a]);
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
};
|
|
828
|
+
export {
|
|
829
|
+
mt as default
|
|
830
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("vue"),require("//at.alicdn.com/t/c/font_4726673_rs88m9qadnr.js")):typeof define=="function"&&define.amd?define(["vue","//at.alicdn.com/t/c/font_4726673_rs88m9qadnr.js"],b):(e=typeof globalThis<"u"?globalThis:e||self,e["vueVideo++"]=b(e.Vue))})(this,function(e){"use strict";const b="data:image/svg+xml,%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20%3e%3cg%20id='pc'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='默认态-全集/暂停态'%20transform='translate(-1065.000000,%20-614.000000)'%20%3e%3cg%20id='编组-3备份'%20transform='translate(-3.166993,%200.000000)'%3e%3cg%20id='编组-9'%20transform='translate(774.166993,%20614.000000)'%3e%3cg%20id='编组-3'%20transform='translate(132.000000,%200.000000)'%3e%3cg%20id='网页全屏'%20transform='translate(162.000000,%200.000000)'%3e%3crect%20id='矩形'%20fill='%23D8D8D8'%20opacity='0'%20x='0'%20y='0'%20width='24'%20height='24'%20%3e%3c/rect%3e%3cg%20id='编组-16'%20transform='translate(1.900000,%201.900000)'%20fill='%23FFFFFF'%20fill-rule='nonzero'%20%3e%3cpath%20d='M14.6997998,-1.84741111e-13%20C17.7374765,-1.84741111e-13%2020.2,2.46252353%2020.2,5.50020024%20L20.2,5.50020024%20L20.2,14.6997998%20C20.2,17.7374765%2017.7374765,20.2%2014.6997998,20.2%20L14.6997998,20.2%20L5.50020024,20.2%20C2.46252353,20.2%204.26325641e-14,17.7374765%204.26325641e-14,14.6997998%20L4.26325641e-14,14.6997998%20L4.26325641e-14,5.50020024%20C4.26325641e-14,2.46252353%202.46252353,-1.84741111e-13%205.50020024,-1.84741111e-13%20L5.50020024,-1.84741111e-13%20Z%20M14.6997998,2.2%20L5.50020024,2.2%20C3.67754998,2.2%202.2,3.67754998%202.2,5.50020024%20L2.2,5.50020024%20L2.2,14.6997998%20C2.2,16.52245%203.67754998,18%205.50020024,18%20L5.50020024,18%20L14.6997998,18%20C16.52245,18%2018,16.52245%2018,14.6997998%20L18,14.6997998%20L18,5.50020024%20C18,3.67754998%2016.52245,2.2%2014.6997998,2.2%20L14.6997998,2.2%20Z%20M15.9422599,11.7135175%20L15.9422599,14.9311645%20C15.9422599,15.4981769%2015.5132492,15.9649884%2014.962117,16.0247099%20L14.8422599,16.0311645%20L11.6246128,16.0311645%20L11.6246128,13.8311645%20L13.7428727,13.831682%20L13.7422599,11.7135175%20L15.9422599,11.7135175%20Z%20M8.53049519,4.30175278%20L8.53049519,6.50175278%20L6.412,6.501%20L6.41284813,8.61939984%20L4.21284813,8.61939984%20L4.21284813,5.40175278%20C4.21284813,4.83474044%204.64185883,4.36792892%205.19299101,4.30820743%20L5.31284813,4.30175278%20L8.53049519,4.30175278%20Z'%20id='形状结合'%20%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",N=(o,a)=>{const c=o.__vccOpts||o;for(const[n,t]of a)c[n]=t;return c},q={},R={id:"mySvg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 88 88",width:"22",height:"22",preserveAspectRatio:"xMidYMid meet",style:{width:"22",height:"22",transform:"translate3d(0px, 0px, 0px)"}};function O(o,a){return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createElementBlock("svg",R,a[0]||(a[0]=[e.createStaticVNode('<defs><clipPath id="__lottie_element_139"><rect width="76" height="76" x="0" y="0"></rect></clipPath></defs><g clip-path="url(#__lottie_element_139)"><g transform="matrix(1,0,0,1,41,41)" opacity="1" style="display:block;"><g opacity="1" transform="matrix(1,0,0,1,0,0)"><path fill="rgb(255,255,255)" fill-opacity="1" d=" M26,-28 C30.420000076293945,-28 34,-24.420000076293945 34,-20 C34,-20 34,4 34,4 C34,4 26,4 26,4 C26,4 26,-16.799999237060547 26,-16.799999237060547 C26,-18.56999969482422 24.56999969482422,-20 22.799999237060547,-20 C22.799999237060547,-20 -22.799999237060547,-20 -22.799999237060547,-20 C-24.510000228881836,-20 -25.899999618530273,-18.65999984741211 -25.989999771118164,-16.979999542236328 C-25.989999771118164,-16.979999542236328 -26,-16.799999237060547 -26,-16.799999237060547 C-26,-16.799999237060547 -26,16.799999237060547 -26,16.799999237060547 C-26,18.510000228881836 -24.65999984741211,19.899999618530273 -22.979999542236328,19.989999771118164 C-22.979999542236328,19.989999771118164 -22.799999237060547,20 -22.799999237060547,20 C-22.799999237060547,20 2,20 2,20 C2,20 2,28 2,28 C2,28 -26,28 -26,28 C-30.420000076293945,28 -34,24.420000076293945 -34,20 C-34,20 -34,-20 -34,-20 C-34,-24.420000076293945 -30.420000076293945,-28 -26,-28 C-26,-28 26,-28 26,-28z"></path></g></g><g transform="matrix(1,0,0,1,67,65)" opacity="1" style="display:block;"><g opacity="1" transform="matrix(1,0,0,1,0,0)"><path fill="rgb(255,255,255)" fill-opacity="1" d=" M16,-8 C16,-8 16,8 16,8 C16,10.208999633789062 14.208999633789062,12 12,12 C12,12 -12,12 -12,12 C-14.208999633789062,12 -16,10.208999633789062 -16,8 C-16,8 -16,-8 -16,-8 C-16,-10.208999633789062 -14.208999633789062,-12 -12,-12 C-12,-12 12,-12 12,-12 C14.208999633789062,-12 16,-10.208999633789062 16,-8z"></path></g></g><g id="myg" style="" transform="matrix(1,0,0,1,30.496000289916992,33.74300003051758)" opacity="0.09982599999383127"><g pointer-events="none" opacity="1" transform="matrix(1,0,0,1,0,0)"><path fill="rgb(255,255,255)" fill-opacity="1" d=" M-4.038000106811523,-9.809000015258789 C-4.038000106811523,-9.809000015258789 2.2820000648498535,-3.499000072479248 2.2820000648498535,-3.499000072479248 C2.2820000648498535,-3.499000072479248 2.2820000648498535,-7.599999904632568 2.2820000648498535,-7.599999904632568 C2.2820000648498535,-8.65999984741211 3.0920000076293945,-9.520000457763672 4.131999969482422,-9.600000381469727 C4.131999969482422,-9.600000381469727 4.2820000648498535,-9.600000381469727 4.2820000648498535,-9.600000381469727 C4.2820000648498535,-9.600000381469727 8.281999588012695,-9.600000381469727 8.281999588012695,-9.600000381469727 C9.331999778747559,-9.600000381469727 10.192000389099121,-8.788999557495117 10.272000312805176,-7.749000072479248 C10.272000312805176,-7.749000072479248 10.281999588012695,-7.599999904632568 10.281999588012695,-7.599999904632568 C10.281999588012695,-7.599999904632568 10.281999588012695,8.399999618530273 10.281999588012695,8.399999618530273 C10.281999588012695,9.449999809265137 9.461999893188477,10.321000099182129 8.432000160217285,10.390999794006348 C8.432000160217285,10.390999794006348 8.281999588012695,10.399999618530273 8.281999588012695,10.399999618530273 C8.281999588012695,10.399999618530273 -7.7179999351501465,10.399999618530273 -7.7179999351501465,10.399999618530273 C-8.777999877929688,10.399999618530273 -9.637999534606934,9.581000328063965 -9.718000411987305,8.550999641418457 C-9.718000411987305,8.550999641418457 -9.718000411987305,8.399999618530273 -9.718000411987305,8.399999618530273 C-9.718000411987305,8.399999618530273 -9.718000411987305,4.400000095367432 -9.718000411987305,4.400000095367432 C-9.718000411987305,3.3399999141693115 -8.907999992370605,2.4800000190734863 -7.868000030517578,2.4000000953674316 C-7.868000030517578,2.4000000953674316 -7.7179999351501465,2.4000000953674316 -7.7179999351501465,2.4000000953674316 C-7.7179999351501465,2.4000000953674316 -3.138000011444092,2.4000000953674316 -3.138000011444092,2.4000000953674316 C-3.138000011444092,2.4000000953674316 -9.687999725341797,-4.159999847412109 -9.687999725341797,-4.159999847412109 C-10.477999687194824,-4.940000057220459 -10.477999687194824,-6.199999809265137 -9.687999725341797,-6.989999771118164 C-9.687999725341797,-6.989999771118164 -6.868000030517578,-9.809000015258789 -6.868000030517578,-9.809000015258789 C-6.078000068664551,-10.598999977111816 -4.817999839782715,-10.598999977111816 -4.038000106811523,-9.809000015258789z"></path></g><animate href="#myg" attributeName="opacity" to="0.8" dur="0.8s" begin="mySvg.mouseover"></animate><animateTransform id="#myg" attributeName="transform" type="translate" from="30.49 33.74" to="46 45" dur="0.8s" begin="mySvg.mouseover" calcMode="discrete"></animateTransform></g></g>',2)])))])}const W=N(q,[["render",O]]),F=["loadstart","play","pause","playing","seeking","seeked","canplay","waiting","durationchange","progress","timeupdate","ended","error","stalled"],j={width:{type:String,default:"800px"},height:{type:String,default:"450px"},color:{type:String,default:"#409eff"},src:{required:!0,type:String,default:""},title:{type:String,default:""},type:{type:String,default:"video/mp4"},poster:{type:String,default:""},webFullScreen:{type:Boolean,default:!1},speed:{type:Boolean,default:!0},currentTime:{type:Number,default:0},playsinline:{type:Boolean,default:!1},muted:{type:Boolean,default:!0},speedRate:{type:Array,default:()=>["2.0","1.5","1.25","1.0","0.75","0.5"]},autoPlay:{type:Boolean,default:!1},loop:{type:Boolean,default:!1},mirror:{type:Boolean,default:!1},lightOff:{type:Boolean,default:!1},volume:{type:Number,default:.3},control:{type:Boolean,default:!0},controlBtns:{type:Array,default:["audioTrack","quality","speedRate","volume","setting","pip","pageFullScreen","fullScreen"]},preload:{type:String,default:"auto"}},U=o=>`${parseInt("0x"+o.slice(1,3))},${parseInt("0x"+o.slice(3,5))},${parseInt("0x"+o.slice(5,7))}`,Z=o=>o.charAt(0).toUpperCase()+o.slice(1),X="ontouchstart"in window,z=o=>{let a=~~(o/3600),c=~~(o%3600/60),n=~~(o%60);return a=a<10?"0"+a:a,c=c<10?"0"+c:c,n=n<10?"0"+n:n,`${a}:${c}:${n}`},Y=o=>{document.pictureInPictureElement?document.exitPictureInPicture().catch(a=>{console.log(a,"Video failed to leave Picture-in-Picture mode.")}):o.requestPictureInPicture().catch(a=>{console.log(a,"Video failed to enter Picture-in-Picture mode.")})},G=o=>{let a=document,c=document.fullscreenElement;return c?(document.exitFullscreen||a.webkitExitFullScreen).call(a):o.requestFullscreen.call(o),!c},J=["xlink:href","fill"],L=N(e.defineComponent({__name:"SvgIcon",props:{prefix:{type:String,default:"#icon-"},name:String,color:{type:String},width:{type:String,default:"16px"},height:{type:String,default:"16px"},class:{type:String}},setup(o){return(a,c)=>(e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["icon",o.class]),style:e.normalizeStyle({width:o.width,height:o.height})},[e.createElementVNode("use",{"xlink:href":o.prefix+o.name,fill:o.color},null,8,J)],6))]))}}),[["__scopeId","data-v-e77fda1f"]]),K={key:0},Q={class:"mr5"},ee={class:"mr5"},te=N(e.defineComponent({__name:"Loading",props:{loadType:String,text:{type:String,default:""}},setup(o){const{proxy:a}=e.getCurrentInstance(),c=["loadstart","waiting","ended","error","stalled"],n=o,t=()=>{a.$parent.play()},u=e.computed(()=>{let l="background: rgba(0, 0, 0, .1);z-index:1";return n.loadType=="loadstart"&&(l="background: rgba(0, 0, 0, 1);;z-index:3"),l});return(l,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"loading",style:e.normalizeStyle(u.value)},[e.createElementVNode("div",null,[o.loadType=="loadstart"?(e.openBlock(),e.createElementBlock("span",K,[m[0]||(m[0]=e.createElementVNode("i",{class:"rotating iconfont icon-loading f50"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(o.text),1)])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("span",null,[e.createVNode(L,{color:"#fff",name:"loading",width:"40",height:"40",class:"rotating"}),m[1]||(m[1]=e.createElementVNode("p",{style:{"margin-top":"6px"}},"正在缓冲...",-1))],512),[[e.vShow,o.loadType=="waiting"]]),e.withDirectives(e.createElementVNode("span",null,[e.createElementVNode("p",{onClick:t,class:"d-flex-x d-pointer"},[e.createElementVNode("span",Q,[e.createVNode(L,{color:"#fff",name:"replay",width:"26",height:"26"}),m[2]||(m[2]=e.createTextVNode("重新播放 "))])])],512),[[e.vShow,o.loadType=="ended"]]),e.withDirectives(e.createElementVNode("span",null,[e.createElementVNode("p",{onClick:t,class:"d-flex-x d-pointer"},[e.createElementVNode("span",ee,[e.createVNode(L,{color:"#fff",name:"replay",width:"26",height:"26"}),m[3]||(m[3]=e.createTextVNode(" 请求错误 "))])])],512),[[e.vShow,o.loadType=="error"||o.loadType=="stalled"]])])],4)),[[e.vShow,c.includes(o.loadType)]])}}),[["__scopeId","data-v-139d9272"]]),$=function(o,a,c,n=!1){o&&a&&c&&o.addEventListener(a,c,n)},P=function(o,a,c,n=!1){o&&a&&c&&o.removeEventListener(a,c,n)},I=N(e.defineComponent({__name:"ProgressBar",props:{modelValue:{required:!0,type:Number,default:0},disabled:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},hover:{type:Boolean,default:!0},hoverText:{type:String,default:""},preload:{type:Number,default:0},size:{type:String,default:"10px"}},emits:["update:modelValue","change","onMousemove"],setup(o,{emit:a}){e.useCssVars(s=>({f07c1458:o.size}));const c=e.ref(),n=e.ref(),t=o,u=a,l=e.reactive({dragging:!1,mousePosition:0,hoverTipsPos:"50%"}),m=e.computed(()=>{let s=t.modelValue<0?0:t.modelValue>1?1:t.modelValue;return t.vertical?`height:${s*100}%`:`width:${s*100}%`}),f=e.computed(()=>{let s=t.preload<0?0:t.preload>1?1:t.preload;return t.vertical?`height:${s*100}%`:`width:${s*100}%`}),d=e.computed(()=>{let s=l.mousePosition<0?0:l.mousePosition>1?1:l.mousePosition;return t.vertical?`bottom:${s*100}%`:`left:${s*100}%`}),w=s=>{s.preventDefault()},k=s=>{console.log("鼠标按下了"),!t.disabled&&(s.preventDefault(),l.dragging=!0,E(s),$(window,"mousemove",x),$(window,"touchmove",x),$(window,"mouseup",h),$(window,"touchend",h))},_=s=>{if(!t.hover)return;let p=T(s);if(u("onMousemove",s,p),l.mousePosition=p,t.vertical)return;let g=c.value,C=n.value.clientWidth/2,V=s.clientX-g.getBoundingClientRect().left;V<C?(console.log("11"),l.hoverTipsPos=C-V+"px"):g.clientWidth-V<C?(console.log("22"),l.hoverTipsPos=g.clientWidth-V-C+"px"):l.hoverTipsPos="50%"},E=s=>{let p=T(s);u("update:modelValue",p),u("change",s,p)},T=s=>{let p=c.value,g=0;if(t.vertical){let C=p.clientHeight;g=(p.getBoundingClientRect().bottom-s.clientY)/C}else g=(s.clientX-p.getBoundingClientRect().left)/p.clientWidth;return g<0?0:g>1?1:g},x=s=>{E(s)},h=s=>{l.dragging&&(P(window,"mousemove",x),P(window,"touchmove",x),P(window,"mouseup",h),P(window,"touchend",h),P(window,"contextmenu",h),setTimeout(()=>{l.dragging=!1},0))};return(s,p)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"refProgress",ref:c,class:e.normalizeClass(["progress",{"is-vertical":t.vertical}]),onMousedown:e.withModifiers(k,["stop"]),onContextmenu:w},[e.createElementVNode("div",{class:"progress__runway",onMousemove:_},[e.withDirectives(e.createElementVNode("div",{class:"progress__cursor",style:e.normalizeStyle(d.value)},[e.withDirectives(e.createElementVNode("div",{class:"progress__tips",ref_key:"refTips",ref:n,style:e.normalizeStyle({left:l.hoverTipsPos})},e.toDisplayString(o.hoverText),5),[[e.vShow,t.hoverText]])],4),[[e.vShow,o.hover]]),e.createElementVNode("div",{class:"progress__preload",style:e.normalizeStyle(f.value)},null,4),e.createElementVNode("div",{class:"progress__bar",style:e.normalizeStyle(m.value)},null,4)],32)],34))}}),[["__scopeId","data-v-87b818ab"]]);function oe(o,a,c){var n=c||{},t=n.noTrailing,u=t===void 0?!1:t,l=n.noLeading,m=l===void 0?!1:l,f=n.debounceMode,d=f===void 0?void 0:f,w,k=!1,_=0;function E(){w&&clearTimeout(w)}function T(h){var s=h||{},p=s.upcomingOnly,g=p===void 0?!1:p;E(),k=!g}function x(){for(var h=arguments.length,s=new Array(h),p=0;p<h;p++)s[p]=arguments[p];var g=this,C=Date.now()-_;if(k)return;function V(){_=Date.now(),a.apply(g,s)}function v(){w=void 0}!m&&d&&!w&&V(),E(),d===void 0&&C>o?m?(_=Date.now(),u||(w=setTimeout(d?v:V,o))):V():u!==!0&&(w=setTimeout(d?v:V,d===void 0?o-C:o))}return x.cancel=T,x}function le(o,a,c){var n={},t=n.atBegin,u=t===void 0?!1:t;return oe(o,a,{debounceMode:u!==!1})}const ne=["checked"],D=N(e.defineComponent({__name:"Switch",props:{modelValue:{type:[Number,String,Boolean]},width:{type:String,default:"40px"},trueValue:{type:[Number,String,Boolean],default:!0},falseValue:{type:[Number,String,Boolean],default:!0},activeColor:{type:[String],default:"#409EFF"}},emits:["update:modelValue","change"],setup(o,{emit:a}){e.useCssVars(m=>({cb3ceaa8:o.width,"1150cc63":o.activeColor}));const c=o,n=a,t=e.ref(),u=e.computed(()=>c.modelValue===c.trueValue),l=m=>{e.nextTick(()=>{const f=m.target.checked;n("update:modelValue",f),n("change",f)})};return(m,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["switch",{"is-checked":u.value}])},[e.createElementVNode("input",{type:"checkbox",class:"switch_input",ref_key:"input",ref:t,checked:u.value,onChange:f[0]||(f[0]=d=>l(d))},null,40,ne),f[1]||(f[1]=e.createElementVNode("span",{class:"switch_action"},null,-1))],2))}}),[["__scopeId","data-v-059db622"]]),ae={class:"Player",id:"PlayerVideo"},re=["src","loop","poster","volume","muted"],ie={class:"player-state"},se={class:"play-btn"},ce={class:"player-control",ref:"refPlayerControl"},de={class:"control-progress"},pe={class:"tool-bar"},me={class:"tool-item tool-time audioTrack-btn"},ue={class:"total-time"},fe={class:"tool-bar"},ge={key:0,class:"tool-item speedRate-btn"},ye={class:"tool-item-main"},he={class:"speed-main"},Ce=["onClick"],Ve={key:1,class:"tool-item volume-btn"},Se={class:"tool-item-main volume-box",style:{width:"52px"}},we={class:"volume-text-size"},xe={class:"tool-item setting-btn"},Ne={class:"biggerScaleAni"},_e={class:"tool-item-main"},Ee={class:"speed-main"},Be={class:"biggerAni"},ke=e.defineComponent({__name:"Main",props:j,emits:[...F,"mirrorChange","loopChange","lightOffChange"],setup(o,{expose:a,emit:c}){e.useCssVars(i=>({"2011da3e":e.unref(V),"224f4e1e":i.width,"0dcb7bcf":i.height}));const n=o,t=e.reactive({Video:null,...n,muted:n.muted,playBtnState:n.autoPlay?"pause":"play",loadStateType:"loadstart",fullScreen:!1,handleType:"",currentTime:"00:00:00",preloadBar:0,totalTime:"00:00:00",isVideoHovering:!0,speedActive:"1.0",playProgress:0,isMultiplesPlay:!1,longPressTimeout:null,progressCursorTime:"00:00:00",qualityLevels:[],currentLevel:0}),u=c,l=e.ref(),m=e.ref(),f=(...i)=>r=>i.reverse().reduce((y,B)=>B(y),r),d=F.reduce((i,r)=>{let y=`on${Z(r)}`;return i[y]=B=>{t.loadStateType=r,u(r,B)},i},{});d.onCanplay=f(d.onCanplay,()=>{t.playBtnState!="play"&&(console.log(l.value),l.value.play()),t.autoPlay&&(l.value.play(),t.playBtnState="pause")}),d.onDurationchange=i=>{u("durationchange",i),console.log("资源长度"),n.currentTime!=0&&(l.value.currentTime=n.currentTime),d.onTimeupdate(i)},d.onEnded=f(d.onEnded,()=>{t.playBtnState="replay"}),d.onError=f(d.onError,()=>{t.playBtnState="replay"}),d.onProgress=i=>{u("progress",i);let r=i.target.duration,y=i.target.buffered,B=i.target.buffered.length&&i.target.buffered.end(y-1);t.preloadBar=B/r};const w=(i,r)=>{let y=l.value.duration||l.value.target.duration;l.value.currentTime=y*r,t.playBtnState=="play"&&(l.value.play(),t.playBtnState="pause")},k=(i,r)=>{t.progressCursorTime=z(l.value.duration*r)},_=le(2500,()=>{t.isVideoHovering=!1}),E=i=>{t.isVideoHovering=!0,_()},T=()=>{},x=i=>{t.speedActive=i,l.value.playbackRate=i},h=i=>{u("loopChange",i,l.value)},s=()=>{Y(l.value)},p=()=>{t.fullScreen=G(m.value)},g=()=>{t.muted=!t.muted,t.volume==0&&(t.volume=.05)};d.onTimeupdate=i=>{u("timeupdate",i);let r=i.duration||i.target.duration||0,y=i.currentTime||i.target.currentTime;t.playProgress=y/r,t.currentTime=z(y),t.totalTime=z(r)};const C=()=>{l.value.canPlayType(n.type)||console.error("vue3-video-play: Format not supported,Check the [type] parameter"),(l.value.canPlayType(n.type)||l.value.canPlayType("application/vnd.apple.mpegurl"))&&(console.log("ccccc"),t.muted=n.autoPlay)};e.watch(()=>n.src,i=>{e.nextTick(()=>{console.log(i,"scr"),C()})},{immediate:!0});const V=U(t.color),v=()=>{console.log(n.controlBtns.includes("volume"),"vol"),t.loadStateType="play",l.value.play().catch(()=>{l.value.load(),console.log(l.value.readyState,"readysat."),console.log(l.value.networkState,"netwoir"),l.value.readyState&&setTimeout(()=>{l.value.play().catch(()=>{console.log(l.value.readyState),t.playBtnState="replay",t.loadStateType="error"})},200)}),t.playBtnState="pause",console.log(t.loadStateType,"state")},H=()=>{l.value.pause(),t.playBtnState="play"},M=i=>{i&&i.preventDefault(),console.log(l.value.src),t.playBtnState=="play"||t.playBtnState=="replay"?v():t.playBtnState=="pause"&&H()};return e.onMounted(()=>{t.Video=l.value}),a({play:v,pause:H,togglePlay:M}),(i,r)=>{const y=e.resolveComponent("SvgIcon"),B=e.resolveComponent("Icon");return e.openBlock(),e.createElementBlock("div",{ref_key:"playerWrap",ref:m,id:"playerWrap",class:e.normalizeClass(["player-wrap",{"web-full-screen":t.webFullScreen,"is-lightoff":t.lightOff,"player-wrap-hover":t.playBtnState=="play"||t.isVideoHovering}]),onMousemove:E},[e.createElementVNode("div",ae,[e.createElementVNode("video",e.mergeProps({width:"100%",height:"100%",src:i.src,ref_key:"v",ref:l},e.unref(d),{class:"Player-video",id:"v",loop:t.loop,poster:i.poster,volume:t.volume,muted:t.muted,fill:"cover"})," 您的浏览器不支持Video标签。 ",16,re)]),e.createElementVNode("div",ie,[e.createVNode(e.Transition,{name:"scale-out"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",se,[e.createVNode(y,{color:"#fff",name:"play",width:"40",height:"40"})],512),[[e.vShow,t.playBtnState=="play"]])]),_:1})]),e.createElementVNode("input",{readonly:!0,type:"input",onClick:M,class:"player-input",maxlength:"0"}),e.createVNode(te,{loadType:t.loadStateType},null,8,["loadType"]),e.createElementVNode("div",ce,[e.createElementVNode("div",de,[e.createVNode(I,{class:"progress-bar",onOnMousemove:k,onChange:w,modelValue:t.playProgress,"onUpdate:modelValue":r[0]||(r[0]=S=>t.playProgress=S),preload:t.preloadBar,hoverText:t.progressCursorTime},null,8,["modelValue","preload","hoverText"])]),e.createElementVNode("div",{class:"control-tool",onClick:T},[e.createElementVNode("div",pe,[e.createElementVNode("div",{class:"tool-item",onClick:M},[e.createVNode(B,{size:"24",icon:`icon-${t.playBtnState}`},null,8,["icon"])]),e.createElementVNode("div",me,[e.createElementVNode("span",null,e.toDisplayString(t.currentTime),1),r[5]||(r[5]=e.createElementVNode("span",{style:{margin:"0 3px"}},"/",-1)),e.createElementVNode("span",ue,e.toDisplayString(t.totalTime),1)])]),e.createElementVNode("div",fe,[r[12]||(r[12]=e.createElementVNode("div",{class:"tool-item quality-btn"},[e.createElementVNode("div",{class:"tool-item-main"},[e.createElementVNode("ul",{class:"speed-main",style:{"text-align":"center"}},[e.createElementVNode("li")])])],-1)),n.controlBtns.includes("speedRate")?(e.openBlock(),e.createElementBlock("div",ge,[e.createTextVNode(e.toDisplayString(t.speedActive=="1.0"?"倍速":t.speedActive+"x")+" ",1),e.createElementVNode("div",ye,[e.createElementVNode("ul",he,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.speedRate,S=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass({"speed-active":t.speedActive==S}),onClick:Fe=>x(S)},e.toDisplayString(S)+"X ",11,Ce))),256))])])])):e.createCommentVNode("",!0),n.controlBtns.includes("volume")?(e.openBlock(),e.createElementBlock("div",Ve,[e.createElementVNode("div",Se,[e.createElementVNode("div",{class:e.normalizeClass(["volume-main",{"is-muted":t.muted}])},[e.createElementVNode("span",we,e.toDisplayString(t.muted?0:~~(t.volume*100))+"% ",1),e.createVNode(I,{onChange:r[1]||(r[1]=S=>t.muted=!1),hover:!1,size:"5px",vertical:!0,modelValue:t.volume,"onUpdate:modelValue":r[2]||(r[2]=S=>t.volume=S)},null,8,["modelValue"])],2)]),e.createElementVNode("span",{onClick:g,class:"biggerAni",style:{display:"flex"}},[e.createVNode(y,{name:`volume-${t.volume==0||t.muted?"mute":t.volume>.5?"up":"down"}`,width:"25",height:"25",color:"#fff"},null,8,["name"])])])):e.createCommentVNode("",!0),e.createElementVNode("div",xe,[e.createElementVNode("span",Ne,[e.createVNode(y,{name:"shezhi",width:"22",height:"22",color:"#fff"})]),e.createElementVNode("div",_e,[e.createElementVNode("ul",Ee,[e.createElementVNode("li",null,[r[6]||(r[6]=e.createTextVNode(" 镜像画面 ")),e.createVNode(D)]),e.createElementVNode("li",null,[r[7]||(r[7]=e.createTextVNode(" 循环播放 ")),e.createVNode(D,{onChange:h,modelValue:t.loop,"onUpdate:modelValue":r[3]||(r[3]=S=>t.loop=S)},null,8,["modelValue"])]),e.createElementVNode("li",null,[r[8]||(r[8]=e.createTextVNode("关灯模式")),e.createVNode(D)])])])]),n.controlBtns.includes("pip")?(e.openBlock(),e.createElementBlock("div",{key:2,class:"tool-item pip-btn",onClick:s},[e.createVNode(W,{class:"biggerAni",style:{position:"relative",top:"2px"}}),r[9]||(r[9]=e.createElementVNode("div",{class:"tool-item-main"},"画中画",-1))])):e.createCommentVNode("",!0),n.controlBtns.includes("pageFullScreen")?(e.openBlock(),e.createElementBlock("div",{key:3,class:"tool-item pip-btn",onClick:r[4]||(r[4]=S=>t.webFullScreen=!t.webFullScreen)},r[10]||(r[10]=[e.createElementVNode("img",{width:"20px",height:"20px",class:"webfullscreen-icon biggerAni",src:b,alt:""},null,-1),e.createElementVNode("div",{class:"tool-item-main"},"网页全屏",-1)]))):e.createCommentVNode("",!0),n.controlBtns.includes("fullScreen")?(e.openBlock(),e.createElementBlock("div",{key:4,class:"tool-item fullScreen-btn",onClick:p},[r[11]||(r[11]=e.createElementVNode("div",{class:"tool-item-main"},"全屏",-1)),e.createElementVNode("span",Be,[e.createVNode(y,{name:"fullscreen",width:"20",height:"20",color:"#fff"})])])):e.createCommentVNode("",!0)])])],512)],34)}}}),A={Main:N(ke,[["__scopeId","data-v-02a06568"]]),SvgIcon:L,Icon:N(Object.assign({name:"icon"},{props:{icon:String,size:[Number,String]},setup(o){const a=o,c=e.computed(()=>({fontSize:/^\d+$/.test(a.size)?a.size+"px":a.size}));return(n,t)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["icon iconfont",o.icon]),style:e.normalizeStyle(c.value)},null,6))}}),[["__scopeId","data-v-7d306b2a"]])};return{install(o){Object.keys(A).forEach(a=>{o.component(a,A[a])})}}});
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vue-video-plus",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/vueVideo-es.js",
|
|
7
|
+
"style":"dist/style.css",
|
|
8
|
+
"files": ["dist"],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "vite",
|
|
11
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
|
12
|
+
"preview": "vite preview",
|
|
13
|
+
"build-only": "vite build",
|
|
14
|
+
"type-check": "vue-tsc --build --force",
|
|
15
|
+
"build:lib":"vite build --config ./build/lib.config.ts"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"svg-icon-yyx": "^1.2.1",
|
|
19
|
+
"throttle-debounce": "^5.0.2",
|
|
20
|
+
"vue": "^3.5.12"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@tsconfig/node20": "^20.1.4",
|
|
24
|
+
"@types/node": "^20.17.0",
|
|
25
|
+
"@types/throttle-debounce": "^5.0.2",
|
|
26
|
+
"@vitejs/plugin-vue": "^5.1.4",
|
|
27
|
+
"@vue/tsconfig": "^0.5.1",
|
|
28
|
+
"less": "^4.2.0",
|
|
29
|
+
"npm-run-all2": "^7.0.1",
|
|
30
|
+
"typescript": "~5.6.0",
|
|
31
|
+
"vite": "^5.4.10",
|
|
32
|
+
"vue-tsc": "^2.1.6"
|
|
33
|
+
}
|
|
34
|
+
}
|