livekit-client 1.13.4 → 1.14.1

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -121,7 +121,10 @@ function handleTrackUnsubscribed(
121
121
  track.detach();
122
122
  }
123
123
 
124
- function handleLocalTrackUnpublished(publication: LocalTrackPublication, participant: LocalParticipant) {
124
+ function handleLocalTrackUnpublished(
125
+ publication: LocalTrackPublication,
126
+ participant: LocalParticipant,
127
+ ) {
125
128
  // when local tracks are ended, update UI to remove them from rendering
126
129
  publication.track.detach();
127
130
  }
@@ -254,13 +257,13 @@ You could also retrieve the last error with `LocalParticipant.lastCameraError` a
254
257
 
255
258
  Browsers can be restrictive with regards to audio playback that is not initiated by user interaction. What each browser considers as user interaction can vary by vendor (for example, Safari on iOS is very restrictive).
256
259
 
257
- LiveKit will attempt to autoplay all audio tracks when you attach them to audio elements. However, if that fails, we'll notify you via `RoomEvent.AudioPlaybackStatusChanged`. `Room.canPlayAudio` will indicate if audio playback is permitted. LiveKit takes an optimistic approach so it's possible for this value to change from `true` to `false` when we encounter a browser error.
260
+ LiveKit will attempt to autoplay all audio tracks when you attach them to audio elements. However, if that fails, we'll notify you via `RoomEvent.AudioPlaybackStatusChanged`. `Room.canPlaybackAudio` will indicate if audio playback is permitted. LiveKit takes an optimistic approach so it's possible for this value to change from `true` to `false` when we encounter a browser error.
258
261
 
259
262
  In the case user interaction is required, LiveKit provides `Room.startAudio` to start audio playback. This function must be triggered in an onclick or ontap event handler. In the same session, once audio playback is successful, additional audio tracks can be played without further user interactions.
260
263
 
261
264
  ```typescript
262
265
  room.on(RoomEvent.AudioPlaybackStatusChanged, () => {
263
- if (!room.canPlayAudio) {
266
+ if (!room.canPlaybackAudio) {
264
267
  // UI is necessary.
265
268
  ...
266
269
  button.onclick = () => {
@@ -315,7 +318,9 @@ If you are targeting legacy browsers, but still want adaptiveStream functionalit
315
318
  Also when targeting legacy browsers, older than the ones specified in our browserslist target, make sure to transpile the library code to your desired target and include required polyfills with babel and/or corejs.
316
319
 
317
320
  <!--BEGIN_REPO_NAV-->
321
+
318
322
  <br/><table>
323
+
319
324
  <thead><tr><th colspan="2">LiveKit Ecosystem</th></tr></thead>
320
325
  <tbody>
321
326
  <tr><td>Client SDKs</td><td><a href="https://github.com/livekit/components-js">Components</a> · <b>JavaScript</b> · <a href="https://github.com/livekit/client-sdk-swift">iOS/macOS</a> · <a href="https://github.com/livekit/client-sdk-android">Android</a> · <a href="https://github.com/livekit/client-sdk-flutter">Flutter</a> · <a href="https://github.com/livekit/client-sdk-react-native">React Native</a> · <a href="https://github.com/livekit/client-sdk-rust">Rust</a> · <a href="https://github.com/livekit/client-sdk-python">Python</a> · <a href="https://github.com/livekit/client-sdk-unity-web">Unity (web)</a> · <a href="https://github.com/livekit/client-sdk-unity">Unity (beta)</a></td></tr><tr></tr>