Releases: daily-co/daily-js
Releases · daily-co/daily-js
0.14.0
Features
- Added
byDeviceInUse
as a possibleparticipants().local.tracks.video.blocked
property. Now, when Daily can't access a camera on Windows because another app is using it,participants().local.tracks.video.blocked.byDeviceInUse
will be set totrue
, and a'participant-updated'
event will fire. This sets you up to handle the use case (say, by showing a prompt asking your user to close other apps that might be using the camera).
0.13.0
Features
- A new 'lang-updated' event fires when setDailyLang() is called and changes the call language. The payload includes two values:
lang
andlangSetting
.lang
is the language currently in effect.langSetting
is the value the user explicitly specified (e.g. viasetDailyLang()
) that resulted in that language ultimately being set. For example, if you callsetDailyLang('en')
, both yourlang
and yourlangSetting
will be'en'
. If you callsetDailyLang('user')
, where'user'
is a special language setting that instructs Daily to use the user’s browser’s language preference, thenlangSetting
will be'user'
andlang
will be the language chosen based on the browser setting:'en'
,'fr'
,'pt'
, or any other Daily-supported language. - A new getMeetingSession() method returns the current meeting session id. A meeting session is a set of one or more people in a room together during a specific time window.
- A new 'meeting-session-updated' event fires when your meeting session changes. One meeting session ends and another begins, for example, when you've been sitting alone in a room for 10 minutes (cricket, cricket).
- Norwegian language support has been added in Daily Prebuilt (language code
'no'
).
Bugfixes
- Squashed a bug where if you invoked two or more async methods (like getInputDevices(), room(), requestAccess(), etc.) within the same millisecond, some of those methods might never have resolved.
- When a call-ending error happens while using Daily Prebuilt, the call iframe will no longer be cleared. Instead, a relevant user-friendly error message (which might be an oxymoron) will be displayed.
0.12.0
Features
- A new
updateLiveStreaming()
method exists to let you update on the fly parameters of a live stream you've previously started withstartLiveStreaming()
. So far the only parameter you can update islayout
. - A new
'active-participant'
layout preset has been added for live streaming:startLiveStreaming({ rtmpUrl: <url>, layout: { preset: 'active-participant' } })
. - You can now specify
'user'
as a value when invokingsetDailyLang()
or as alang
property when invokingjoin()
,preAuth()
,startCamera()
, or factory methods likecreateFrame()
.'user'
instructs Daily to use the user's preferred language as specified by the browser. - A new method,
getDailyLang()
returns a Promise that resolves to{ lang: <language>, langSetting: <specified language> }
, telling you both the language actually in effect and the language you've specified. For example, if you've specified'user'
as your language,getDailyLang()
might give you{ lang: 'en', langSetting: 'user'}
.
Bugfixes
width
andheight
have been added as arguments in the TypeScript declaration of thestartLiveStreaming()
method.
Other improvements
supportedBrowser().supported
now returnsfalse
for Edge 18. So long, Edge 18, it's been a wild ride 👋.'error'
and'camera-error'
event payloads now include an optionalerror
field in addition to the existingerrorMsg
field. This newerror
field includes atype
(which you can think of as an error code but a string constant) and an optionallocalizedMsg
, which can provide you with a localized UI-friendly message describing the error. Note that not all kinds of errors have anerror
field yet—seeindex.d.ts
'sDailyCameraErrorType
andDailyFatalErrorType
for supported error types so far—but the eventual goal is that you'll be able to stop relying onerrorMsg
in your code to identify errors.- The
preAuth()
method will now put the meeting into an'error'
state (meetingState() === 'error'
) if it determines that a provided join token is expired or not yet valid or if the room is expired or not yet valid, and will fire a corresponding'error'
event. This behavior better matchesjoin()
's behavior.
0.11.1
Bugfixes
- Fix a minor TypeScript declaration gaffe (
maxCamStreams
-->max_cam_streams
)
0.11.0
Features
participants()[id].tracks.audio.off
andparticipants()[id].tracks.video.off
may now includebyRemoteRequest: true
when a participant is explicitly muted by a meeting owner invokingupdateParticipant(id, { setAudio: false })
orupdateParticipant(id, { setVideo: false })
or theupdateParticipants()
(plural) equivalent calls. Note that whenbyRemoteRequest: true
is set,byUser: true
will also be set, so that you don't have to change any existing code and can continue treating meeting-owner-triggered mutes as regular mutes. When a user unmutes themselves,byRemoteRequest
disappears along withbyUser
.- You can now specify
max_cam_streams
when using the defaultlayout
instartLiveStreaming()
(e.g.startLiveStreaming({ rtmpUrl, backgroundColor, layout: { preset: 'default', max_cam_streams: 4 } })
. This will limit the number of camera streams included in the live stream to the specified number. The current default value is 9, which is also the maximum number that may be specified.
Other improvements
- The TypeScript definition of the 'recording-started' event payload now includes
local
(a boolean) andrecordingId
.
0.10.0
Features
-
(BETA) If you're using the Daily call object along with WebSocket signaling (
signaling_impl = 'ws'
in your room config), then you can try out a new set of room access control APIs geared towards implementing flows like a "lobby" where users can request full access to a meeting and wait for a meeting owner to let them in—behavior that previously only existed in the prebuilt UI. Briefly, these new methods and events let you:- Know your access level, even before attempting to join a meeting (
preAuth()
,accessState()
,'access-state-updated'
) - Request elevated access to a meeting (
requestAccess()
) - Manage pending access requests, if you're a meeting owner (
waitingParticipants()
,updateWaitingParticipant()
,updateWaitingParticipants()
,'waiting-participant-added'
,'waiting-participant-updated'
,'waiting-participant-removed'
)
You can read more about our new API methods and events in our reference docs. Make sure to check out the
privacy
andenable_knocking
room flags! - Know your access level, even before attempting to join a meeting (
Bugfixes
setInputDevicesAsync()
andgetInputDevices()
can now more reliably be used anytime before invokingjoin()
.- The
'fullscreen'
and'exited-fullscreen'
events now have the expected payloads:{ action: 'fullscreen' }
and{ action: 'exited-fullscreen' }
, respectively.
Other improvements
- New versioning scheme, with an incrementing minor version! We got tired of all the 9's 😛
0.9.999
Features
recording-started
andrecording-stopped
events now fire for all participants—not just the recorder—when someone starts recording the meeting. Additionally,DailyParticipant
objects (the ones returned byparticipants()
) have a new record field that indicates whether the participant is recording.
0.9.998
Features
- You can now update all participants at once using the
*
key in theupdateParticipants()
method. Example:callObject.updateParticipants({'*': {setSubscribedTracks: true}});
. - The
room()
method returns a more complete set ofconfig
properties describing the room you're currently in, as well asdomainConfig
properties describing the room's domain. This new set of properties includes explicitly-set properties as well as default ones. To see only default properties, pass in a new{includeRoomConfigDefaults: false}
argument.
Bugfixes
- Improved track subscription performance and fixed race conditions when updating multiple tracks. When changing subscriptions for multiple participants, it is highly recommended to use the
updateParticipants()
(plural) call over multiple calls toupdateParticipant()
in order to batch updates and expedite subscription changes. Also—as described in "Features", above—you can now update all participants at once using the*
key in theupdateParticipants()
method*.*
0.9.997
Features
- The DailyParticipant type—the one populating the
participants()
dictionary as well as participant event payloads—now contains more detailed track state in a new tracks property, enabling you to build more expressive call UI. See below for the shape of this new property. For a more detailed description, check out our reference docs. For an example of how to use these new properties, check out our React demo app.
tracks: {
audio: {
subscribed: boolean;
state:
| 'blocked'
| 'off'
| 'sendable'
| 'loading'
| 'interrupted'
| 'playable';
blocked?: {
byDeviceMissing?: boolean;
byPermissions?: boolean;
};
off?: {
byUser?: boolean;
byBandwidth?: boolean;
};
track?: MediaStreamTrack;
};
video: { /* same */ };
screenAudio: { /* same */ };
screenVideo: { /* same */ };
}
- Programmatic control in iframe mode over whether your local video is displayed in the corner, with a setter (
setShowLocalVideo()
), a getter (showLocalVideo()
), and a property to pass into factory methods or at meeting join time (showLocalVideo
). - Programmatic control in iframe mode over whether the participants bar (the row of videos during a screenshare) is displayed, with a setter (
setShowParticipantsBar()
), a getter (showParticipantsBar()
), and a property to pass into factory methods or at meeting join time (showParticipantsBar
). - New method
setUserName()
for programmatically setting the user name that other participants see either visually in the prebuilt UI or through theuser_name
property in theDailyParticipant
object corresponding to you.
Bugfixes
- When leaving an iframe-based meeting by clicking the leave button in the iframe, stale participants from that meeting would "linger" in
participants()
, necessitating the creation of a newDailyIframe
for a new meeting. This has been fixed.
Other improvements
- TypeScript declaration fixes for
track-started
andtrack-stopped
events. - TypeScript declaration update to add
screenAudio
subscription option. - TypeScript declaration fixes wherever CSS properties are expected.
0.9.996
Features
setInputDevicesAsync()
, a Promise-based version ofsetInputDevices()
. It’s recommended that you wait until input devices are set before invokingsetLocalAudio()
orsetLocalVideo()
, to avoid race conditions.- [React Native] Four methods that were previously web-only are now enabled in React Native:
updateParticipant()
updateParticipants()
setSubscribeToTracksAutomatically()
subscribeToTracksAutomatically()