import { RoomApiClient } from '../room/room-api-client'; import { CustomRTCIceCandidatePairStats, Session, SessionConfig } from './session'; import { LocalVideo } from '../local/local-video'; export declare class UpSession extends Session { streamIdMidMap: StreamIdMidMap; activeProfile: string; constructor(roomApiClient: RoomApiClient, config: SessionConfig); /** * 송출 스트림 등록 요청 API. 송출 스트림은 Audio, Video 총 2개를 조합으로 요청할 수 있다. */ addStream({ audioType, audioTrack, audioExtraValue, videoType, localVideo, videoExtraValue, videoHd, videoSort, record }: AddStreamOptions): Promise; /** * 송출 스트림 속성 변경 API. */ configureStream(streams: ConfigureStreamParams['streams']): Promise; removeStream(streamIds: number[]): Promise; addListeners(): void; private _callAddStream; private _callSetAnswer; private _callConfigureStream; private _callRemoveStream; _callSendMessage(params: SendMessageParams): Promise>; private _replaceAudioTrack; private _replaceVideoTrack; /** * multiple video 스트림의 profile 활성화 상태 통지. * 활성화 상태의 기본은 l = 활성, m = 비활성, h = 비활성으로 한다. * 이후 "l" profile을 제외하고("l" profile은 항상 활성 상태) 수신측의 profile 요청이 생기거나 없어져서 상태변경이 필요할때 통지한다. * 대역폭을 효율적으로 사용하기 위해 클라이언트는 이 상태 값에 Tranceiver의 송출상태를 동기화하여 관리한다. */ private _replaceVideoProfiles; private _removeTracks; /** * MultipleVideoStream의 경우 SDP Answer 생성 뒤 * Transceiver.sender의 bitrate 파라미터를 OnOffer의 profiles내 정보와 동일하게 세팅해야 한다. */ private _setVideoProfiles; getStats(): Promise; } declare type StreamIdMidMap = { [streamId: number]: { [name: string]: string; }; }; declare type OnOfferParams = { negotiationId: string; desc: RTCSessionDescription; audio?: { streamId: number; type: AudioTrackType; mid: string; }; video?: { streamId: number; type: VideoTrackType; profiles: Array<{ mid: string; profile: VideoProfile; bitrate: string; active: boolean; }>; }; }; declare type VideoProfile = '' | 'l' | 'm' | 'h'; export declare type AudioTrackType = 'none' | 'single'; export declare type VideoTrackType = 'none' | 'single' | 'multiple'; declare type AddStreamOptions = { audioType: AudioTrackType; audioTrack?: MediaStreamTrack; audioExtraValue?: string; videoType: VideoTrackType; localVideo?: LocalVideo; videoExtraValue?: string; videoHd?: boolean; videoSort?: string; record: boolean; }; declare type AddStreamReturn = { audioOffer: OnOfferParams['audio']; videoOffer: OnOfferParams['video']; }; declare type ConfigureStreamParams = { streams: Array<{ streamId: number; active?: boolean; alwaysOn?: boolean; }>; }; declare type SendMessageParams = { targets: string[]; message: string; type: string; }; declare type SendMessageResponse = {}; declare type UpStat = { mid: string; mediaSource: any; outboundRtp: any; track: any; }; export declare type UpStats = { candidatePair: CustomRTCIceCandidatePairStats; audioStats: UpStat[]; videoStats: UpStat[]; }; export {};