Releases: daily-co/daily-react
Releases · daily-co/daily-react
0.19.1
Bugfixes
useParticipantIds(): when using a customfilterorsortit was possible thatuseParticipantIds()would return stale state until for any affected participant aparticipant-updatedevent was emitted.useActiveSpeakerId(): the internally stored id of the last active speaker is now correctly reset when receiving aleft-meetingevent.useParticipantProperty(): when embedding a Daily React app inside Angular's NgZone, attempting to resolve aMediaStreamTrackproperty could result in a recursive loop, due to NgZone's monkey-patching behavior on certain browser objects. (Thanks @stewartmcgown!)
0.19.0
Changes
⚠️ Breaking change:useCallFrame: Instead of accepting the resolved value for a givenparentEl, it will now accept a React RefparentElRef. This generally improves the DX when working with conditionally rendered call frame wrappers.
// Before
const ref = useRef(null);
const callFrame = useCallFrame({
parentEl: ref.current,
});
// Now
const ref = useRef(null);
const callFrame = useCallFrame({
parentElRef: ref,
});- Removed unnecessary
playsInlineattributes from rendered<audio>elements - Updated devDependencies
0.18.0
Maintenance
- Adds
onTranscriptionMessagetouseTranscription()and deprecatesonTranscriptionAppData
This adds a behavioral change in how transcription messages are handled, when interim results were configured. In order to distinguish interim from final results, transcription needs to be configured with includeRawResponse: true. See startTranscription() for details.
0.17.3
Bugfixes
- Fixed an issue where
useTranscription()returnedisTranscribing: trueafter a meeting ended - Fixed an issue where
useActiveSpeakerId()unnecessarily initialized its state withnull, when an active speaker id was already present - Fixed an issue where
useAudioLevel()broke echo cancellation in Firefox, due to unintentionally playing out an audio track when it was meant to be analyzed only
0.17.2
Improvements
- When unmounting and remounting
DailyProvider,useCallObjectoruseCallFrame(), it will now correctly rewire to a previously created call instance, if one is available, and, when required, destroy it and create a new one. This further prevents duplicate call instance errors. useCallFrame()better handles a React DOM ref passed asparentEland will only create the call frame, when the referenced DOM element is ready. Make sure to initialize a DOM ref withuseRef(null).
0.17.1
Bugfixes
- Fixed an issue where
DailyProviderwould accidentally create an internal call object instance, although a custom call object instance was already provided through props - Fixed TypeScript definition for
parentElinuseCallFrame()to allownull - Fix TypeScript definition for
callObjectinDailyProviderto acceptnull, sinceuseCallObject()anduseCallFrame()themselves can returnnull - Fixed an issue where unmounting and remounting
DailyProvidercould lead toUncaught Error: Use after destroy
0.17.0
Features
- New hooks:
useCallFrame()anduseCallObject(). These are recommended overcreateFrame()andcreateCallObject()for React applications. They prevent theDuplicate DailyIframe instances are not allowederror by better managing call instances. This is especially useful given the asynchronous nature of call instance lifecycles and React's synchronous rendering.
Improvements
- Enhanced debugging experience in Daily React's hooks by incorporating
useDebugValue(). This allows for more insightful values in React DevTools, simplifying the debugging process in Daily React applications. - For
DailyAudioandDailyAudioTrack, theonPlayFailed()callback now includes detailed error information, featuring the original error's message and name. - Improved transcription state management in
useTranscription(). State management is now centralized in a parent component, eliminating redundant state management for transcriptions.
Deprecations
- We are deprecating
useActiveParticipant(),useLocalParticipant(), anduseParticipant()in favor ofuseParticipantProperty(). While theuse*Participant()hooks were effective for quick access to participant objects, they led to unnecessary render cycles due to subscriptions to all atomic changes for a participant.useParticipantProperty()allows subscribing only to essential participant properties, resulting in more efficient render cycles. - The
isTranscriptionEnabledproperty in theuseTranscription()hook is being removed, since the enable_transcription configuration property is no longer required.
0.16.0
Improvements
- Improved autocompletion for property paths in
tracks, when usinguseParticipantProperty - Added a new
examplesdirectory, with one minimal example
Bugfixes
- Fixed a race condition in
DailyAudiowhen assigning a participant to an<audio>element, who wasn't updated in React state, yet, which could lead to the participant not being heard. - Fixed the return value of
updateInputSettings, returned fromuseInputSettings
0.15.0
Bugfixes
useParticipantIds: Fixed an issue that caused temporary CPU spikes and potential memory leaks when handling participant events
We recommend updating from any version from 0.11.0 and upwards to this version.
0.14.1
Bugfixes
- Added missing export for
useDailyError