import { useCall } from "@stream-io/video-react-native-sdk";
const call = useCall();
useEffect(() => {
if (call?.state.callingState !== CallingState.LEFT) {
call.leave();
}
}, [call]);
1.16.0
Summary
This migration guide covers the breaking changes in version 1.16.0, including the removal of useCallMediaStreamCleanup
hook (requiring manual camera/microphone cleanup), removal of useApplyDefaultMediaStreamSettings
and removal of several unused hooks and types.
🚨 Breaking Changes
1. Removal of useCallMediaStreamCleanup
hook
The useCallMediaStreamCleanup
hook has been removed. If you’re using Lobby or Outgoing Call, you must now cleanup camera and microphone.
This cleanup can be done with invoking call.leave()
, which internally disposes the audio and video streams:
2. Removal of useApplyDefaultMediaStreamSettings
hook
- The
useApplyDefaultMediaStreamSettings
hook is removed.call.get()
,call.getOrCreate()
orcall.join()
will do this automatically. So there is nothing there to add to apply the default settings.
💡 Non-Breaking Changes
Removed other unused hooks and types
The following hooks and types have been removed as they weren’t providing value in the SDK:
useStreamVideoStoreValue
useStreamVideoStoreSetState
SDKStreamVideoStore
StreamVideoStoreProvider
MediaDeviceInfo
🔍 Support
If you encounter any issues during migration, please submit a ticket at support.