Releases: daily-co/daily-js
0.31.0
Features
-
A new permissions system allows you to specify a couple of different permissions for each participant:
canSend, which specifies which kinds of media the participant is allowed to send ('video','audio','screenVideo','screenAudio').hasPresence, which specifies whether the participant appears as “present” (as opposed to “hidden”) in the meeting, i.e. whether they are listed in everyone’sparticipants().
Participant permissions can be specified in a couple of ways:
- Initial default permissions for new participants in your domain, room, or meeting token configurations
- A meeting owner can change other participants’ permissions at runtime with a call to
updateParticipant()orupdateParticipants(), e.g.updateParticipant('<participant-id>', { updatePermissions: { canSend: new Set(['video', 'audio']), hasPresence: true } })
-
The code that daily-js downloads before you join a call is now “pinned” to this version of daily-js. That means you will no longer get (in many cases, unwanted) updates to Daily client-side code without updating your daily-js dependency. Read more about this change in the last version’s release notes.
Bugfixes
- We fixed a bug where if you attempted to update your desired max spatial layer for some subscribed media (via
updateReceiveSettings({ '<participant-id>': { video: { layer: } } }), say) while the subscription was still being established, the updated layer would never take effect. getNetworkTopology()will now return the currently-chosen topology as soon as we know it, not after a delay.- We’ve stopped polluting your Sentry logs with our noisy breadcrumbs.
- If you
setUserData(null), other participants will see youruserDatachange tonull, notundefined.
Other improvements
- Some optimizations to client-server signaling messages.
0.30.0
⚠ Notice: May require action
Dynamic updates to previous daily-js versions will end
Today, if you're using daily-js in call object mode, you may have noticed that certain bug fixes and updates are applied automatically to your client code, regardless of the version of daily-js you're using. Sometimes, these dynamic updates can introduce slight changes to the behavior of the API.
We’ve received feedback from developers who are looking for more stability and want more control over when these fixes and updates end up in their client implementations.
So, starting in an upcoming version of daily-js, bug fixes and updates will no longer be automatically applied to previous versions of daily-js, reducing unexpected changes for users of our library.
Going forward, if you’re using a numbered version of daily-js in call object mode, you will need to periodically update to the latest version in order to receive any of the latest fixes or improvements*.
If you're using daily-js to embed Daily Prebuilt, there's no change; you'll continue to get the latest embedded Daily Prebuilt experience (though you might choose to regularly update daily-js to take advantage of its latest API improvements*).
*Note: Daily commits to supporting previous daily-js versions released up to 6 months ago, so you'll want to at least update to stay within that support window.
Features
-
🗣️ Experimental: User Data API
This preview of a new API is meant to allow customers to set and share custom participant state, like whether a participant in a call has raised their hand. The data is tied to a single participant, settable at join time, dynamically updatable, and retrievable remotely as data on each participant.
The data can be any JSON-serializable JavaScript object less than 4096 characters in length. It can be set via the new
userDataFrame property, or as a parameter to the new methodsetUserData, and it can be read as a key on participant, e.g.participants()['local'].userData.Note: this data is not intended for frequent, rapid updates. For example, it would not be ideal for storing real-time location of moving users within a spatial call application. Local state will be set immediately, and remote state will eventually reflect the last call made.
Full documentation for this feature will be released in the future as it matures.
-
🚀 Allow setting an idle timeout for streaming
When a user switches to another tab, some browsers throttle the CPU and cause their stream to pause. Idle timeout logic on our worker will stop livestreams or recordings automatically in this scenario, so we now allow users to override this behaviour and let streams run on for a configurable time before timing out as idle.
Control this behaviour by setting the new key
minIdleTimeOutto a number of seconds in the DailyStreamingOptions object supplied to either thestartRecordingorstartLivestreamingdaily-js methods. For example:startRecording({ width: 1920, height: 1080, fps: 30, minIdleTimeOut: 5 * 60, // five minutes, the current default });
Bugfixes
- 🐛 Allow
joined_atto be undefined, and prevent it from being set before it has a reasonable value. (Fixes Github issue #191).
Other Improvements
- 💻 Update streaming/recording APIs to allow specifying an
instanceId. This lays the groundwork for some day enabling multiple active recordings and/or livestream instances per call. - 📷 Add new
selected-devices-updatedevent which will fire whensetOutputDeviceAsyncis called, to allow applications to respond to output device changes.
0.29.0
Bugfixes
- Make it so you no longer have to do the strange
globalThis.regeneratorRuntime = undefinedworkaround to avoid a CSP-unfriendly'unsafe-eval'when you’re using Babel. See our guide on how to set up your Content Security Policy.
Other improvements
- Add TypeScript types for specifying custom video layout parameters in the
startRecording()andstartLiveStreaming()methods. - Pre-beta: Add TypeScript types to
DailyParticipantfacilitating handling a remote media player participant initiated withstartRemoteMediaPlayer(). Specifically, addtracks.rmpVideo,tracks.rmpAudio, andparticipantType(which will be'remote-media-player'for remote media player participants). - Add an advanced (not generally recommended) configuration option,
callObjectBundleUrlOverride, nested underdailyConfigin theDailyIframeproperties. This makes it possible for you to, say, host the dynamically-downloaded call machine bundle yourself in order to have a stricter CSP. If the previous sentence doesn’t make a ton of sense to you, no sweat: ignore this configuration option! Again, it’s not recommended for most usage.
0.28.0
Features
- Adds
nullas a possible value foraudioDeviceIdandvideoDeviceIdinsetInputDevicesAsync(), which will result in keeping the current media track for that device. For example, passing in{audioDeviceId: “device_id”, videoDeviceId: null}will get a new audio track but keep your current video track, allowing you to avoid a camera “blip”. - Adds a new
recordings_bucketroom and/or domain property to allow cloud recordings to be stored in a custom AWS S3 bucket. This allows HIPAA-enabled domains to use our cloud recording functionality. - Adds a
setOutputDeviceAsync()method.setOutputDevice()is now deprecated. This brings both device management functionssetInputDevicesAsync()andsetOutputDeviceAsync()to functional parity.
0.27.0
Features
- Added ability to add/remove rtmp endpoints for live streaming
- See the
endpointsargument instartLiveStreamingand the new methodsaddLiveStreamingEndpointsandremoveLiveStreamingEndpointsfor more details.
- See the
- Added new
DailyAdvancedConfigflag,noAutoDefaultDeviceChange, to turn off the default behavior of automatically switching the device when the default device is selected and changes. - You can opt in to making daily-js behave in a CSP-friendly way by specifying
dailyConfig: { avoidEval: true }wherever you provide your call options. If you do so, using daily-js will no longer require you to use'unsafe-eval'in yourscript-srcdirective. IMPORTANT: you will, however, have to specifyhttps://*.daily.coin its place. - Transcription Improvements: Added the ability to set the language and model for transcriptions as well as introduced new ‘who done it’ fields in the transcription started/stopped events.
- See
startTranscriptionfor details on the new options available - See the new
startedByfield intranscription-startedandupdatedByfield intranscription-stoppedevents
- See
- Added ability to configure high quality audio output when in SFU mode. See new fields in the
dailyConfigobject included in the frame propertiesmicAudioMode: defaults tonull. set tomusicto increase the average bitrate of the microphone track to 256K.userMediaAudioConstraints: allows you to pass in custom media track constraints for use in thegetUserMediacall for the microphone track.
Bugfixes
- Fixed type information for
DailyStreamingEndpoint
Other improvements
- Added Hermes-compatible dev builds
- Add clearer error message for when caller uses unexpected key for custom button
0.26.0
Features
- Added support for setting the
fpsof a live stream through the live streaming options - Implemented new warnings messages and logs for when clients are on daily-js versions nearing end of support as well as error messages and logs for when they are on daily-js versions no longer supported.
- beta: When using
updateInputSettings()to enablebackground-image, allow data url types in lieu of http urls for the source image. - Introduced a new method and corresponding event for tracking the number of participants in a call (including the local participant). Previously, the best way to get at the participant count was to check the number of entries in
participants(), but that list can take a little while to populate when first joining a call and will not include all the participants in future large meeting use cases.-
participantCounts(): new function that returns an object containing the number ofpresentandhiddenparticipants in the call.presentparticipants are ones that provide a presence—i.e. ones that are or will soon be in yourparticipants()list.hiddenparticipants are participants that are participating in the call but not providing any presence—i.e. people passively watching a broadcast. Support for hidden participants will be coming soon.call.participantCounts(); // returns // { // present: <number of participants providing presence data> // hidden: <number of participants not providing presence data> // }
-
participant-counts-updated: a new event to listen for which is emitted any time the participant counts change.call.on('participant-counts-updated', (e) => {}); // where e is: // { // action: 'participant-counts-updated' // participantCounts: { // present: <number of participants providing presence data> // hidden: <number of participants not providing presence data> // } // }
-
Bugfixes
- Fixed the check in the
room()query so that it works and is available as soon as possible.
0.25.0
Features
- 📉 Added types for new packet loss fields,
totalSendPacketLossandtotalRecvPacketLoss, in thegetNetworkStats()response
Bugfixes
- 🐛 Prebuilt-only: Fixed issue where the Promise resolved too early on calls to
leave()in iframe mode, causing issues for quick re-join()s.
Other improvements
- 💀 Deprecated the optional
publishflag in the input processor settings. - Prebuilt-only,
⚠️ Pre-Beta⚠️ : Implemented preliminary API for supporting custom buttons in the prebuilt UI.
0.24.0
Features
- ✨ Beta ✨ New
enable_pip_uiroom and domain configuration property to enable Daily Prebuilt's Picture in Picture controls. When PiP is enabled, the video tile will show the active speaker or a grid view, depending on your current Daily Prebuilt settings.
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $DAILY_API_KEY" \
-XPOST -d \
'{"properties":{"enable_pip_ui":true}}' \
https://api.daily.co/v1/-
🪞 Our
enable_prejoin_uiproperty is now available as a meeting token configuration, in addition to its existing room and domain configuration properties. This new token property will override the room and domain values for the same property. -
🌊 Live streaming improvement: Automatically retry RTMP connections if there is an error unless the URLs have all failed.
-
📦 Advanced: Override default video constraints that Daily uses when it calls
getUserMedia()by providing a new DailyIframe property:userMediaVideoConstraints
const callObject = DailyIframe.createCallObject({
url,
dailyConfig: {
userMediaVideoConstraints: { frameRate: 10 },
},
});userMediaVideoConstraints can be a MediaTrackConstraints object or true when used with react-native-daily-js.
-
▶️ persistentTrackis now officially in Daily's TypeScript definitions! 🎉 Using this track in your app can help avoid browser bugs related to auto-playing media tracks. -
🔀
startCamera()can now be used without aurlparameter, in case you want to change the Daily room in between callingstartCamera()and pre-authenticating or joining the room.
Bugfixes
- 🐛 Flip the assumption that a user is on Plan B, because it’s no longer a good assumption. At this point >99% of users are on unified plan browsers, so if there is a race condition for the browser information not being available, we should assume the browser can support unified and not vice-versa.
- 🐞 Fix virtual background key typo from throwing an error and causing a freeze by scrubbing invalid processor keys.
0.23.0
Features
- Beta: Replacing your video background with an image is now supported, using the
updateInputSettings()method. You can specify any custom image, or select from one of 10 pre-canned images provided by Daily, or just rely on Daily’s default background image:
callObject.updateInputSettings({
video: {
processor: {
type: 'background-image',
config?: {
source?: 'default' | <public url to jpg, jpeg, or png> | <int: 1-10>
}
}
}
});- Pre-beta:
startRemoteMediaPlayer()now allows you to specify simulcast encoding settings:
callObject.startRemoteMediaPlayer({
url: 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',
settings: {
state: 'play',
simulcastEncodings: [
{ maxBitrate: 80000, maxFramerate: 10, scaleResolutionDownBy: 4 },
{ maxBitrate: 200000, maxFramerate: 15, scaleResolutionDownBy: 2 },
{ maxBitrate: 600000, maxFramerate: 30}]
}
});- Pre-beta: You can now get a new
errorType—'remote-media-player-error'—in the'nonfatal-error'event, when an error occurs in a remote media player (started withstartRemoteMediaPlayer()).
Bugfixes
- If you’ve specified a
falseinput device either up-front (i.e.join({ url, audioSource: false })) or in the middle of a call (i.e.setInputDevicesAsync({ audioSource: false })), then the corresponding track state will now be reported as'off'as if it were a normal user mute (i.e.setLocalAudio(false)):
callObject.participants().local.tracks.audio.state; // 'off'
callObject.participants().local.tracks.audio.off.byUser; // true
// ...and from another participant's point of view...
callObject.participants()['some-id'].tracks.audio.state; // 'off'
callObject.participants()['some-id'].tracks.audio.off.byUser; // truePrior to this change, participants would see tracks with no backing input source reported as either permanently 'interrupted' (if it was their own track) or permanently 'loading' (if it was a remote track).
Other improvements
- Pre-beta:
room()info now returns whether your domain has theenable_advanced_chatfeature flag set (which controls a Prebuilt-only pre-beta feature).
0.22.0
Features
- Prebuilt Only: Introduced a new
enable_people_uiroom and domain property which allows for enabling/disabling prebuilt’s people panel. - Prebuilt Only (experimental): Introduced a new
experimental_optimize_large_callsroom property which enables various optimizations for supporting large calls such as- auto muting people when the join
- subscribing only to the most recent 8 speakers' audio tracks
- disables active speaker view
- limiting the grid view to a maximum 12 video tiles
- set the maximum number of subscriptions to 30
- Added a new
nonfatal-errorevent type for reporting screenshare issues. Now if there is an error when a user tries to start screen sharing, you can catch this with the following:
call.on('nonfatal-error', (evt) => {
if (evt.type === 'screen-share-error') {
console.log(evt.errorMsg);
}
});- Experimental!!!: Introduced new API for adding, controlling, and subscribing to external media sources (i.e. remote media player) to a daily call as one of the participants in a meeting. This API is in progress. If you are interested in using it, please contact help@daily.co.
Bugfixes
- Fixed unhandled error for invalid URLs during bundle load
Other improvements
- Updated type for
app-messageevent payload to accept generic data type - Added ability to serve up daily-js using webpack-dev-server