export class Session {
    constructor(session, request) {
        this.session = session;
        this.callId = request.getHeader('X-Webitel-Uuid');
        this.incoming = session.direction === 'incoming';
        this.instanceId = request.getHeader('X-Webitel-Sock-Id');
        this.peerStream = null;
        this.localStream = null;
        this.remoteVideoMuted = false;
        this.remoteAudioMuted = false;
        this.remoteHold = false;
    }
    get id() {
        return this.session.id;
    }
    getLocalMedia() {
        if (this.localStream) {
            return [this.localStream];
        }
        return [];
    }
    getPeerMedia() {
        if (this.peerStream) {
            return [this.peerStream];
        }
        return [];
    }
    answer(s) {
        return new Promise(() => {
            this.session.answer(s);
        });
    }
    setMediaConfig(s) {
        // @ts-ignore
        this.session.sendInfo('application/json', JSON.stringify(s));
    }
}
//# sourceMappingURL=session.js.map