@banou/media-player 0.10.15 → 0.10.16
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/engine/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../engine-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, s as l, t as u, u as d } from "../engine-C9vSEJYW.js";
|
|
2
2
|
export { i as DEFAULT_BUFFER_SIZE, e as MediaElementError, a as SUBTITLES_OFF, u as createPictureInPicture, d as createSubtitleRenderer, c as createThumbnailGenerator, n as getTimeRanges, s as isMediaElementError, o as pictureInPictureMode, l as startPlayback, t as terminateRemuxer, r as updateSourceBuffer };
|
|
@@ -251,7 +251,7 @@ var i = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
|
|
|
251
251
|
let e = i(A);
|
|
252
252
|
if (!e.length) return !0;
|
|
253
253
|
let t = de(), n = e.find((e) => e.start <= t + T && t < e.end);
|
|
254
|
-
return n && n.end >= t + y ? !1 : !n || n.end < t + b;
|
|
254
|
+
return be() && ve(t) && (!n || n.start <= t) || n && n.end >= t + y ? !1 : !n || n.end < t + b;
|
|
255
255
|
}, ge = (e) => i(A).find((t) => t.start <= e + T && e < t.end), _e = () => ge(n.currentTime), ve = (e = n.currentTime) => {
|
|
256
256
|
let t = ge(e);
|
|
257
257
|
return e >= U - .1 || !!t && t.end >= U - .1;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as e, n as t, o as n, r, s as i, t as a, u as o } from "./engine-
|
|
1
|
+
import { l as e, n as t, o as n, r, s as i, t as a, u as o } from "./engine-C9vSEJYW.js";
|
|
2
2
|
import { Children as s, Fragment as c, isValidElement as l, useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m, useSyncExternalStore as h } from "react";
|
|
3
3
|
import { css as g, keyframes as _ } from "@emotion/react";
|
|
4
4
|
import { createPlayer as v, useContainerAttach as y, useMediaAttach as b } from "@videojs/react";
|
package/package.json
CHANGED
|
@@ -337,6 +337,11 @@ export const startPlayback = async (options: PlaybackOptions): Promise<PlaybackC
|
|
|
337
337
|
if (!ranges.length) return true
|
|
338
338
|
const ct = bufferAnchor()
|
|
339
339
|
const range = ranges.find((r) => r.start <= ct + BOUNDARY_SLACK && ct < r.end)
|
|
340
|
+
// A range holding the playhead that runs to an end still buffered leaves nothing to read: after a seek back,
|
|
341
|
+
// reading on only appended again what was buffered, 13 reads of 32 KB on a move to 2 s before the end. From a
|
|
342
|
+
// hole under the slack before that range nothing read the hole, and playback stopped there for good with
|
|
343
|
+
// keyframes 0.833 s apart (measured 2026-10-12)
|
|
344
|
+
if (endInBuffer() && atEnd(ct) && (!range || range.start <= ct)) return false
|
|
340
345
|
/*
|
|
341
346
|
* Never read past what evict() keeps, measured on the run holding the anchor rather than
|
|
342
347
|
* across every island.
|