@lazycatcloud/lzc-video-player 0.0.4 → 0.0.6

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/model.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export interface Doc {
2
- _id?: string;
2
+ _id: string;
3
3
  }
4
4
  export interface VideoResolution {
5
5
  res: number;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as s, ref as u, openBlock as i, createBlock as y, withCtx as m, createTextVNode as f, toDisplayString as _ } from "vue";
2
- import { S as g } from "./simpleList.95523394.js";
3
- import "./lzc-video-player.78765609.js";
2
+ import { S as g } from "./simpleList.314db237.js";
3
+ import "./lzc-video-player.0acd3ce8.js";
4
4
  import "pinia";
5
5
  const D = /* @__PURE__ */ s({
6
6
  __name: "playrate",
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as y, ref as f, openBlock as m, createBlock as g, unref as v, withCtx as B, createTextVNode as F, toDisplayString as _ } from "vue";
2
- import { S as D } from "./simpleList.95523394.js";
3
- import "./lzc-video-player.78765609.js";
2
+ import { S as D } from "./simpleList.314db237.js";
3
+ import "./lzc-video-player.0acd3ce8.js";
4
4
  import "pinia";
5
5
  const R = /* @__PURE__ */ y({
6
6
  __name: "resolution",
@@ -1,4 +1,4 @@
1
- import { b as o, d as n, _ as r } from "./lzc-video-player.78765609.js";
1
+ import { b as o, d as n, _ as r } from "./lzc-video-player.0acd3ce8.js";
2
2
  import { defineComponent as _, openBlock as s, createElementBlock as c, createVNode as m, withCtx as i, Fragment as d, renderList as p, createBlock as u, createElementVNode as f, normalizeClass as v, renderSlot as k } from "vue";
3
3
  const C = { class: "simple-list" }, L = /* @__PURE__ */ _({
4
4
  __name: "simpleList",
@@ -29,7 +29,7 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
29
29
  currentTime: number;
30
30
  invalid: boolean;
31
31
  updateTime?: number | undefined;
32
- _id?: string | undefined;
32
+ _id: string;
33
33
  }[];
34
34
  } & import("pinia").PiniaCustomStateProperties<{
35
35
  collection: RemoteDB<VideoInfo>;
@@ -41,14 +41,14 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
41
41
  currentTime: number;
42
42
  invalid: boolean;
43
43
  updateTime?: number | undefined;
44
- _id?: string | undefined;
44
+ _id: string;
45
45
  } | undefined;
46
46
  }, {
47
47
  init(): Promise<void>;
48
48
  refreshData(): Promise<void>;
49
49
  deleteHistory(info: VideoInfo): Promise<void>;
50
- updateHistoryCache(info: VideoInfo): Promise<void>;
51
- updateHistory(info: VideoInfo, blob: Blob | null | undefined): Promise<void>;
50
+ batchDeleteHistory(ids: string[]): Promise<void>;
51
+ updateOrCreateHistory(info: VideoInfo, blob: Blob | null | undefined): Promise<void>;
52
52
  markAsInvalid(sourceUrl: string): Promise<void>;
53
53
  clear(): Promise<void>;
54
54
  }>;
@@ -0,0 +1,9 @@
1
+ export default function (): {
2
+ selectedKeys: import("vue").Ref<string[]>;
3
+ isEditing: import("vue").Ref<boolean>;
4
+ isSelectAll: import("vue").ComputedRef<boolean>;
5
+ hdlSelectAll: () => void;
6
+ hdlCancel: () => void;
7
+ hdlToggleItem: (item: any) => void;
8
+ updateData: (values: any[]) => void;
9
+ };
@@ -1,3 +1,4 @@
1
+ export declare function getFileLinkWithDefault(name: string): Promise<string>;
1
2
  export declare const getFrame: (id: string) => string;
2
3
  export declare const addFrame: (id: string, blob: Blob) => Promise<boolean>;
3
4
  export declare const delFrame: (id: string) => Promise<void>;
@@ -0,0 +1,4 @@
1
+ import type { Vue } from "@sentry/vue/types/types";
2
+ import type { Router } from "vue-router";
3
+ declare function sentryInit(app: Vue, router: Router): Promise<void>;
4
+ export default sentryInit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazycatcloud/lzc-video-player",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/lzc-video-player.js",
@@ -1,10 +0,0 @@
1
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>, {
2
- default?(_: {}): any;
3
- right?(_: {}): any;
4
- }>;
5
- export default _default;
6
- declare type __VLS_WithTemplateSlots<T, S> = T & {
7
- new (): {
8
- $slots: S;
9
- };
10
- };
@@ -1,12 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- player: {
3
- type: import("vue").PropType<import("video.js").VideoJsPlayer>;
4
- required: true;
5
- };
6
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
- player: {
8
- type: import("vue").PropType<import("video.js").VideoJsPlayer>;
9
- required: true;
10
- };
11
- }>>, {}>;
12
- export default _default;
@@ -1,12 +0,0 @@
1
- declare const _default: import("vue").DefineComponent<{
2
- player: {
3
- type: import("vue").PropType<import("video.js").VideoJsPlayer>;
4
- required: true;
5
- };
6
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
7
- player: {
8
- type: import("vue").PropType<import("video.js").VideoJsPlayer>;
9
- required: true;
10
- };
11
- }>>, {}>;
12
- export default _default;
@@ -1,4 +0,0 @@
1
- import type videojs from "video.js";
2
- export declare function getAngle(): number;
3
- export declare function onChange(fn: () => void): void;
4
- export declare function useOrientation(player: videojs.Player): void;
@@ -1,31 +0,0 @@
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.78765609.js";
3
- import "pinia";
4
- const m = { class: "modal-content" }, u = /* @__PURE__ */ i({
5
- __name: "index-horizontal",
6
- props: {
7
- player: null
8
- },
9
- setup(a) {
10
- const r = o(() => import("./list.491cc0bc.js")), s = o(() => import("./playrate.468d7c89.js")), c = o(() => import("./resolution.84d73e1c.js"));
11
- return (d, f) => (t(), p("div", m, [
12
- e(n) === "LzcPlayrate" ? (t(), l(e(s), {
13
- key: 0,
14
- class: "playrate",
15
- player: a.player
16
- }, null, 8, ["player"])) : e(n) === "LzcResolution" ? (t(), l(e(c), {
17
- key: 1,
18
- class: "resolution",
19
- player: a.player
20
- }, null, 8, ["player"])) : e(n) === "LzcPlaylist" ? (t(), l(e(r), {
21
- key: 2,
22
- class: "list",
23
- player: a.player
24
- }, null, 8, ["player"])) : y("", !0)
25
- ]));
26
- }
27
- });
28
- const v = /* @__PURE__ */ _(u, [["__scopeId", "data-v-544917ae"]]);
29
- export {
30
- v as default
31
- };
@@ -1,28 +0,0 @@
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.78765609.js";
3
- import "pinia";
4
- const m = { class: "modal-content" }, d = /* @__PURE__ */ p({
5
- __name: "index-vertical",
6
- props: {
7
- player: null
8
- },
9
- setup(a) {
10
- const r = l(() => import("./list.491cc0bc.js")), c = l(() => import("./playrate.468d7c89.js")), i = l(() => import("./resolution.84d73e1c.js"));
11
- return (u, f) => (t(), s("div", m, [
12
- e(o) === "LzcPlayrate" ? (t(), n(e(c), {
13
- key: 0,
14
- player: a.player
15
- }, null, 8, ["player"])) : e(o) === "LzcResolution" ? (t(), n(e(i), {
16
- key: 1,
17
- player: a.player
18
- }, null, 8, ["player"])) : e(o) === "LzcPlaylist" ? (t(), n(e(r), {
19
- key: 2,
20
- player: a.player
21
- }, null, 8, ["player"])) : y("", !0)
22
- ]));
23
- }
24
- });
25
- const L = /* @__PURE__ */ _(d, [["__scopeId", "data-v-fc9a6092"]]);
26
- export {
27
- L as default
28
- };
@@ -1,160 +0,0 @@
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.78765609.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
- };