janky
Version:
Janus Interface
47 lines (36 loc) • 1.11 kB
text/typescript
import Janus, { JanusJS } from "janus-gateway";
export interface IncomingStreams extends MediaStream {
type: string;
codec: string;
mindex: string;
mid: string;
display: string;
};
export type HandleRemoteSDPCallback = (msg: JanusJS.Message, jsep: JanusJS.JSEP) => void;
export type ParticipantType =
'publisher_front'
| 'publisher_back'
| 'publisher_audio'
| 'screen'
| 'subscriber';
export interface RoomExistsResponse {
exists: boolean;
[key: string]: any;
};
export interface RemoteFeedType {
id: number;
userID: string;
handler: JanusJS.PluginHandle;
streams: IncomingStreams[];
};
export type WhatToPublish = 'none' | 'video' | 'video_user' | 'video_environment' | 'audio' | 'screen';
export interface DeviceInfo {
deviceId: string;
groupId: string;
kind: "audioinput" | "videoinput" | "audiooutput";
label: string;
};
export type ListDevicesCallback = (devices: DeviceInfo[]) => void;
export interface JanusDevices extends Janus {
listDevices: (callback: ListDevicesCallback) => Promise<DeviceInfo[]>;
}