export interface MediaState {
camera: boolean,
microphone: boolean,
screen: boolean
}
export type MediaSource = keyof MediaState;
class MyInfoStore {
public producers: Record<MediaSource, types.Transport | null> = {
camera: null,
microphone: null,
screen: null
}
}
class MyInfoService {
static pause(source: MediaSource) {
MyInfoStore.producers[source]?.pause();
}
}