import { ConnectionOptions, Direction, MetadataOption } from './types'; export interface AyameAddStreamEvent { type: string; stream: MediaStream; } declare class Connection { private debug; private roomId; private signalingUrl; private options; private connectionState; private stream; private remoteStream; private authnMetadata; private authzMetadata; private ws; private pc; private callbacks; private isOffer; private isExistUser; private dataChannels; private pcConfig; get webSocket(): WebSocket | null; get peerConnection(): RTCPeerConnection | null; on(kind: string, callback: Function): void; /** * オブジェクトを生成し、リモートのピアまたはサーバーに接続します。 */ constructor(signalingUrl: string, roomId: string, options: ConnectionOptions, debug?: boolean, isRelay?: boolean); /** * 接続する */ connect(stream: MediaStream | null, metadataOption?: MetadataOption | null): Promise; /** * 接続を切断する */ disconnect(): Promise; /** * 統計情報を取得する */ getStats(): Promise; private signaling; removeDataChannel(label: string): Promise; private setCodecPreferences; private createPeerConnection; createDataChannel(label: string, options: RTCDataChannelInit | undefined): Promise; private onDataChannel; private sendOffer; private isAudioCodecSpecified; private isVideoCodecSpecified; private createAnswer; private setAnswer; private setOffer; private addIceCandidate; private sendIceCandidate; private sendSdp; private sendWs; private getTransceiver; private findDataChannel; private closeDataChannel; private closePeerConnection; private closeWebSocketConnection; private traceLog; } export default Connection; /** * Ayame Connection のデフォルトのオプションです。 */ export declare const defaultOptions: ConnectionOptions; /** * Ayame Connection を生成します。 * @deprecated この関数は廃止予定です。代わりに createConnection を使用してください。 */ export declare const connection: (signalingUrl: string, roomId: string, options?: ConnectionOptions, debug?: boolean, isRelay?: boolean) => Connection; /** * Ayame Connection を生成します。 */ export declare const createConnection: (signalingUrl: string, roomId: string, options?: ConnectionOptions, debug?: boolean, isRelay?: boolean) => Connection; /** * Ayame Web SDK のバージョンを出力します。 */ export declare const version: () => string; export type { Connection, ConnectionOptions, Direction, MetadataOption }; export { getAvailableCodecs } from './utils';