Releases: livekit/client-sdk-js
v0.15.3
v0.15.1
v0.15.0
Room-before-connect API
In the initial version of LiveKit, it was not possible to create a Room object before it's fully connected. That design decision made it impossible to attach event listeners onto the Room before it was connected. The new API looks like this:
const room = new Room(opts?: RoomOptions)
// attach listeners
room.on(...)
await room.connect(url: string, token: string, opts?: RoomConnectOptions)
Top level connect
will still be supported for backwards compatibility. Several functions have been moved as well:
createLocalTracks
-> LocalParticipant.createTrackscreateLocalVideoTrack
-> LocalParticipant.createTracks({video: true})createLocalAudioTrack
-> LocalParticipant.createTracks({audio: true})createLocalScreenTracks
-> LocalParticipant.createScreenTracks
Other changes
- Improved resize auto-management, reducing visible delay #84
- Participant is passed as argument to
RoomEvent.ParticipantMetadataChanged
#86 - Explicitly send video layers in use to SFU #85
- Ability to unpublish tracks without stopping them #87
- Improve bitrate & publishing defaults #89
- Improved sample app #90 #94
v0.14.3 - automatic track management
Automatic quality management
The SDK could now automatically control the quality of video tracks it's subscribing to match the UI elements they are attached to. It will also perform visibility detection on elements and pause video subscriptions when they are not visible. This improvement drastically improves the number of tracks clients can subscribe to and reduces bandwidth requirements.
Other changes
- Screen share audio is a track source #71
- Fix multiple tracks of the same source being published 1c6b68f
- Option to keep local tracks to keep running after disconnection #79
Thanks to @lukasIO for proposing and contributing the improvements
v0.14.0
Connection Quality Updates
Supports connection quality updates sent from the server. It'll be available the local participant as well as any other participants that you are subscribed to.
Requires server v0.14.0
participant.connectionQuality
room.on(RoomEvent.ConnectionQualityChanged, (quality: ConnectionQuality, participant: Participant) => {
// handle changes
})
Other changes
- Option to stop underlying microphone track when muted #76
- Fixed data not published when just connected on Firefox #74
- Emits
LocalTrackUnpublished
event when local track is unpublished #72 - Set default audio publish bitrate to
speech
d038c52 - Correctly override track name #70
- Cleaner logger use #69
0.13.6
- Fixed data track publishing in Safari bfb009b
0.13.5
- Avoid downgrading simulcast layers too early #61
- Fixed restartTrack for audio in Safari 2b97b81
- Handle capture device failures #66
- Support aspectRatio constraint in videoResolution #64
Thanks to @lukasIO for his numerous contributions! 🙇
v0.13.4
Improved interface to track defaults
Separated default track capturing options from publishing options. Now connect
takes in clear, explicit options for those default. #58
Fires LocalTrackPublished
event to make it possible to determine when connect tracks have been successfully published.
Other bug fixes
v0.13.1 - Simple track APIs
To take full advantage of new features in this version, you'll need server v0.13.5 or later
Track Sources & Simpler APIs
This release added helper APIs to manipulate common track sources: Camera, Microphone, and ScreenShare. To enable/disable a track, we now offer explicit APIs to access them.
On LocalParticipant
, we are introducing three new APIs
setCameraEnabled(bool)
setMicrophoneEnabled(bool)
setScreenShareEnabled(bool)
When using these APIs, user media will be automatically acquired for you. You can still set the default track options on the room by either passing them in during connect()
, or changing them later on the room by setting room.defaultTrackOptions
Similarly, it's quite a bit simpler to check if a RemoteParticipant is publishing a particular track. on Participant
isCameraEnabled
isMicrophoneEnabled
isScreenShareEnabled
A track is considered enabled when it's published and not muted.
Device Management APIs
We are also making it easier to list and select input and output devices available to the browser via a set of simple APIs. To list valid devices available, use Room.getLocalDevices(MediaDeviceKind)
, where MediaDeviceKind is 'audioinput' | 'audiooutput' | 'videoinput'
You can also listen to changes to devices with RoomEvent.MediaDevicesChanged
You can also switch the active device that's used in the room using room.switchActiveDevice(MediaDeviceKind, deviceId)
. When setting the audio output device, all <audio>
elements that are attached to any tracks in this room will be set to output to that device (by using setSinkId
, which isn't supported on all browsers).
Transceiver Re-use
We are now re-using WebRTC Transceivers when receiving tracks. This helps to keep the offer/answer SDP messages to as small as possible, and scales much better to larger conferences where participants are entering/leaving or if selective subscriptions are used. #51
Opus DTX
Opus DTX is now enabled by default. It helps to conserve bandwidth especially when audio tracks are silent. To disable DTX, pass in dtx: false
in TrackPublishOptions
#49
Room Metadata support
Thanks to @FeepsDev @lukasIO, we now support room level metadata. RoomEvent.RoomMetadataChanged
is fired for all participants when there are changes to the room metadata. #47
Other changes
- Track mute/unmute now returns a promise #55
- Improved sample app