@webrtc-remote-control/core
Version:
Thin abstraction layer above peerjs that will let you be more productive at making WebRTC data channels based apps.
28 lines (24 loc) • 669 B
TypeScript
import EventEmitter from "eventemitter3";
import {
HumanizeErrorType,
GetPeerIdType,
SetPeerIdToSessionStorageType,
} from "../../shared/common";
export { prepareUtils } from "../../shared/common";
export default function ({
humanizeError,
getPeerId,
setPeerIdToSessionStorage,
}: {
humanizeError: HumanizeErrorType;
getPeerId: GetPeerIdType;
setPeerIdToSessionStorage: SetPeerIdToSessionStorageType;
}): {
humanizeError: HumanizeErrorType;
getPeerId: GetPeerIdType;
bindConnection(peer: any): Promise<{
send(payload: any): any;
on: InstanceType<typeof EventEmitter>["on"];
off: InstanceType<typeof EventEmitter>["off"];
}>;
};