@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.js
CHANGED
|
@@ -5884,6 +5884,7 @@ function VideoPlayer({
|
|
|
5884
5884
|
const [cssFullscreen, setCssFullscreen] = React11.useState(false);
|
|
5885
5885
|
const [webkitNativeFs, setWebkitNativeFs] = React11.useState(false);
|
|
5886
5886
|
const hideTimerRef = React11.useRef(null);
|
|
5887
|
+
const lastPointerTypeRef = React11.useRef("mouse");
|
|
5887
5888
|
const liveCaptionCuesRef = React11.useRef(liveCaptionCues);
|
|
5888
5889
|
const liveLagMsRef = React11.useRef(liveLagMs);
|
|
5889
5890
|
const compactChromeRef = React11.useRef(compactChrome);
|
|
@@ -6294,6 +6295,20 @@ function VideoPlayer({
|
|
|
6294
6295
|
return next;
|
|
6295
6296
|
});
|
|
6296
6297
|
}
|
|
6298
|
+
function recordPointerType(e) {
|
|
6299
|
+
lastPointerTypeRef.current = e.pointerType;
|
|
6300
|
+
}
|
|
6301
|
+
function handlePointerMove(e) {
|
|
6302
|
+
if (e.pointerType === "mouse") lastPointerTypeRef.current = "mouse";
|
|
6303
|
+
}
|
|
6304
|
+
function handleMouseMove() {
|
|
6305
|
+
if (lastPointerTypeRef.current === "touch") return;
|
|
6306
|
+
revealControls();
|
|
6307
|
+
}
|
|
6308
|
+
function handleMouseLeave() {
|
|
6309
|
+
if (lastPointerTypeRef.current === "touch") return;
|
|
6310
|
+
if (isPlaying) setControlsVisible(false);
|
|
6311
|
+
}
|
|
6297
6312
|
function handleKeyDown(e) {
|
|
6298
6313
|
if (!active) return;
|
|
6299
6314
|
switch (e.key) {
|
|
@@ -6377,10 +6392,10 @@ function VideoPlayer({
|
|
|
6377
6392
|
cssFullscreen && "fixed inset-0 z-50 h-dvh w-dvw rounded-none",
|
|
6378
6393
|
className
|
|
6379
6394
|
),
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6395
|
+
onPointerDown: recordPointerType,
|
|
6396
|
+
onPointerMove: handlePointerMove,
|
|
6397
|
+
onMouseMove: handleMouseMove,
|
|
6398
|
+
onMouseLeave: handleMouseLeave,
|
|
6384
6399
|
onKeyDown: handleKeyDown,
|
|
6385
6400
|
tabIndex: 0,
|
|
6386
6401
|
role: "region",
|