Releases: daily-co/daily-react
Releases · daily-co/daily-react
0.14.0
Improvements
- Improved type inference for
useThrottledDailyEventcallback event objects - Improved state management for
useParticipantProperty: instead of looking up participant state properties from entire participant objects, we'll now store participant properties in separate state atoms, as recommended by Recoil. This means that participant state properties returned fromuseParticipantPropertydon't subscribe to the entire participant object anymore, which leads to more targeted and fewer render cycles.
Bugfixes
- Fixed an issue in
useNetworkwhere returned network state information could be stale - Fixed an issue where participant audio tracks might not have been assigned to an
<audio>tag inDailyAudio - Fixed checks in
usePermissionsto avoid potential property lookups onundefined
0.13.0
Features
- New hook
useDailyError: this hook returns a stateful representation of the lastmeetingError(emitted pererrorevent) andnonFatalError(emitted pernonfatal-errorevent)
Improvements
- Improved type inference for
useDailyEventevent objects: when passing a memoized callback you don't have to specify the event object types yourself anymore! (Thanks @HegarGarcia) - New callback
onErrorforuseScreenShare: maps tononfatal-errorof type'screen-share-error' - New callback
onErrorforuseMeetingSessionState: maps tononfatal-errorof type'meeting-session-data-error' - New callback
onLiveStreamingWarningforuseLiveStreaming: maps tononfatal-errorof type'live-streaming-warning' - Improved type inference for
onErrorcallback foruseInputSettings - Improved state management for
useScreenShare: before this release every instance ofuseScreenSharemaintained its own version of state representing screen shares. This state management has now moved into an internal wrapper component, so screen share state is only managed once. Every instance ofuseScreenSharenow returns the same state. - Improved state management for
useParticipantIds: recent refactors of this hook unveiled some complexities originating from different variations for thefilterandsortoptions. We've updateduseParticipantIdsto always return optimized states from Recoil when using a string-basedfilterand/orsortoption. This also means that instances ofuseParticipantIdswith optimizedfilter/sortoptions will return the correct list of ids on first render. A custom functionfilterand/orsortwill fall back to a manual state and remain the same behavior as introduced in 0.11.0. - Improved state management for
useParticipantProperty: we restructured our internal recoil selectors for participant properties to better handle arrays of properties.
0.12.0
Features
DailyAudionow has an optionautoSubscribeActiveSpeakerto automatically subscribe to the active speaker (only relevant when using manual track subscriptions)
Improvements
- Updated callback type definitions to infer arguments from the daily-js types. This affects
useDevicescan now skip thependingstate, in case the browser's Permissions API reports granted access for camera and/or microphone.
Bugfixes
- Fixed an issue where some hooks were potentially returning stale state information after switching to a different Daily room.
- Fixed an issue where
useThrottledDailyEventpotentially handled events for a session that was already left or destroyed.
0.11.6
Bugfixes
- Fixed an issue where
useRecordingwould return stale state when leaving and joining a new meeting - Fixed TypeScript definition for
useAudioLevelhook (thanks @joakimgrr!)
Maintenance
- Simplified object comparison checks in our
customDeepEqualmethod
0.11.5
Bugfixes
- Fixed an issue where comparing
Maps andSets internally inside theusePermissionswould lead to an infinite recursive loop.
0.11.4
Bugfixes
useParticipantProperty: fixed an issue whereuseParticipantPropertyreturnedundefinedon first render, despite the correct value being available in store already.
0.11.3
Bugfixes
useScreenShare: Fixes an issue where optimized render cycles inuseParticipantIds(see 0.11.0) could lead to stalescreensreturned fromuseScreenShare
0.11.2
Bugfixes
useParticipantProperty: fixed an issue introduced in 0.11.1 where changes to tracks and permissions were not picked up correctly byuseParticipantProperty.
0.11.1
Improvements
useParticipantProperty: improved the hook's render performance by only re-rendering when the returned value(s) actually changed.
0.11.0
Features
- New handling of
canAdminpermissions inusePermissions: the hook now returnscanAdminParticipants,canAdminStreamingandcanAdminTranscriptionin addition to the other permission fields. Read more aboutcanAdminin our docs. - New hook
useCPULoad: this hook keeps track of the CPU load state and reason (seegetCpuLoadStats()) via'cpu-load-change'events. - New hook
useRoomExp: this hook determines the meeting ejection date for the local participant, based oneject_after_elapsed,eject_at_room_expandexproom/token configuration.
Improvements
- Improved rendering performance of
useParticipantIdsanduseParticipantProperty: previously both hooks subscribed to all participant objects stored in the recoil state. This led to a lot of unexpected render cycles, e.g.useParticipantIds({ filter: 'remote' })would re-render when the local participant toggled their cam or mic. We've restructured the way we store and subscribe to changes in participant objects to achieve only targeted re-renders. Every instance ofuseParticipantIdsnow sets up its own local state of returned ids, and only updates the state when the resulting array of ids doesn't match the previously stored one. To keep the connection to the recoil state store, we're now using theuseRecoilTransactionObserver_UNSTABLEhook which worked flawlessly in our internal tests. Please be aware that with this change we've introduced at least 1 additional render cycle peruseParticipantIdsto initialize the state.