Merge branch 'livekit' into header-footer
This commit is contained in:
@@ -181,7 +181,7 @@ export function InCallView({
|
|||||||
containerRef1,
|
containerRef1,
|
||||||
toggleMicrophone,
|
toggleMicrophone,
|
||||||
toggleCamera,
|
toggleCamera,
|
||||||
async (muted) => await localParticipant.setMicrophoneEnabled(!muted)
|
(muted) => muteStates.audio.setEnabled?.(!muted)
|
||||||
);
|
);
|
||||||
|
|
||||||
const onDisconnected = useCallback(
|
const onDisconnected = useCallback(
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ export const VideoPreview: FC<Props> = ({ matrixInfo, muteStates }) => {
|
|||||||
|
|
||||||
const devices = useMediaDevices();
|
const devices = useMediaDevices();
|
||||||
|
|
||||||
|
// Capture the audio options as they were when we first mounted, because
|
||||||
|
// we're not doing anything with the audio anyway so we don't need to
|
||||||
|
// re-open the devices when they change (see below).
|
||||||
const initialAudioOptions = useRef<CreateLocalTracksOptions["audio"]>();
|
const initialAudioOptions = useRef<CreateLocalTracksOptions["audio"]>();
|
||||||
initialAudioOptions.current ??= muteStates.audio.enabled && {
|
initialAudioOptions.current ??= muteStates.audio.enabled && {
|
||||||
deviceId: devices.audioInput.selectedId,
|
deviceId: devices.audioInput.selectedId,
|
||||||
@@ -82,7 +85,9 @@ export const VideoPreview: FC<Props> = ({ matrixInfo, muteStates }) => {
|
|||||||
// request over with at the same time. But changing the audio settings
|
// request over with at the same time. But changing the audio settings
|
||||||
// shouldn't cause this hook to recreate the track, which is why we
|
// shouldn't cause this hook to recreate the track, which is why we
|
||||||
// reference the initial values here.
|
// reference the initial values here.
|
||||||
audio: initialAudioOptions.current,
|
// We also pass in a clone because livekit mutates the object passed in,
|
||||||
|
// which would cause the devices to be re-opened on the next render.
|
||||||
|
audio: Object.assign({}, initialAudioOptions.current),
|
||||||
video: muteStates.video.enabled && {
|
video: muteStates.video.enabled && {
|
||||||
deviceId: devices.videoInput.selectedId,
|
deviceId: devices.videoInput.selectedId,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -145,8 +145,6 @@ export const VideoTile = forwardRef<HTMLDivElement, Props>(
|
|||||||
// Firefox doesn't respect the disablePictureInPicture attribute
|
// Firefox doesn't respect the disablePictureInPicture attribute
|
||||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1611831
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=1611831
|
||||||
|
|
||||||
console.log(`LOG VideoTIle mxcSrc=${member?.getMxcAvatarUrl()}`);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<animated.div
|
<animated.div
|
||||||
className={classNames(styles.videoTile, className, {
|
className={classNames(styles.videoTile, className, {
|
||||||
|
|||||||
Reference in New Issue
Block a user