@lazycatcloud/lzc-video-player 0.0.31 → 0.0.33
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/lzc-video-player.js +21 -18
- package/dist/model.d.ts +1 -0
- package/dist/stores/playlist.d.ts +2 -0
- package/package.json +1 -1
package/dist/lzc-video-player.js
CHANGED
|
@@ -87106,8 +87106,8 @@ const previewConfig = {
|
|
|
87106
87106
|
tile: 4,
|
|
87107
87107
|
len: 16
|
|
87108
87108
|
};
|
|
87109
|
-
function isNetdiskSource(t) {
|
|
87110
|
-
return !(t.startsWith("http") || t.startsWith("blob"));
|
|
87109
|
+
function isNetdiskSource(t, e = !1) {
|
|
87110
|
+
return e ? !0 : !(t.startsWith("http") || t.startsWith("blob"));
|
|
87111
87111
|
}
|
|
87112
87112
|
function filenameByUrl(t, e) {
|
|
87113
87113
|
e = e.split("?")[0];
|
|
@@ -87174,7 +87174,7 @@ function useSource(t) {
|
|
|
87174
87174
|
async function u(m) {
|
|
87175
87175
|
getFileLinkWithDefault(m._id).then((v) => {
|
|
87176
87176
|
t.poster(v);
|
|
87177
|
-
}), t.src(m.sourceUrl), m.name && (e = m.name), isNetdiskSource(m.sourceUrl) && !LzcApp.isTvOsWebShell() && t.on(
|
|
87177
|
+
}), t.src(m.sourceUrl), m.name && (e = m.name), isNetdiskSource(m.sourceUrl, m.fromNetdisk) && !LzcApp.isTvOsWebShell() && t.on(
|
|
87178
87178
|
"timeupdate",
|
|
87179
87179
|
lodash_throttle(() => {
|
|
87180
87180
|
(t.networkState() == 1 || t.networkState() == 2) && n.loadPreview();
|
|
@@ -87246,10 +87246,10 @@ function useSource(t) {
|
|
|
87246
87246
|
}
|
|
87247
87247
|
}, t.on("openVideo", async (m) => {
|
|
87248
87248
|
const v = m.info;
|
|
87249
|
-
e = v.name, t.isCastMode() || (console.debug("openVideo: ", v), await u(v), v.duration - v.currentTime > 3 && t.one("canplay", function() {
|
|
87249
|
+
e = v.name, t.isCastMode() || (console.debug("openVideo: ", v), await u(v), t.isNetdiskSource = () => isNetdiskSource(t.currentSrc(), v.fromNetdisk), v.duration - v.currentTime > 3 && t.one("canplay", function() {
|
|
87250
87250
|
t.currentTime(v.currentTime);
|
|
87251
87251
|
}));
|
|
87252
|
-
}), t.
|
|
87252
|
+
}), t.currentVideoName = c, t.currentPreview = d, t.isCastMode = function() {
|
|
87253
87253
|
return t.currentType() === "video/lzc-cast";
|
|
87254
87254
|
}, t.reloadSource = function(m) {
|
|
87255
87255
|
const v = t.duration() !== 1 / 0 && t.currentTime() || 0;
|
|
@@ -87326,7 +87326,7 @@ const _hoisted_1 = ["onClick"], _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87326
87326
|
let n;
|
|
87327
87327
|
const s = ref(null);
|
|
87328
87328
|
function o() {
|
|
87329
|
-
n.userActive_ && n.userActive(!1);
|
|
87329
|
+
n.paused() ? n.play() : n.pause(), n.userActive_ && n.userActive(!1);
|
|
87330
87330
|
}
|
|
87331
87331
|
function u() {
|
|
87332
87332
|
return Object.assign(
|
|
@@ -87366,19 +87366,22 @@ const _hoisted_1 = ["onClick"], _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
87366
87366
|
r.options
|
|
87367
87367
|
);
|
|
87368
87368
|
}
|
|
87369
|
-
return useKeyBind(
|
|
87370
|
-
|
|
87371
|
-
|
|
87372
|
-
|
|
87373
|
-
|
|
87374
|
-
|
|
87375
|
-
|
|
87376
|
-
|
|
87369
|
+
return useKeyBind(
|
|
87370
|
+
{
|
|
87371
|
+
Space: () => {
|
|
87372
|
+
n.paused() ? n.play() : n.pause();
|
|
87373
|
+
},
|
|
87374
|
+
ArrowLeft: () => n.currentTime(Math.max(0, n.currentTime() - 5)),
|
|
87375
|
+
ArrowRight: () => n.currentTime(Math.min(n.duration(), n.currentTime() + 5)),
|
|
87376
|
+
ArrowUp: () => {
|
|
87377
|
+
n.volume(Math.min(100, n.volume() * 100 + 5) / 100), n.trigger("lzcVolumeShow");
|
|
87378
|
+
},
|
|
87379
|
+
ArrowDown: () => {
|
|
87380
|
+
n.volume(Math.max(0, n.volume() * 100 - 5) / 100), n.trigger("lzcVolumeShow");
|
|
87381
|
+
}
|
|
87377
87382
|
},
|
|
87378
|
-
|
|
87379
|
-
|
|
87380
|
-
}
|
|
87381
|
-
}, a), onMounted(async () => {
|
|
87383
|
+
a
|
|
87384
|
+
), onMounted(async () => {
|
|
87382
87385
|
const l = useHistoryInfo(), c = document.createElement("meta");
|
|
87383
87386
|
c.name = "referrer", c.content = "no-referrer", document.head.append(c), n = videojs(s.value, u()), useSource(n), n.dimensions(window.innerWidth, window.innerHeight), n.poster(r.poster);
|
|
87384
87387
|
const d = new LzcModal(n);
|
package/dist/model.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
29
29
|
currentTime: number;
|
|
30
30
|
invalid: boolean;
|
|
31
31
|
updateTime?: number | undefined;
|
|
32
|
+
fromNetdisk?: boolean | undefined;
|
|
32
33
|
_id: string;
|
|
33
34
|
}[];
|
|
34
35
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
@@ -41,6 +42,7 @@ export declare const useHistoryInfo: () => import("pinia").Store<"historyInfo",
|
|
|
41
42
|
currentTime: number;
|
|
42
43
|
invalid: boolean;
|
|
43
44
|
updateTime?: number | undefined;
|
|
45
|
+
fromNetdisk?: boolean | undefined;
|
|
44
46
|
_id: string;
|
|
45
47
|
} | undefined;
|
|
46
48
|
}, {
|