@limrun/ui 0.13.7 → 0.13.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limrun/ui",
3
- "version": "0.13.7",
3
+ "version": "0.13.8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -345,7 +345,6 @@ export const RemoteControl = forwardRef<RemoteControlHandle, RemoteControlProps>
345
345
  const videoRef = useRef<HTMLVideoElement>(null);
346
346
  const frameRef = useRef<HTMLImageElement>(null);
347
347
  const [videoLoaded, setVideoLoaded] = useState(false);
348
- const [unmuted, setUnmuted] = useState(false);
349
348
  const [retryExhausted, setRetryExhausted] = useState(false);
350
349
  const [isLandscape, setIsLandscape] = useState(false);
351
350
  const [useAndroidTabletFrame, setUseAndroidTabletFrame] = useState(false);
@@ -478,33 +477,11 @@ export const RemoteControl = forwardRef<RemoteControlHandle, RemoteControlProps>
478
477
  const platform = useMemo(() => detectPlatform(url), [url]);
479
478
  const config = deviceConfig[platform];
480
479
 
481
- useEffect(() => {
482
- setUnmuted(false);
483
- if (videoRef.current) {
484
- videoRef.current.muted = true;
485
- }
486
- }, [platform, url]);
487
-
488
480
  const updateStatus = (message: string) => {
489
481
  // Use the wrapper for conditional logging
490
482
  debugLog(message);
491
483
  };
492
484
 
493
- const unmute = () => {
494
- if (unmuted) {
495
- return;
496
- }
497
-
498
- setUnmuted(true);
499
- const video = videoRef.current;
500
- if (video) {
501
- video.muted = false;
502
- video.play().catch((err: unknown) => {
503
- debugWarn('Unable to unmute after user interaction:', err);
504
- });
505
- }
506
- };
507
-
508
485
  const sendBinaryControlMessage = (data: ArrayBuffer) => {
509
486
  if (!dataChannelRef.current || dataChannelRef.current.readyState !== 'open') {
510
487
  return;
@@ -987,10 +964,6 @@ export const RemoteControl = forwardRef<RemoteControlHandle, RemoteControlProps>
987
964
  event.preventDefault();
988
965
  event.stopPropagation();
989
966
 
990
- if (event.type === 'mousedown' || event.type === 'touchstart') {
991
- unmute();
992
- }
993
-
994
967
  // Compute mapping context once per event (reused for all pointers)
995
968
  const ctx = computeVideoMappingContext();
996
969
 
@@ -2532,7 +2505,7 @@ export const RemoteControl = forwardRef<RemoteControlHandle, RemoteControlProps>
2532
2505
  }}
2533
2506
  autoPlay
2534
2507
  playsInline
2535
- muted={!unmuted}
2508
+ muted
2536
2509
  tabIndex={0}
2537
2510
  onKeyDown={handleKeyboard}
2538
2511
  onKeyUp={handleKeyboard}