@geckos.io/common
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -7,3 +7,3 @@ "use strict"; | ||
var eventemitter3_1 = __importDefault(require("eventemitter3")); | ||
var Bridge = (function () { | ||
var Bridge = /** @class */ (function () { | ||
function Bridge() { | ||
@@ -10,0 +10,0 @@ this.eventEmitter = new eventemitter3_1.default(); |
@@ -6,7 +6,8 @@ "use strict"; | ||
var SendMessage = function (dataChannel, eventName, data) { | ||
var _a; | ||
if (data === void 0) { data = null; } | ||
var _a; | ||
if (dataChannel.readyState === 'open') { | ||
try { | ||
if (eventName === constants_1.EVENTS.RAW_MESSAGE && data !== null && helpers_1.isRawMessage(data)) { | ||
// @ts-ignore | ||
dataChannel.send(data); | ||
@@ -13,0 +14,0 @@ } |
@@ -12,2 +12,9 @@ declare const ArrayBufferView: any; | ||
export declare type RawMessage = USVString | ArrayBuffer | ArrayBufferView; | ||
export interface ServerOptions { | ||
iceServers?: RTCIceServer[]; | ||
label?: string; | ||
ordered?: boolean; | ||
maxRetransmits?: number; | ||
maxPacketLifeTime?: number; | ||
} | ||
export interface EventCallbackClient { | ||
@@ -14,0 +21,0 @@ (data: Data): void; |
{ | ||
"name": "@geckos.io/common", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Real-time client/server communication over UDP using WebRTC and Node.js", | ||
@@ -20,5 +20,2 @@ "main": "lib", | ||
}, | ||
"engines": { | ||
"node": ">=10.0.0" | ||
}, | ||
"scripts": { | ||
@@ -25,0 +22,0 @@ "build": "tsc --build tsconfig.json", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14642
210