@lazycatcloud/lzc-video-player 0.0.9 → 0.0.11

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.
@@ -1,5 +1,5 @@
1
1
  import { openBlock as u, createElementBlock as d, pushScopeId as Q, popScopeId as H, createElementVNode as o, ref as f, computed as S, defineComponent as x, normalizeClass as y, withModifiers as w, createBlock as $, unref as i, isRef as X, withCtx as B, toDisplayString as g, createCommentVNode as k, useCssVars as Y, onMounted as Z, nextTick as ee, onUnmounted as te, watchEffect as se, createVNode as h, Fragment as I, renderList as le, createTextVNode as V } from "vue";
2
- import { _ as D, Q as T, a as ne, E as U, u as ie, r as ue, b as oe, c as ae, f as K, g as ce } from "./lzc-video-player.753207cc.js";
2
+ import { _ as D, Q as T, a as ne, E as U, u as ie, r as ue, b as oe, c as ae, f as K, g as ce } from "./lzc-video-player.f997f06d.js";
3
3
  import "pinia";
4
4
  const de = {}, re = (e) => (Q("data-v-7a0e044b"), e = e(), H(), e), _e = /* @__PURE__ */ re(() => /* @__PURE__ */ o("ul", null, [
5
5
  /* @__PURE__ */ o("li", { class: "m1" }),
@@ -24432,7 +24432,7 @@ const activePage = ref(""), _hoisted_1$6 = ["onClick"], _hoisted_2$4 = { class:
24432
24432
  modal: null
24433
24433
  },
24434
24434
  setup(e) {
24435
- const t = e, n = defineAsyncComponent(() => import("./list.9d49627d.js")), a = defineAsyncComponent(() => import("./playrate.13a84f5f.js")), r = defineAsyncComponent(() => import("./resolution.7bbf5a57.js")), o = () => {
24435
+ const t = e, n = defineAsyncComponent(() => import("./list.cb1a2d7e.js")), a = defineAsyncComponent(() => import("./playrate.7f3ee878.js")), r = defineAsyncComponent(() => import("./resolution.3b0f5b77.js")), o = () => {
24436
24436
  t.modal.opened() && (activePage.value = "", t.modal.close());
24437
24437
  };
24438
24438
  return t.player.on("openVideo", o), (s, u) => (openBlock(), createElementBlock("div", {
@@ -58224,18 +58224,28 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
58224
58224
  }), t.player.on("closeCasting", () => {
58225
58225
  a.value = !1;
58226
58226
  });
58227
- const r = ref(!1);
58228
- t.player.on("error", () => {
58227
+ const r = ref(!1), o = ref();
58228
+ function s() {
58229
+ r.value = !1, t.player.removeClass("vjs-error"), o.value && window.clearTimeout(o.value);
58230
+ }
58231
+ function u() {
58229
58232
  if (t.player.isCastMode())
58230
58233
  return;
58231
- t.player.error().code == 4 && n.markAsInvalid(t.player.currentSrc()), r.value = !0;
58232
- });
58233
- const o = () => {
58234
- r.value = !1, t.player.removeClass("vjs-error");
58235
- };
58236
- return t.player.on("loadstart", o), t.player.qualityLevels().on("change", (s) => {
58237
- r.value && (o(), t.player.reloadSource(s.selectedIndex));
58238
- }), useRefresh(), (s, u) => r.value ? (openBlock(), createBlock(Error$1, {
58234
+ const l = t.player.currentTime(), c = t.player.bufferedEnd();
58235
+ if (l < c - 2) {
58236
+ s(), o.value = setTimeout(
58237
+ () => t.player.trigger({ type: "error" }),
58238
+ (c - l) * 1e3
58239
+ );
58240
+ return;
58241
+ }
58242
+ t.player.error().code == 4 && n.markAsInvalid(t.player.currentSrc()), r.value = !0, t.player.addClass("vjs-error");
58243
+ }
58244
+ return t.player.on("error", u), t.player.on("playing", () => {
58245
+ r.value && s();
58246
+ }), t.player.on("loadstart", s), t.player.qualityLevels().on("change", (l) => {
58247
+ r.value && (s(), t.player.reloadSource(l.selectedIndex));
58248
+ }), useRefresh(), (l, c) => r.value ? (openBlock(), createBlock(Error$1, {
58239
58249
  key: 0,
58240
58250
  player: e.player
58241
58251
  }, null, 8, ["player"])) : a.value ? (openBlock(), createBlock(Casting, {
@@ -58658,7 +58668,7 @@ const _hoisted_1 = ["onClick"], _sfc_main = /* @__PURE__ */ defineComponent({
58658
58668
  let a;
58659
58669
  const r = ref(null);
58660
58670
  function o() {
58661
- a.userActive_ && a.userActive(!1);
58671
+ a.hasClass("vjs-user-active") ? (a.removeClass("vjs-user-active"), a.addClass("vjs-user-inactive")) : (a.removeClass("vjs-user-inactive"), a.addClass("vjs-user-active"));
58662
58672
  }
58663
58673
  return onMounted(async () => {
58664
58674
  const s = useHistoryInfo(), u = document.createElement("meta");
@@ -58682,9 +58692,13 @@ const _hoisted_1 = ["onClick"], _sfc_main = /* @__PURE__ */ defineComponent({
58682
58692
  enableLowInitialPlaylist: !1,
58683
58693
  limitRenditionByPlayerDimensions: !1,
58684
58694
  useDevicePixelRatio: !0,
58685
- handlePartialData: !0
58695
+ handlePartialData: !0,
58696
+ maxPlaylistRetries: 1,
58697
+ bandwidth: 5e6,
58698
+ useBandwidthFromLocalStorage: !0
58686
58699
  }
58687
58700
  },
58701
+ inactivityTimeout: 1e4,
58688
58702
  bigPlayButton: !0,
58689
58703
  children: [
58690
58704
  "MediaLoader",