@mothepro/fancy-p2p
Version:
A quick and efficient way to form p2p groups in the browser
22 lines • 776 B
JavaScript
import { SafeEmitter, Emitter } from 'fancy-emitter';
export class MockClient {
constructor(name) {
this.name = name;
this.isYou = true;
this.proposals = new Emitter;
}
}
/** Represents another client in the same lobby and signaling server as we are that can preform SDP exchange. */
export default class {
constructor(id, name) {
this.id = id;
this.name = name;
this.isYou = false;
this.proposals = new Emitter;
/** Activate with the creation of an SDP to send it to the corresponding client. */
this.creator = new SafeEmitter;
/** Activates when an SDP is received for this corresponding client. */
this.acceptor = new SafeEmitter;
}
}
//# sourceMappingURL=Client.js.map