fix js-doc
This commit is contained in:
@@ -67,7 +67,7 @@ export type OpenIDClientParts = Pick<
|
|||||||
* to the matrix RTC backend in order to get acces to the SFU.
|
* to the matrix RTC backend in order to get acces to the SFU.
|
||||||
* It has built-in retry for calls to the homeserver with a backoff policy.
|
* It has built-in retry for calls to the homeserver with a backoff policy.
|
||||||
* @param client The Matrix client
|
* @param client The Matrix client
|
||||||
* @param membership
|
* @param membership Our own membership identity parts used to send to jwt service.
|
||||||
* @param serviceUrl The URL of the livekit SFU service
|
* @param serviceUrl The URL of the livekit SFU service
|
||||||
* @param forceOldJwtEndpoint This will use the old jwt endpoint which will create the rtc backend identity based on string concatination
|
* @param forceOldJwtEndpoint This will use the old jwt endpoint which will create the rtc backend identity based on string concatination
|
||||||
* instead of a hash.
|
* instead of a hash.
|
||||||
@@ -75,9 +75,9 @@ export type OpenIDClientParts = Pick<
|
|||||||
* For remote connections this does not matter, since we will not publish there we can rely on the newest option.
|
* For remote connections this does not matter, since we will not publish there we can rely on the newest option.
|
||||||
* For our own connection we can only use the hashed version if we also send the new matrix2.0 sticky events.
|
* For our own connection we can only use the hashed version if we also send the new matrix2.0 sticky events.
|
||||||
* @param roomId The room id used in the jwt request. This is NOT the livekit_alias. The jwt service will provide the alias. It maps matrix room ids <-> Livekit aliases.
|
* @param roomId The room id used in the jwt request. This is NOT the livekit_alias. The jwt service will provide the alias. It maps matrix room ids <-> Livekit aliases.
|
||||||
* @param delayEndpointBaseUrl
|
* @param delayEndpointBaseUrl The URL of the matrix homeserver.
|
||||||
* @param delayId
|
* @param delayId The delay id used for the jwt service to manage.
|
||||||
* @param logger
|
* @param logger optional logger.
|
||||||
* @returns Object containing the token information
|
* @returns Object containing the token information
|
||||||
* @throws FailToGetOpenIdToken
|
* @throws FailToGetOpenIdToken
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -687,10 +687,9 @@ interface EnterRTCSessionOptions {
|
|||||||
* - Handles retries (fails only after several attempts)
|
* - Handles retries (fails only after several attempts)
|
||||||
*
|
*
|
||||||
* @param rtcSession - The MatrixRTCSession to join.
|
* @param rtcSession - The MatrixRTCSession to join.
|
||||||
|
* @param ownMembershipIdentity - Options for entering the RTC session.
|
||||||
* @param transport - The LivekitTransport to use for this session.
|
* @param transport - The LivekitTransport to use for this session.
|
||||||
* @param options - Options for entering the RTC session.
|
* @param options - `encryptMedia`: Whether to encrypt media `matrixRTCMode`: The Matrix RTC mode to use.
|
||||||
* @param options.encryptMedia - Whether to encrypt media.
|
|
||||||
* @param options.matrixRTCMode - The Matrix RTC mode to use.
|
|
||||||
* @throws If the widget could not send ElementWidgetActions.JoinCall action.
|
* @throws If the widget could not send ElementWidgetActions.JoinCall action.
|
||||||
*/
|
*/
|
||||||
// Exported for unit testing
|
// Exported for unit testing
|
||||||
@@ -698,8 +697,9 @@ export function enterRTCSession(
|
|||||||
rtcSession: MatrixRTCSession,
|
rtcSession: MatrixRTCSession,
|
||||||
ownMembershipIdentity: CallMembershipIdentityParts,
|
ownMembershipIdentity: CallMembershipIdentityParts,
|
||||||
transport: LivekitTransport,
|
transport: LivekitTransport,
|
||||||
{ encryptMedia, matrixRTCMode }: EnterRTCSessionOptions,
|
options: EnterRTCSessionOptions,
|
||||||
): void {
|
): void {
|
||||||
|
const { encryptMedia, matrixRTCMode } = options;
|
||||||
PosthogAnalytics.instance.eventCallEnded.cacheStartCall(new Date());
|
PosthogAnalytics.instance.eventCallEnded.cacheStartCall(new Date());
|
||||||
PosthogAnalytics.instance.eventCallStarted.track(rtcSession.room.roomId);
|
PosthogAnalytics.instance.eventCallStarted.track(rtcSession.room.roomId);
|
||||||
|
|
||||||
|
|||||||
@@ -159,10 +159,12 @@ const FOCI_WK_KEY = "org.matrix.msc4143.rtc_foci";
|
|||||||
* 4. The transport configured in Element Call's config.
|
* 4. The transport configured in Element Call's config.
|
||||||
*
|
*
|
||||||
* @param client The authenticated Matrix client for the current user
|
* @param client The authenticated Matrix client for the current user
|
||||||
|
* @param membership The membership identity of the user.
|
||||||
* @param roomId The ID of the room to be connected to.
|
* @param roomId The ID of the room to be connected to.
|
||||||
* @param urlFromDevSettings Override URL provided by the user's local config.
|
* @param urlFromDevSettings Override URL provided by the user's local config.
|
||||||
* @param useMatrix2 This implies using the matrix2 jwt endpoint (including delayed event delegation of the jwt token)
|
* @param forceOldJwtEndpoint Whether to force the old JWT endpoint (not hashing the backendIdentity).
|
||||||
* @param delayId
|
* @param delayId the delay id passed to the jwt service.
|
||||||
|
*
|
||||||
* @returns A fully validated transport config.
|
* @returns A fully validated transport config.
|
||||||
* @throws MatrixRTCTransportMissingError | FailToGetOpenIdToken
|
* @throws MatrixRTCTransportMissingError | FailToGetOpenIdToken
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ export interface ConnectionFactory {
|
|||||||
createConnection(
|
createConnection(
|
||||||
transport: LivekitTransport,
|
transport: LivekitTransport,
|
||||||
scope: ObservableScope,
|
scope: ObservableScope,
|
||||||
logger: Logger,
|
|
||||||
ownMembershipIdentity: CallMembershipIdentityParts,
|
ownMembershipIdentity: CallMembershipIdentityParts,
|
||||||
|
logger: Logger,
|
||||||
forceOldJwtEndpoint?: boolean,
|
forceOldJwtEndpoint?: boolean,
|
||||||
): Connection;
|
): Connection;
|
||||||
}
|
}
|
||||||
@@ -83,17 +83,18 @@ export class ECConnectionFactory implements ConnectionFactory {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param transport
|
* @param transport The transport to use for this connection.
|
||||||
* @param scope
|
* @param scope The observable scope (used for clean-up)
|
||||||
* @param logger
|
|
||||||
* @param ownMembershipIdentity required to connect (using the jwt service) with the SFU.
|
* @param ownMembershipIdentity required to connect (using the jwt service) with the SFU.
|
||||||
|
* @param logger The logger instance to use for this connection.
|
||||||
|
* @param forceOldJwtEndpoint Use the old JWT endpoint independent of what the sfu supports.
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
public createConnection(
|
public createConnection(
|
||||||
transport: LivekitTransport,
|
transport: LivekitTransport,
|
||||||
scope: ObservableScope,
|
scope: ObservableScope,
|
||||||
logger: Logger,
|
|
||||||
ownMembershipIdentity: CallMembershipIdentityParts,
|
ownMembershipIdentity: CallMembershipIdentityParts,
|
||||||
|
logger: Logger,
|
||||||
forceOldJwtEndpoint?: boolean,
|
forceOldJwtEndpoint?: boolean,
|
||||||
): Connection {
|
): Connection {
|
||||||
return new Connection(
|
return new Connection(
|
||||||
|
|||||||
@@ -83,8 +83,12 @@ export interface IConnectionManager {
|
|||||||
* @param props - Configuration object
|
* @param props - Configuration object
|
||||||
* @param props.scope - The observable scope used by this object
|
* @param props.scope - The observable scope used by this object
|
||||||
* @param props.connectionFactory - Used to create new connections
|
* @param props.connectionFactory - Used to create new connections
|
||||||
* @param props.inputTransports$ - A list of Behaviors each containing a LIST of LivekitTransport.
|
* @param props.localTransport$ - The local transport to use. (deduplicated with remoteTransports$)
|
||||||
* @param props.logger - The logger to use
|
* @param props.remoteTransports$ - All other transports. The connection manager will create connections for each transport. (deduplicated with localTransport$)
|
||||||
|
* @param props.ownMembershipIdentity - The own membership identity to use.
|
||||||
|
* @param props.logger - The logger to use.
|
||||||
|
* @param props.forceOldJwtEndpointForLocalTransport$ - Use the old JWT endpoint independent of what the sfu supports. Only applies for localTransport$.
|
||||||
|
*
|
||||||
* Each of these behaviors can be interpreted as subscribed list of transports.
|
* Each of these behaviors can be interpreted as subscribed list of transports.
|
||||||
*
|
*
|
||||||
* Using `registerTransports` independent external modules can control what connections
|
* Using `registerTransports` independent external modules can control what connections
|
||||||
@@ -183,8 +187,8 @@ export function createConnectionManager$({
|
|||||||
livekit_alias: alias,
|
livekit_alias: alias,
|
||||||
},
|
},
|
||||||
scope,
|
scope,
|
||||||
logger,
|
|
||||||
ownMembershipIdentity,
|
ownMembershipIdentity,
|
||||||
|
logger,
|
||||||
forceOldJwtEndpoint,
|
forceOldJwtEndpoint,
|
||||||
);
|
);
|
||||||
// Start the connection immediately
|
// Start the connection immediately
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ describe("ECConnectionFactory - Audio inputs options", () => {
|
|||||||
ecConnectionFactory.createConnection(
|
ecConnectionFactory.createConnection(
|
||||||
exampleTransport,
|
exampleTransport,
|
||||||
testScope,
|
testScope,
|
||||||
logger,
|
|
||||||
ownMemberMock,
|
ownMemberMock,
|
||||||
|
logger,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check if Room was constructed with expected options
|
// Check if Room was constructed with expected options
|
||||||
@@ -125,8 +125,8 @@ describe("ECConnectionFactory - ControlledAudioDevice", () => {
|
|||||||
ecConnectionFactory.createConnection(
|
ecConnectionFactory.createConnection(
|
||||||
exampleTransport,
|
exampleTransport,
|
||||||
testScope,
|
testScope,
|
||||||
logger,
|
|
||||||
ownMemberMock,
|
ownMemberMock,
|
||||||
|
logger,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check if Room was constructed with expected options
|
// Check if Room was constructed with expected options
|
||||||
|
|||||||
Reference in New Issue
Block a user