Skip to content

Releases: daily-co/daily-js

0.31.0

19 Sep 14:31

Choose a tag to compare

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’s participants().

    Participant permissions can be specified in a couple of ways:

  • 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 your userData change to null, not undefined.

Other improvements

  • Some optimizations to client-server signaling messages.

0.30.0

22 Aug 18:50

Choose a tag to compare

⚠ 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 userData Frame property, or as a parameter to the new method setUserData, 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 minIdleTimeOut to a number of seconds in the DailyStreamingOptions object supplied to either the startRecording or startLivestreaming daily-js methods. For example:

    startRecording({
      width: 1920,
      height: 1080,
      fps: 30,
      minIdleTimeOut: 5 * 60, // five minutes, the current default
    });

Bugfixes

  • 🐛 Allow joined_at to 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-updated event which will fire when setOutputDeviceAsync is called, to allow applications to respond to output device changes.

0.29.0

29 Jul 17:35

Choose a tag to compare

Bugfixes

Other improvements

  • Add TypeScript types for specifying custom video layout parameters in the startRecording() and startLiveStreaming() methods.
  • Pre-beta: Add TypeScript types to DailyParticipant facilitating handling a remote media player participant initiated with startRemoteMediaPlayer(). Specifically, add tracks.rmpVideo, tracks.rmpAudio, and participantType (which will be 'remote-media-player' for remote media player participants).
  • Add an advanced (not generally recommended) configuration option, callObjectBundleUrlOverride, nested under dailyConfig in the DailyIframe properties. 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

07 Jul 19:18

Choose a tag to compare

Features

  • Adds null as a possible value for audioDeviceId and videoDeviceId in setInputDevicesAsync(), 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_bucket room 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 functions setInputDevicesAsync() and setOutputDeviceAsync() to functional parity.

0.27.0

16 Jun 20:37

Choose a tag to compare

Features

  • Added ability to add/remove rtmp endpoints for live streaming
    • See the endpoints argument in startLiveStreaming and the new methods addLiveStreamingEndpoints and removeLiveStreamingEndpoints for more details.
  • Added new DailyAdvancedConfig flag, 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 your script-src directive. IMPORTANT: you will, however, have to specify https://*.daily.co in 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.
  • Added ability to configure high quality audio output when in SFU mode. See new fields in the dailyConfig object included in the frame properties
    • micAudioMode: defaults to null. set to music to increase the average bitrate of the microphone track to 256K.
    • userMediaAudioConstraints: allows you to pass in custom media track constraints for use in the getUserMedia call 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

17 May 18:04

Choose a tag to compare

Features

  • Added support for setting the fps of 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 enable background-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 of present and hidden participants in the call. present participants are ones that provide a presence—i.e. ones that are or will soon be in your participants() list. hidden participants 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

14 Apr 14:33

Choose a tag to compare

Features

  • 📉 Added types for new packet loss fields, totalSendPacketLoss and totalRecvPacketLoss, in the getNetworkStats() 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 publish flag in the input processor settings.
  • Prebuilt-only, ⚠️ Pre-Beta ⚠️ : Implemented preliminary API for supporting custom buttons in the prebuilt UI.

0.24.0

30 Mar 18:38

Choose a tag to compare

Features

  • ✨ Beta ✨ New enable_pip_ui room 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_ui property 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.

  • ▶️ persistentTrack is 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 a url parameter, in case you want to change the Daily room in between calling startCamera() 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

15 Feb 22:28

Choose a tag to compare

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 with startRemoteMediaPlayer()).

Bugfixes

  • If you’ve specified a false input 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; // true

Prior 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 the enable_advanced_chat feature flag set (which controls a Prebuilt-only pre-beta feature).

0.22.0

18 Jan 17:18

Choose a tag to compare

Features

  • Prebuilt Only: Introduced a new enable_people_ui room and domain property which allows for enabling/disabling prebuilt’s people panel.
  • Prebuilt Only (experimental): Introduced a new experimental_optimize_large_calls room 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-error event 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-message event payload to accept generic data type
  • Added ability to serve up daily-js using webpack-dev-server