mirror of
https://github.com/vector-im/element-call.git
synced 2026-10-16 23:45:50 +00:00
Merge LocalMediaInputs into MatrixRTCClientOptions
The SDK now takes `publish` requests and audio output control directly in the main options object, removing the separate `LocalMediaInputs` type. Audio output device selection moves from a reactive behavior to an imperative method on `MatrixRTCClient`, giving hosts direct control over when devices switch.
This commit is contained in:
+1
-5
@@ -19,7 +19,6 @@ Call's own `CallViewModel` is built on it. It depends on nothing in Element Call
|
||||
|
||||
```ts
|
||||
import {
|
||||
constant,
|
||||
createMatrixRTCClient,
|
||||
E2eeType,
|
||||
MatrixRTCMode,
|
||||
@@ -31,13 +30,10 @@ const rtcClient = createMatrixRTCClient(
|
||||
scope,
|
||||
client, // a matrix-js-sdk MatrixClient, logged in and syncing
|
||||
room, // the matrix-js-sdk Room, from client.getRoom() once the join has synced
|
||||
{
|
||||
publish: [{ source: "microphone" }, { source: "camera" }],
|
||||
audioOutputDeviceId$: constant(undefined),
|
||||
},
|
||||
{
|
||||
encryptionSystem: { kind: E2eeType.PER_PARTICIPANT },
|
||||
matrixRTCMode: MatrixRTCMode.Compatibility,
|
||||
publish: [{ source: "microphone" }, { source: "camera" }],
|
||||
},
|
||||
);
|
||||
rtcClient.join();
|
||||
|
||||
Reference in New Issue
Block a user