Skip to content

Commit

Permalink
1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Mar 2, 2021
1 parent b544fee commit 5913943
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 40 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ion-sdk-js",
"version": "1.6.0",
"version": "1.6.1",
"description": "A js sdk for ion sfu",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ export class Transport {
};

this.pc.oniceconnectionstatechange = async (e) => {
if (this.pc.iceConnectionState === "disconnected") {
if (this.pc.iceConnectionState === 'disconnected') {
if (this.pc.restartIce) {
// this will trigger onNegotiationNeeded
this.pc.restartIce();
}
}
}
};
};
}
}

export default class Client {
Expand Down
65 changes: 32 additions & 33 deletions src/signal/_proto/library/sfu_pb.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// package: sfu
// file: sfu.proto

import * as jspb from "google-protobuf";
import * as jspb from 'google-protobuf';

export class SignalRequest extends jspb.Message {
getId(): string;
Expand All @@ -28,20 +28,20 @@ export class SignalRequest extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SignalRequest.AsObject;
static toObject(includeInstance: boolean, msg: SignalRequest): SignalRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> };
static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message> };
static serializeBinaryToWriter(message: SignalRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SignalRequest;
static deserializeBinaryFromReader(message: SignalRequest, reader: jspb.BinaryReader): SignalRequest;
}

export namespace SignalRequest {
export type AsObject = {
id: string,
join?: JoinRequest.AsObject,
description: Uint8Array | string,
trickle?: Trickle.AsObject,
}
id: string;
join?: JoinRequest.AsObject;
description: Uint8Array | string;
trickle?: Trickle.AsObject;
};

export enum PayloadCase {
PAYLOAD_NOT_SET = 0,
Expand Down Expand Up @@ -86,22 +86,22 @@ export class SignalReply extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): SignalReply.AsObject;
static toObject(includeInstance: boolean, msg: SignalReply): SignalReply.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> };
static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message> };
static serializeBinaryToWriter(message: SignalReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): SignalReply;
static deserializeBinaryFromReader(message: SignalReply, reader: jspb.BinaryReader): SignalReply;
}

export namespace SignalReply {
export type AsObject = {
id: string,
join?: JoinReply.AsObject,
description: Uint8Array | string,
trickle?: Trickle.AsObject,
iceconnectionstate: string,
error: string,
}
id: string;
join?: JoinReply.AsObject;
description: Uint8Array | string;
trickle?: Trickle.AsObject;
iceconnectionstate: string;
error: string;
};

export enum PayloadCase {
PAYLOAD_NOT_SET = 0,
Expand All @@ -128,19 +128,19 @@ export class JoinRequest extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): JoinRequest.AsObject;
static toObject(includeInstance: boolean, msg: JoinRequest): JoinRequest.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> };
static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message> };
static serializeBinaryToWriter(message: JoinRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): JoinRequest;
static deserializeBinaryFromReader(message: JoinRequest, reader: jspb.BinaryReader): JoinRequest;
}

export namespace JoinRequest {
export type AsObject = {
sid: string,
uid: string,
description: Uint8Array | string,
}
sid: string;
uid: string;
description: Uint8Array | string;
};
}

export class JoinReply extends jspb.Message {
Expand All @@ -152,17 +152,17 @@ export class JoinReply extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): JoinReply.AsObject;
static toObject(includeInstance: boolean, msg: JoinReply): JoinReply.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> };
static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message> };
static serializeBinaryToWriter(message: JoinReply, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): JoinReply;
static deserializeBinaryFromReader(message: JoinReply, reader: jspb.BinaryReader): JoinReply;
}

export namespace JoinReply {
export type AsObject = {
description: Uint8Array | string,
}
description: Uint8Array | string;
};
}

export class Trickle extends jspb.Message {
Expand All @@ -175,18 +175,18 @@ export class Trickle extends jspb.Message {
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Trickle.AsObject;
static toObject(includeInstance: boolean, msg: Trickle): Trickle.AsObject;
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> };
static extensionsBinary: { [key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message> };
static serializeBinaryToWriter(message: Trickle, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): Trickle;
static deserializeBinaryFromReader(message: Trickle, reader: jspb.BinaryReader): Trickle;
}

export namespace Trickle {
export type AsObject = {
target: Trickle.TargetMap[keyof Trickle.TargetMap],
init: string,
}
target: Trickle.TargetMap[keyof Trickle.TargetMap];
init: string;
};

export interface TargetMap {
PUBLISHER: 0;
Expand All @@ -195,4 +195,3 @@ export namespace Trickle {

export const Target: TargetMap;
}

3 changes: 1 addition & 2 deletions src/signal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ export interface Signal {
onnegotiate?: (jsep: RTCSessionDescriptionInit) => void;
ontrickle?: (trickle: Trickle) => void;


join(sid: string, uid: null|string, offer: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
join(sid: string, uid: null | string, offer: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
offer(offer: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
answer(answer: RTCSessionDescriptionInit): void;
trickle(trickle: Trickle): void;
Expand Down

0 comments on commit 5913943

Please sign in to comment.