@livekit/components-react
Advanced tools
Comparing version 2.0.4 to 3.0.0
@@ -788,3 +788,3 @@ "use strict"; | ||
}) { | ||
const roomContext = useEnsureRoom(room); | ||
const roomContext = useMaybeRoomContext(); | ||
const deviceObserver = React20.useMemo( | ||
@@ -797,4 +797,4 @@ () => (0, import_components_core15.createMediaDeviceObserver)(kind, onError, requestPermissions), | ||
const { className, activeDeviceObservable, setActiveMediaDevice } = React20.useMemo( | ||
() => (0, import_components_core15.setupDeviceSelector)(kind, roomContext, track), | ||
[kind, roomContext, track] | ||
() => (0, import_components_core15.setupDeviceSelector)(kind, room != null ? room : roomContext, track), | ||
[kind, room, roomContext, track] | ||
); | ||
@@ -801,0 +801,0 @@ React20.useEffect(() => { |
import * as React from 'react'; | ||
import { type LocalAudioTrack, type LocalVideoTrack } from 'livekit-client'; | ||
import type { LocalAudioTrack, LocalVideoTrack } from 'livekit-client'; | ||
/** @public */ | ||
@@ -4,0 +4,0 @@ export interface MediaDeviceMenuProps extends React.ButtonHTMLAttributes<HTMLButtonElement> { |
{ | ||
"name": "@livekit/components-react", | ||
"version": "2.0.4", | ||
"version": "3.0.0", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "author": "LiveKit", |
import { createMediaDeviceObserver, setupDeviceSelector, log } from '@livekit/components-core'; | ||
import type { LocalAudioTrack, LocalVideoTrack, Room } from 'livekit-client'; | ||
import * as React from 'react'; | ||
import { useEnsureRoom } from '../context'; | ||
import { useMaybeRoomContext } from '../context'; | ||
import { useObservableState } from './internal'; | ||
@@ -48,3 +48,3 @@ | ||
}: UseMediaDeviceSelectProps) { | ||
const roomContext = useEnsureRoom(room); | ||
const roomContext = useMaybeRoomContext(); | ||
// List of all devices. | ||
@@ -59,4 +59,4 @@ const deviceObserver = React.useMemo( | ||
const { className, activeDeviceObservable, setActiveMediaDevice } = React.useMemo( | ||
() => setupDeviceSelector(kind, roomContext, track), | ||
[kind, roomContext, track], | ||
() => setupDeviceSelector(kind, room ?? roomContext, track), | ||
[kind, room, roomContext, track], | ||
); | ||
@@ -63,0 +63,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2516918
26896
1