@livo-tv/blocks 1.31.0 → 1.32.0
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/index.cjs +19 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5910,6 +5910,7 @@ function VideoPlayer({
|
|
|
5910
5910
|
const [cssFullscreen, setCssFullscreen] = React11__namespace.useState(false);
|
|
5911
5911
|
const [webkitNativeFs, setWebkitNativeFs] = React11__namespace.useState(false);
|
|
5912
5912
|
const hideTimerRef = React11__namespace.useRef(null);
|
|
5913
|
+
const lastPointerTypeRef = React11__namespace.useRef("mouse");
|
|
5913
5914
|
const liveCaptionCuesRef = React11__namespace.useRef(liveCaptionCues);
|
|
5914
5915
|
const liveLagMsRef = React11__namespace.useRef(liveLagMs);
|
|
5915
5916
|
const compactChromeRef = React11__namespace.useRef(compactChrome);
|
|
@@ -6320,6 +6321,20 @@ function VideoPlayer({
|
|
|
6320
6321
|
return next;
|
|
6321
6322
|
});
|
|
6322
6323
|
}
|
|
6324
|
+
function recordPointerType(e) {
|
|
6325
|
+
lastPointerTypeRef.current = e.pointerType;
|
|
6326
|
+
}
|
|
6327
|
+
function handlePointerMove(e) {
|
|
6328
|
+
if (e.pointerType === "mouse") lastPointerTypeRef.current = "mouse";
|
|
6329
|
+
}
|
|
6330
|
+
function handleMouseMove() {
|
|
6331
|
+
if (lastPointerTypeRef.current === "touch") return;
|
|
6332
|
+
revealControls();
|
|
6333
|
+
}
|
|
6334
|
+
function handleMouseLeave() {
|
|
6335
|
+
if (lastPointerTypeRef.current === "touch") return;
|
|
6336
|
+
if (isPlaying) setControlsVisible(false);
|
|
6337
|
+
}
|
|
6323
6338
|
function handleKeyDown(e) {
|
|
6324
6339
|
if (!active) return;
|
|
6325
6340
|
switch (e.key) {
|
|
@@ -6403,10 +6418,10 @@ function VideoPlayer({
|
|
|
6403
6418
|
cssFullscreen && "fixed inset-0 z-50 h-dvh w-dvw rounded-none",
|
|
6404
6419
|
className
|
|
6405
6420
|
),
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6421
|
+
onPointerDown: recordPointerType,
|
|
6422
|
+
onPointerMove: handlePointerMove,
|
|
6423
|
+
onMouseMove: handleMouseMove,
|
|
6424
|
+
onMouseLeave: handleMouseLeave,
|
|
6410
6425
|
onKeyDown: handleKeyDown,
|
|
6411
6426
|
tabIndex: 0,
|
|
6412
6427
|
role: "region",
|