UNPKG

odyssey-spatial-comms

Version:

Drop-in replacement for Dolby/Voxeet SDK using Odyssey Spatial Audio Service

113 lines 2.84 kB
export interface ParticipantInfo { name: string; externalId?: string; avatarUrl?: string; } export interface Participant { id: string; info: ParticipantInfo; status: 'active' | 'inactive' | 'muted'; streams: MediaStreamWithType[]; type: string; metadata: Record<string, any>; level: number; audioQuality: { packetLoss: number; jitter: number; rtt: number; }; videoQuality: { packetLoss: number; jitter: number; rtt: number; }; spatialPosition?: SpatialPosition; spatialDirection?: SpatialDirection; isSpeaking?: boolean; audioReceivingFrom: any; videoReceivingFrom: any; screenShareReceivingFrom: any; } export interface ParticipantNullable { id: string; info: ParticipantInfo; status: 'active' | 'inactive' | 'muted'; streams: MediaStreamWithType[]; } export interface Conference { id: string; alias: string; status: 'created' | 'joined' | 'ended'; participants: Map<string, Participant>; spatialAudioStyle: SpatialAudioStyle; } export interface JoinOptions { participantInfo: ParticipantInfo; constraints?: { audio?: boolean; video?: boolean; }; spatialAudio?: boolean; preferRecvMono?: boolean; maxVideoForwarding?: number; forwardingStrategy?: string; } export interface CreateOptions { alias: string; params?: { spatialAudioStyle?: SpatialAudioStyle; spatialAudio?: boolean; liveRecording?: boolean; rtcpMode?: 'average' | 'max'; ttl?: number; videoCodec?: 'VP8' | 'VP9' | 'H264'; }; } export interface MediaStreamWithType extends MediaStream { type: 'Camera' | 'Microphone' | 'ScreenShare'; participantId: string; } export interface SpatialPosition { x: number; y: number; z: number; } export interface SpatialDirection { x: number; y: number; z: number; } export declare enum SpatialAudioStyle { INDIVIDUAL = "individual", SHARED = "shared", DISABLED = "disabled" } export declare enum AudioCaptureMode { STANDARD = "standard", UNPROCESSED = "unprocessed" } export declare enum NoiseReductionLevel { LOW = "low", HIGH = "high" } export declare enum VideoForwardingStrategy { LAST_SPEAKER = "lastSpeaker", CLOSEST_USER = "closestUser" } export interface ParticipantJoinedNotification { type: 'Participant.Joined'; participant: Participant; } export interface ParticipantLeftNotification { type: 'Participant.Left'; participant: Participant; } export interface SubscribeConferenceCreated { type: 'Participant.Joined' | 'Participant.Left'; conferenceAlias: string; } export interface SDKConfig { serviceUrl: string; debug?: boolean; } //# sourceMappingURL=types.d.ts.map