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:
@@ -77,7 +77,7 @@ export function createLivekitBackend(
|
||||
{
|
||||
roomId,
|
||||
ownMembershipIdentity,
|
||||
localMedia,
|
||||
publish,
|
||||
encryptionSystem,
|
||||
mediaKeys$,
|
||||
timings,
|
||||
@@ -89,13 +89,17 @@ export function createLivekitBackend(
|
||||
const keyProvider = createKeyProvider(encryptionSystem, mediaKeys$, logger);
|
||||
const transports = createTransportRegistry(scope);
|
||||
const localTransport$ = new ReplaySubject<LocalTransport>(1);
|
||||
const audioOutputDeviceId$ = new BehaviorSubject<string | undefined>(
|
||||
undefined,
|
||||
);
|
||||
|
||||
const connectionManager = createConnectionManager$({
|
||||
scope,
|
||||
connectionFactory: new LivekitConnectionFactory(
|
||||
client,
|
||||
roomId,
|
||||
localMedia,
|
||||
publish,
|
||||
audioOutputDeviceId$,
|
||||
keyProvider,
|
||||
mediaQuality,
|
||||
),
|
||||
@@ -215,7 +219,8 @@ export function createLivekitBackend(
|
||||
scope,
|
||||
connectionManager,
|
||||
localTransport$,
|
||||
localMedia,
|
||||
publish,
|
||||
audioOutputDeviceId$,
|
||||
encryptionSystem,
|
||||
logger,
|
||||
});
|
||||
@@ -233,6 +238,7 @@ export function createLivekitBackend(
|
||||
local: localMedia_,
|
||||
mediaFor$,
|
||||
connections$,
|
||||
setAudioOutputDeviceId: localMedia_.setAudioOutputDeviceId,
|
||||
sendData,
|
||||
data$,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user