Merge pull request #2473 from robintown/resize-observer

Remove ResizeObserver polyfill
This commit is contained in:
Robin 2024-09-03 15:37:54 -04:00 committed by GitHub
commit 8e72ad597b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1 additions and 9 deletions

View File

@ -24,7 +24,6 @@
"@babel/preset-env": "^7.22.20",
"@babel/preset-react": "^7.22.15",
"@babel/preset-typescript": "^7.23.0",
"@juggle/resize-observer": "^3.3.1",
"@livekit/components-core": "^0.11.0",
"@livekit/components-react": "^2.0.0",
"@opentelemetry/api": "^1.4.0",

View File

@ -16,7 +16,6 @@ limitations under the License.
import { useEffect, useMemo, useRef, FC, ReactNode, useCallback } from "react";
import useMeasure from "react-use-measure";
import { ResizeObserver } from "@juggle/resize-observer";
import { usePreviewTracks } from "@livekit/components-react";
import { LocalVideoTrack, Track } from "livekit-client";
import classNames from "classnames";
@ -51,7 +50,7 @@ export const VideoPreview: FC<Props> = ({
muteStates,
children,
}) => {
const [previewRef, previewBounds] = useMeasure({ polyfill: ResizeObserver });
const [previewRef, previewBounds] = useMeasure();
const devices = useMediaDevices();

View File

@ -76,7 +76,6 @@ export default defineConfig(({ mode }) => {
"react-dom",
"matrix-js-sdk",
"react-use-measure",
"@juggle/resize-observer",
// These packages modify the document based on some module-level global
// state, and don't play nicely with duplicate copies of themselves
// https://github.com/radix-ui/primitives/issues/1241#issuecomment-1847837850

View File

@ -1864,11 +1864,6 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"
"@juggle/resize-observer@^3.3.1":
version "3.4.0"
resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60"
integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==
"@livekit/components-core@0.11.2", "@livekit/components-core@^0.11.0":
version "0.11.2"
resolved "https://registry.yarnpkg.com/@livekit/components-core/-/components-core-0.11.2.tgz#fded2e207155e4737ed52830d48b75ae2eaaf449"