@limrun/ui 0.4.0-rc.2 → 0.4.0-rc.3
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 +1 -1
- package/dist/index.js +126 -126
- package/package.json +1 -1
- package/src/components/remote-control.tsx +6 -1
package/package.json
CHANGED
|
@@ -780,7 +780,12 @@ export const RemoteControl = forwardRef<RemoteControlHandle, RemoteControlProps>
|
|
|
780
780
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
781
781
|
for (const entry of entries) {
|
|
782
782
|
const videoWidth = entry.contentRect.width;
|
|
783
|
-
|
|
783
|
+
const originalFrameWidth = frame.clientWidth;
|
|
784
|
+
const newFrameWidth = videoWidth * config.frameWidthMultiplier;
|
|
785
|
+
// The video is too small up until the first frame is visible, so we need to make sure we don't scale the frame down too much.
|
|
786
|
+
if (newFrameWidth > 0.9*originalFrameWidth) {
|
|
787
|
+
frame.style.width = `${videoWidth * config.frameWidthMultiplier}px`;
|
|
788
|
+
}
|
|
784
789
|
video.style.borderRadius = `${videoWidth * config.videoBorderRadiusMultiplier}px`;
|
|
785
790
|
}
|
|
786
791
|
});
|