@lazycatcloud/lzc-video-player 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Spectrum/index.vue.d.ts +1 -31
- package/dist/components/Video/index.vue.d.ts +2 -0
- package/dist/{index-horizontal.4350090a.js → index-horizontal.a3f55bc6.js} +2 -2
- package/dist/{index-vertical.4c7b466b.js → index-vertical.3c29efab.js} +2 -2
- package/dist/list.482f9b94.js +160 -0
- package/dist/{lzc-video-player.47190826.js → lzc-video-player.72f780fe.js} +18 -18
- package/dist/lzc-video-player.js +2 -2
- package/dist/{playrate.b2b089b8.js → playrate.3f895ad0.js} +2 -2
- package/dist/{resolution.2163011d.js → resolution.8097124b.js} +2 -2
- package/dist/{simpleList.4d06b064.js → simpleList.e26862da.js} +1 -1
- package/dist/use/useUtils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/list.7099181d.js +0 -173
|
@@ -1,32 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
height: {
|
|
3
|
-
type: import("vue").PropType<string>;
|
|
4
|
-
default: string;
|
|
5
|
-
};
|
|
6
|
-
width: {
|
|
7
|
-
type: import("vue").PropType<string>;
|
|
8
|
-
default: string;
|
|
9
|
-
};
|
|
10
|
-
gap: {
|
|
11
|
-
type: import("vue").PropType<string>;
|
|
12
|
-
default: string;
|
|
13
|
-
};
|
|
14
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
-
height: {
|
|
16
|
-
type: import("vue").PropType<string>;
|
|
17
|
-
default: string;
|
|
18
|
-
};
|
|
19
|
-
width: {
|
|
20
|
-
type: import("vue").PropType<string>;
|
|
21
|
-
default: string;
|
|
22
|
-
};
|
|
23
|
-
gap: {
|
|
24
|
-
type: import("vue").PropType<string>;
|
|
25
|
-
default: string;
|
|
26
|
-
};
|
|
27
|
-
}>>, {
|
|
28
|
-
height: string;
|
|
29
|
-
width: string;
|
|
30
|
-
gap: string;
|
|
31
|
-
}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
32
2
|
export default _default;
|
|
@@ -7,6 +7,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7
7
|
};
|
|
8
8
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
back: () => void;
|
|
10
|
+
controlBarActive: (show: boolean) => void;
|
|
10
11
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
12
|
onInit: {
|
|
12
13
|
type: import("vue").PropType<(player: import("video.js").VideoJsPlayer) => void>;
|
|
@@ -16,5 +17,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
16
17
|
};
|
|
17
18
|
}>> & {
|
|
18
19
|
onBack?: (() => any) | undefined;
|
|
20
|
+
onControlBarActive?: ((show: boolean) => any) | undefined;
|
|
19
21
|
}, {}>;
|
|
20
22
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as i, defineAsyncComponent as o, openBlock as t, createElementBlock as p, unref as e, createBlock as l, createCommentVNode as y } from "vue";
|
|
2
|
-
import { a as n, _ } from "./lzc-video-player.
|
|
2
|
+
import { a as n, _ } from "./lzc-video-player.72f780fe.js";
|
|
3
3
|
import "pinia";
|
|
4
4
|
const m = { class: "modal-content" }, u = /* @__PURE__ */ i({
|
|
5
5
|
__name: "index-horizontal",
|
|
@@ -7,7 +7,7 @@ const m = { class: "modal-content" }, u = /* @__PURE__ */ i({
|
|
|
7
7
|
player: null
|
|
8
8
|
},
|
|
9
9
|
setup(a) {
|
|
10
|
-
const r = o(() => import("./list.
|
|
10
|
+
const r = o(() => import("./list.482f9b94.js")), s = o(() => import("./playrate.3f895ad0.js")), c = o(() => import("./resolution.8097124b.js"));
|
|
11
11
|
return (d, f) => (t(), p("div", m, [
|
|
12
12
|
e(n) === "LzcPlayrate" ? (t(), l(e(s), {
|
|
13
13
|
key: 0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, defineAsyncComponent as l, openBlock as t, createElementBlock as s, unref as e, createBlock as n, createCommentVNode as y } from "vue";
|
|
2
|
-
import { a as o, _ } from "./lzc-video-player.
|
|
2
|
+
import { a as o, _ } from "./lzc-video-player.72f780fe.js";
|
|
3
3
|
import "pinia";
|
|
4
4
|
const m = { class: "modal-content" }, d = /* @__PURE__ */ p({
|
|
5
5
|
__name: "index-vertical",
|
|
@@ -7,7 +7,7 @@ const m = { class: "modal-content" }, d = /* @__PURE__ */ p({
|
|
|
7
7
|
player: null
|
|
8
8
|
},
|
|
9
9
|
setup(a) {
|
|
10
|
-
const r = l(() => import("./list.
|
|
10
|
+
const r = l(() => import("./list.482f9b94.js")), c = l(() => import("./playrate.3f895ad0.js")), i = l(() => import("./resolution.8097124b.js"));
|
|
11
11
|
return (u, f) => (t(), s("div", m, [
|
|
12
12
|
e(o) === "LzcPlayrate" ? (t(), n(e(c), {
|
|
13
13
|
key: 0,
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { openBlock as c, createElementBlock as a, createElementVNode as t, renderSlot as b, withModifiers as A, pushScopeId as S, popScopeId as E, defineComponent as V, useCssVars as w, unref as u, ref as N, onMounted as Q, nextTick as U, createVNode as d, createTextVNode as _, withCtx as p, Fragment as g, renderList as H, createBlock as h, normalizeClass as $, toDisplayString as y, createCommentVNode as O } from "vue";
|
|
2
|
+
import { _ as f, E as C, u as q, r as L, Q as I, b as M, c as z, f as B, g as j } from "./lzc-video-player.72f780fe.js";
|
|
3
|
+
import "pinia";
|
|
4
|
+
const G = {}, J = { class: "container" }, K = { class: "content" };
|
|
5
|
+
function R(s, i) {
|
|
6
|
+
return c(), a("div", J, [
|
|
7
|
+
t("div", K, [
|
|
8
|
+
b(s.$slots, "default", {}, void 0, !0)
|
|
9
|
+
]),
|
|
10
|
+
t("div", {
|
|
11
|
+
class: "right",
|
|
12
|
+
onClick: i[0] || (i[0] = A(() => {
|
|
13
|
+
}, ["stop", "prevent"]))
|
|
14
|
+
}, [
|
|
15
|
+
b(s.$slots, "right", {}, void 0, !0)
|
|
16
|
+
])
|
|
17
|
+
]);
|
|
18
|
+
}
|
|
19
|
+
const W = /* @__PURE__ */ f(G, [["render", R], ["__scopeId", "data-v-5b362d85"]]);
|
|
20
|
+
const X = {}, Y = (s) => (S("data-v-7a0e044b"), s = s(), E(), s), Z = /* @__PURE__ */ Y(() => /* @__PURE__ */ t("ul", null, [
|
|
21
|
+
/* @__PURE__ */ t("li", { class: "m1" }),
|
|
22
|
+
/* @__PURE__ */ t("li", { class: "m2" }),
|
|
23
|
+
/* @__PURE__ */ t("li", { class: "m3" })
|
|
24
|
+
], -1)), ee = [
|
|
25
|
+
Z
|
|
26
|
+
];
|
|
27
|
+
function te(s, i) {
|
|
28
|
+
return c(), a("div", null, ee);
|
|
29
|
+
}
|
|
30
|
+
const se = /* @__PURE__ */ f(X, [["render", te], ["__scopeId", "data-v-7a0e044b"]]), m = (s) => (S("data-v-3bd476a8"), s = s(), E(), s), ne = { class: "list" }, ie = { class: "list-top-bar" }, ce = /* @__PURE__ */ m(() => /* @__PURE__ */ t("span", { class: "title" }, "\u64AD\u653E\u5217\u8868", -1)), oe = ["onClick"], re = /* @__PURE__ */ m(() => /* @__PURE__ */ t("span", { class: "delete-separator" }, null, -1)), ae = /* @__PURE__ */ m(() => /* @__PURE__ */ t("span", { class: "delete-text" }, "\u5220\u9664", -1)), le = [
|
|
31
|
+
re,
|
|
32
|
+
ae
|
|
33
|
+
], ue = { class: "item" }, de = { class: "item-pic" }, _e = { class: "item-info" }, pe = { class: "item-info-title" }, me = { class: "item-info-subtitle" }, ve = {
|
|
34
|
+
key: 1,
|
|
35
|
+
class: "empty-text"
|
|
36
|
+
}, ge = /* @__PURE__ */ m(() => /* @__PURE__ */ t("span", null, "\u6682\u65E0\u64AD\u653E\u5185\u5BB9", -1)), ye = [
|
|
37
|
+
ge
|
|
38
|
+
], he = /* @__PURE__ */ V({
|
|
39
|
+
__name: "index",
|
|
40
|
+
props: {
|
|
41
|
+
isPlaying: null
|
|
42
|
+
},
|
|
43
|
+
emits: ["openVideo", "back"],
|
|
44
|
+
setup(s, { emit: i }) {
|
|
45
|
+
const l = s;
|
|
46
|
+
w((e) => ({
|
|
47
|
+
"1236eaa0": "url(" + u(C) + ")"
|
|
48
|
+
}));
|
|
49
|
+
const r = q(), v = (e) => e._id ? j(e._id) : C, o = N(null);
|
|
50
|
+
function k(e) {
|
|
51
|
+
i("openVideo", e);
|
|
52
|
+
}
|
|
53
|
+
function P(e) {
|
|
54
|
+
r.deleteHistory(e), l.isPlaying(e) && i("back");
|
|
55
|
+
}
|
|
56
|
+
function T(e) {
|
|
57
|
+
return !e.duration || e.duration == 0 || !e.currentTime || e.currentTime == 0 ? "0" : (e.currentTime / e.duration * 100).toFixed(0);
|
|
58
|
+
}
|
|
59
|
+
function D(e) {
|
|
60
|
+
return !e.invalid && l.isPlaying(e) ? `\u6B63\u5728\u89C2\u770B\uFF1A${B(e.currentTime)}` : `\u89C2\u770B\u81F3: ${T(e)}%`;
|
|
61
|
+
}
|
|
62
|
+
return Q(() => {
|
|
63
|
+
const e = r.infos.findIndex(l.isPlaying);
|
|
64
|
+
e > -1 && U(() => {
|
|
65
|
+
o.value && o.value.$el.scrollBy(0, L(9.4) * e);
|
|
66
|
+
});
|
|
67
|
+
}), (e, x) => (c(), a("div", ne, [
|
|
68
|
+
t("div", ie, [
|
|
69
|
+
ce,
|
|
70
|
+
t("div", {
|
|
71
|
+
class: "clear",
|
|
72
|
+
onClick: x[0] || (x[0] = (n) => u(r).clear())
|
|
73
|
+
}, [
|
|
74
|
+
d(I, { name: "svguse:#icon-\u56DE\u6536\u7AD9.svg" }),
|
|
75
|
+
_(" \u6E05\u7A7A ")
|
|
76
|
+
])
|
|
77
|
+
]),
|
|
78
|
+
d(M, {
|
|
79
|
+
class: "list-items",
|
|
80
|
+
ref_key: "qlist",
|
|
81
|
+
ref: o
|
|
82
|
+
}, {
|
|
83
|
+
default: p(() => [
|
|
84
|
+
u(r).infos.length > 0 ? (c(!0), a(g, { key: 0 }, H(u(r).infos, (n) => (c(), h(W, {
|
|
85
|
+
key: n.sourceUrl,
|
|
86
|
+
onClick: (F) => k(n),
|
|
87
|
+
class: $(["slide-item", { active: s.isPlaying(n) }])
|
|
88
|
+
}, {
|
|
89
|
+
right: p(() => [
|
|
90
|
+
t("div", {
|
|
91
|
+
class: "delete-area",
|
|
92
|
+
onClick: (F) => P(n)
|
|
93
|
+
}, le, 8, oe)
|
|
94
|
+
]),
|
|
95
|
+
default: p(() => [
|
|
96
|
+
t("div", ue, [
|
|
97
|
+
t("div", de, [
|
|
98
|
+
d(z, {
|
|
99
|
+
fit: "fill",
|
|
100
|
+
src: v(n),
|
|
101
|
+
"no-spinner": ""
|
|
102
|
+
}, {
|
|
103
|
+
default: p(() => [
|
|
104
|
+
t("div", {
|
|
105
|
+
class: $(["absolute-bottom-right text-subtitle2 item-subtitle", { "item-invalid": n.invalid }])
|
|
106
|
+
}, [
|
|
107
|
+
n.invalid ? (c(), a(g, { key: 0 }, [
|
|
108
|
+
d(I, { name: "svguse:#icon-\u5931\u6548.svg" }),
|
|
109
|
+
_(" \u5DF2\u5931\u6548 ")
|
|
110
|
+
], 64)) : (c(), a(g, { key: 1 }, [
|
|
111
|
+
_(y(u(B)(n.duration)), 1)
|
|
112
|
+
], 64))
|
|
113
|
+
], 2)
|
|
114
|
+
]),
|
|
115
|
+
_: 2
|
|
116
|
+
}, 1032, ["src"])
|
|
117
|
+
]),
|
|
118
|
+
t("div", _e, [
|
|
119
|
+
t("div", pe, y(n.name || n.sourceUrl), 1),
|
|
120
|
+
t("div", me, [
|
|
121
|
+
!n.invalid && s.isPlaying(n) ? (c(), h(se, { key: 0 })) : O("", !0),
|
|
122
|
+
_(" " + y(D(n)), 1)
|
|
123
|
+
])
|
|
124
|
+
])
|
|
125
|
+
])
|
|
126
|
+
]),
|
|
127
|
+
_: 2
|
|
128
|
+
}, 1032, ["onClick", "class"]))), 128)) : (c(), a("div", ve, ye))
|
|
129
|
+
]),
|
|
130
|
+
_: 1
|
|
131
|
+
}, 512)
|
|
132
|
+
]));
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
const fe = /* @__PURE__ */ f(he, [["__scopeId", "data-v-3bd476a8"]]), $e = /* @__PURE__ */ V({
|
|
136
|
+
__name: "list",
|
|
137
|
+
props: {
|
|
138
|
+
player: null
|
|
139
|
+
},
|
|
140
|
+
setup(s) {
|
|
141
|
+
const i = s;
|
|
142
|
+
function l(o) {
|
|
143
|
+
return o.sourceUrl === i.player.currentSrc();
|
|
144
|
+
}
|
|
145
|
+
function r() {
|
|
146
|
+
i.player.trigger({ type: "back" });
|
|
147
|
+
}
|
|
148
|
+
function v(o) {
|
|
149
|
+
i.player.trigger({ type: "openVideo", info: o });
|
|
150
|
+
}
|
|
151
|
+
return (o, k) => (c(), h(fe, {
|
|
152
|
+
isPlaying: l,
|
|
153
|
+
onBack: r,
|
|
154
|
+
onOpenVideo: v
|
|
155
|
+
}));
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
export {
|
|
159
|
+
$e as default
|
|
160
|
+
};
|
|
@@ -24459,9 +24459,9 @@ const _hoisted_1$6 = ["onClick"], _sfc_main$8 = /* @__PURE__ */ defineComponent(
|
|
|
24459
24459
|
},
|
|
24460
24460
|
setup(e) {
|
|
24461
24461
|
const t = e, n = defineAsyncComponent(
|
|
24462
|
-
() => import("./index-vertical.
|
|
24462
|
+
() => import("./index-vertical.3c29efab.js")
|
|
24463
24463
|
), a = defineAsyncComponent(
|
|
24464
|
-
() => import("./index-horizontal.
|
|
24464
|
+
() => import("./index-horizontal.a3f55bc6.js")
|
|
24465
24465
|
), r = () => {
|
|
24466
24466
|
t.modal.opened() && (activePage.value = "", t.modal.close());
|
|
24467
24467
|
};
|
|
@@ -57040,14 +57040,8 @@ function useRefresh() {
|
|
|
57040
57040
|
async function n() {
|
|
57041
57041
|
if (!t)
|
|
57042
57042
|
try {
|
|
57043
|
-
|
|
57044
|
-
|
|
57045
|
-
return;
|
|
57046
|
-
const s = devices.value.findIndex(
|
|
57047
|
-
(u) => u.uuid == o.uuid
|
|
57048
|
-
);
|
|
57049
|
-
s > -1 ? o.name === o.uuid ? devices.value.splice(s, 1) : devices.value.splice(s, 1, o) : o.name !== o.uuid && devices.value.push(o);
|
|
57050
|
-
});
|
|
57043
|
+
const r = await lzcApi.rmp.ScanRMP({});
|
|
57044
|
+
devices.value = r.remoteMediaPlayers;
|
|
57051
57045
|
} finally {
|
|
57052
57046
|
e = setTimeout(() => {
|
|
57053
57047
|
e && clearTimeout(e), n();
|
|
@@ -57389,17 +57383,23 @@ const _withScopeId$2 = (e) => (pushScopeId("data-v-04ecdf3e"), e = e(), popScope
|
|
|
57389
57383
|
createVNode(QIcon, {
|
|
57390
57384
|
onClick: n,
|
|
57391
57385
|
name: "svguse:#icon-\u5168\u5C4F.svg",
|
|
57392
|
-
size: "
|
|
57386
|
+
size: "24px"
|
|
57393
57387
|
}),
|
|
57394
57388
|
unref(devices).length >= 0 ? (openBlock(), createBlock(QIcon, {
|
|
57395
57389
|
key: 0,
|
|
57396
57390
|
onClick: r,
|
|
57397
57391
|
name: "svguse:#icon-\u6295\u5C4F.svg",
|
|
57398
|
-
size: "
|
|
57392
|
+
size: "24px"
|
|
57399
57393
|
})) : createCommentVNode("", !0)
|
|
57400
57394
|
], 64));
|
|
57401
57395
|
}
|
|
57402
|
-
})
|
|
57396
|
+
});
|
|
57397
|
+
function isMobile() {
|
|
57398
|
+
return navigator.userAgent.search(
|
|
57399
|
+
/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
|
|
57400
|
+
) > -1;
|
|
57401
|
+
}
|
|
57402
|
+
const _withScopeId$1 = (e) => (pushScopeId("data-v-c30249df"), e = e(), popScopeId(), e), _hoisted_1$4 = { class: "overlay" }, _hoisted_2$2 = {
|
|
57403
57403
|
key: 0,
|
|
57404
57404
|
class: "vjs-overlay-padding top-space"
|
|
57405
57405
|
}, _hoisted_3$2 = { class: "title" }, _hoisted_4$2 = { class: "overlay-center" }, _hoisted_5$2 = {
|
|
@@ -57415,13 +57415,13 @@ const _withScopeId$2 = (e) => (pushScopeId("data-v-04ecdf3e"), e = e(), popScope
|
|
|
57415
57415
|
t.player.trigger({ type: "back" });
|
|
57416
57416
|
}, { videoName: a } = useVideoName(t.player), r = ref(t.player.options_.showTopBar);
|
|
57417
57417
|
return window.document.addEventListener("fullscreenchange", () => {
|
|
57418
|
-
t.player.isFullscreen() ? r.value =
|
|
57418
|
+
t.player.isFullscreen() ? r.value = isMobile() : r.value = t.player.options_.showTopBar;
|
|
57419
57419
|
}), (o, s) => (openBlock(), createElementBlock("div", _hoisted_1$4, [
|
|
57420
57420
|
r.value ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
|
|
57421
57421
|
createVNode(QIcon, {
|
|
57422
57422
|
onClick: n,
|
|
57423
57423
|
name: "svguse:#icon-\u8FD4\u56DE.svg",
|
|
57424
|
-
size: "
|
|
57424
|
+
size: "14px"
|
|
57425
57425
|
}),
|
|
57426
57426
|
createElementVNode("span", _hoisted_3$2, toDisplayString(unref(a)), 1),
|
|
57427
57427
|
unref(vertical) ? createCommentVNode("", !0) : (openBlock(), createBlock(_sfc_main$6, {
|
|
@@ -57438,7 +57438,7 @@ const _withScopeId$2 = (e) => (pushScopeId("data-v-04ecdf3e"), e = e(), popScope
|
|
|
57438
57438
|
_hoisted_6$2
|
|
57439
57439
|
]));
|
|
57440
57440
|
}
|
|
57441
|
-
}),
|
|
57441
|
+
}), playingLayout_vue_vue_type_style_index_0_scoped_c30249df_lang = "", PlayingLayout = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-c30249df"]]), _hoisted_1$3 = { class: "sensitivity" }, _hoisted_2$1 = {
|
|
57442
57442
|
key: 0,
|
|
57443
57443
|
class: "top-tip-container"
|
|
57444
57444
|
}, _hoisted_3$1 = { class: "top-tip" }, _hoisted_4$1 = { class: "toast-text" }, _hoisted_5$1 = {
|
|
@@ -58255,7 +58255,7 @@ const _hoisted_1 = { class: "lzc-video-player h-full w-full" }, _sfc_main = /* @
|
|
|
58255
58255
|
onInit: null,
|
|
58256
58256
|
options: null
|
|
58257
58257
|
},
|
|
58258
|
-
emits: ["back"],
|
|
58258
|
+
emits: ["back", "controlBarActive"],
|
|
58259
58259
|
setup(e, { emit: t }) {
|
|
58260
58260
|
const n = e;
|
|
58261
58261
|
videojs.addLanguage("zh-CN", videoZH);
|
|
@@ -58333,7 +58333,7 @@ const _hoisted_1 = { class: "lzc-video-player h-full w-full" }, _sfc_main = /* @
|
|
|
58333
58333
|
};
|
|
58334
58334
|
a.load(), a.on("back", () => {
|
|
58335
58335
|
a.dispose(), t("back");
|
|
58336
|
-
}), a.on("seeked", d(1e3)), a.on("pause", d(1e3)), a.on("timeupdate", d(5e3)), a.on("canplay", () => {
|
|
58336
|
+
}), a.on("seeked", d(1e3)), a.on("pause", d(1e3)), a.on("timeupdate", d(5e3)), a.on("useractive", () => t("controlBarActive", !0)), a.on("userinactive", () => t("controlBarActive", a.paused())), a.on("canplay", () => {
|
|
58337
58337
|
a.play(), d(100);
|
|
58338
58338
|
}), n.onInit && n.onInit(a), window.player = a;
|
|
58339
58339
|
}), onUnmounted(() => {
|