mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-05 10:28:54 +00:00
* replace react webrtc library for livekit fork
* move rtcd calls code to its own packages and extract common code
* switch calls transport depending on plugin version
it will use rtcd transport for plugin versions lower than 2
and livekit on 2.x.x and greater versions.
* livekit transport implementation for calls
* support for livekit calls not using calls websocket events
* capture mic before room connection to process initial mutes right
* use plugin cached version in case of fetch failures
* prevent race while waiting for turn server request
* fix channel intro spinner getting stuck when posts finish loading before the listener subscribes
* address PR comments
(cherry picked from commit b6500d9c5e)
Co-authored-by: Carlos Garcia <carlos.garcia@mattermost.com>
30 lines
1.2 KiB
TypeScript
30 lines
1.2 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {EventOnCandidate, EventOnConnectionStateChange, RTCIceCandidate} from '@livekit/react-native-webrtc';
|
|
import RTCTrackEvent from '@livekit/react-native-webrtc/lib/typescript/RTCTrackEvent';
|
|
|
|
// Only adding the types that are not included in the imported module.
|
|
declare module '@livekit/react-native-webrtc' {
|
|
export type RTCIceCredentialType = 'password';
|
|
|
|
export interface RTCIceServer {
|
|
credential?: string;
|
|
credentialType?: RTCIceCredentialType;
|
|
urls: string | string[];
|
|
username?: string;
|
|
}
|
|
|
|
export interface RTCPeerConnectionIceEvent extends Event {
|
|
readonly candidate: RTCIceCandidate | null;
|
|
}
|
|
|
|
export class RTCPeerConnection {
|
|
onconnectionstatechange?: ((event: Event) => void) | null;
|
|
onnegotiationneeded?: (() => void | Promise<void>) | null;
|
|
onicecandidate?: ((event: EventOnCandidate) => void) | null;
|
|
oniceconnectionstatechange?: ((event: EventOnConnectionStateChange) => void) | null;
|
|
ontrack?: ((event: RTCTrackEvent) => void) | null;
|
|
}
|
|
}
|