@banou/media-player 0.10.10 → 0.10.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.
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-_RCEvBvl.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 };
|
|
@@ -244,8 +244,9 @@ var i = (e) => Array(e.buffered.length).fill(void 0).map((t, n) => ({
|
|
|
244
244
|
t && r || (console.error(e), (!K || n) && (K = !0, ne?.(r ? Error("Reading the video file failed", { cause: e }) : e)));
|
|
245
245
|
}, fe = async (e = !1) => {
|
|
246
246
|
if (R > 0 && !e) return;
|
|
247
|
-
let t = n.currentTime, r = e ? x : v, a = e ? S : y;
|
|
248
|
-
|
|
247
|
+
let t = n.currentTime, r = e ? x : v, a = e ? S : y, o = i(A);
|
|
248
|
+
o.length && o[0].start < t + r && await se(0, t + r);
|
|
249
|
+
for (let { end: e } of o) e > t + a && await se(t + a, e);
|
|
249
250
|
}, pe = () => {
|
|
250
251
|
let e = i(A);
|
|
251
252
|
if (!e.length) return !0;
|
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-_RCEvBvl.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
|
@@ -304,8 +304,12 @@ export const startPlayback = async (options: PlaybackOptions): Promise<PlaybackC
|
|
|
304
304
|
const ct = videoElement.currentTime
|
|
305
305
|
const pre = tight ? PRE_EVICT_TIGHT : PRE_EVICT
|
|
306
306
|
const post = tight ? POST_EVICT_TIGHT : POST_EVICT
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
const ranges = getTimeRanges(sourceBuffer)
|
|
308
|
+
// From 0, never from the reported start: once a group is removed, Firefox 151 reports the start
|
|
309
|
+
// 1 ms after the keyframe it still holds, so a remove from there keeps that frame for good
|
|
310
|
+
// (measured 2026-10-11).
|
|
311
|
+
if (ranges.length && ranges[0].start < ct + pre) await unbufferRange(0, ct + pre)
|
|
312
|
+
for (const { end } of ranges) {
|
|
309
313
|
if (end > ct + post) await unbufferRange(ct + post, end)
|
|
310
314
|
}
|
|
311
315
|
}
|