import Janus, { JanusJS } from "janus-gateway";

abstract class Videoroom  {

    protected abstract readonly type: 'publisher' | 'subscriber';
    protected abstract handler: JanusJS.PluginHandle | undefined;
    public abstract readonly roomID: number;
    protected abstract readonly userID: string;
    protected abstract readonly janusSession: Janus;

    public abstract initiate(): Promise<JanusJS.PluginHandle>;
    protected abstract attachVideoroom(): Promise<JanusJS.PluginHandle>
    protected abstract perpareRTC(): Promise<void>;
    protected abstract handleMessages(msg: JanusJS.Message, jsep: JanusJS.JSEP) : Promise<void>;
}

export default Videoroom;