├── .gitignore ├── .idea ├── codeStyles │ └── codeStyleConfig.xml ├── ion-sfu-node.iml ├── modules.xml └── workspace.xml ├── FUNDING.yml ├── README.MD ├── lib ├── conn.d.ts ├── conn.d.ts.map ├── conn.js ├── conn.js.map ├── index.d.ts ├── index.d.ts.map ├── index.js ├── index.js.map └── proto │ ├── sfu_grpc_pb.d.ts │ ├── sfu_grpc_pb.d.ts.map │ ├── sfu_grpc_pb.js │ ├── sfu_grpc_pb.js.map │ ├── sfu_pb.d.ts │ ├── sfu_pb.d.ts.map │ ├── sfu_pb.js │ └── sfu_pb.js.map ├── npmignore ├── package-lock.json ├── package.json ├── src ├── conn.ts ├── index.ts └── proto │ ├── sfu.proto │ ├── sfu_grpc_pb.d.ts │ ├── sfu_grpc_pb.js │ ├── sfu_pb.d.ts │ └── sfu_pb.js ├── tsconfig.json └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | scripts 2 | .env 3 | node_modules -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/ion-sfu-node.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 1607885499334 29 | 34 | 35 | 36 | 37 | 39 | -------------------------------------------------------------------------------- /FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | github: [jason-shen] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 3 | #open_collective: babel # Replace with a single Open Collective username 4 | custom: # Replace with a single custom sponsorship URL 5 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | ## Documentation and example coming soon!! 2 | 3 | for now please refer to the example project 4 | 5 | ### example project 6 | ``` 7 | https://github.com/jason-shen/ion-sfu-nodejs-example 8 | ``` 9 | 10 | ### you will need git clone the below project 11 | https://github.com/pion/ion-sfu 12 | 13 | ### build the ion sfu with sRPC Signaling 14 | ``` 15 | go build ./cmd/signal/grpc/main.go && ./main -c config.toml 16 | ``` 17 | 18 | -------------------------------------------------------------------------------- /lib/conn.d.ts: -------------------------------------------------------------------------------- 1 | import { SFUClient } from './proto/sfu_grpc_pb'; 2 | declare const _default: SFUClient; 3 | export default _default; 4 | //# sourceMappingURL=conn.d.ts.map -------------------------------------------------------------------------------- /lib/conn.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"conn.d.ts","sourceRoot":"","sources":["../src/conn.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;;AAE9C,wBAGC"} -------------------------------------------------------------------------------- /lib/conn.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); 5 | }) : (function(o, m, k, k2) { 6 | if (k2 === undefined) k2 = k; 7 | o[k2] = m[k]; 8 | })); 9 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 10 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 11 | }) : function(o, v) { 12 | o["default"] = v; 13 | }); 14 | var __importStar = (this && this.__importStar) || function (mod) { 15 | if (mod && mod.__esModule) return mod; 16 | var result = {}; 17 | if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 18 | __setModuleDefault(result, mod); 19 | return result; 20 | }; 21 | Object.defineProperty(exports, "__esModule", { value: true }); 22 | const grpc = __importStar(require("grpc")); 23 | const sfu_grpc_pb_1 = require("./proto/sfu_grpc_pb"); 24 | exports.default = new sfu_grpc_pb_1.SFUClient(`localhost:50051`, grpc.credentials.createInsecure()); 25 | //# sourceMappingURL=conn.js.map -------------------------------------------------------------------------------- /lib/conn.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"conn.js","sourceRoot":"","sources":["../src/conn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,qDAA8C;AAE9C,kBAAe,IAAI,uBAAS,CAC1B,iBAAiB,EACf,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CACpC,CAAA"} -------------------------------------------------------------------------------- /lib/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { EventEmitter } from 'events'; 3 | declare class ionSfu extends EventEmitter { 4 | event: EventEmitter; 5 | private Call; 6 | constructor(); 7 | Join: (obj: string, id: string, sid: string) => void; 8 | Description: (obj: string) => void; 9 | Trickle: (target: any, obj: string) => void; 10 | } 11 | export default ionSfu; 12 | //# sourceMappingURL=index.d.ts.map -------------------------------------------------------------------------------- /lib/index.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAMpC,cAAM,MAAO,SAAQ,YAAY;IAC/B,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,IAAI,CAAsD;;IAmCpE,IAAI,QAAS,MAAM,MAAM,MAAM,OAAO,MAAM,UAgB3C;IAED,WAAW,QAAS,MAAM,UAMzB;IAED,OAAO,WAAY,GAAG,OAAM,MAAM,UAKjC;CAEA;AAED,eAAe,MAAM,CAAC"} -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | const js_base64_1 = require("js-base64"); 7 | const events_1 = require("events"); 8 | const conn_1 = __importDefault(require("./conn")); 9 | const sfu_pb_1 = require("./proto/sfu_pb"); 10 | class ionSfu extends events_1.EventEmitter { 11 | constructor() { 12 | super(); 13 | this.Join = (obj, id, sid) => { 14 | const request = new sfu_pb_1.SignalRequest(); 15 | const join = new sfu_pb_1.JoinRequest(); 16 | let dataoffer = js_base64_1.Base64.encode(obj); 17 | // console.log("object a", objJsonB64); 18 | request.setId(id); 19 | join.setSid(sid); 20 | join.setDescription(dataoffer); 21 | // console.log(join) 22 | request.setJoin(join); 23 | // console.log(request); 24 | // const bufferedData = Buffer.from(JSON.stringify(request)); 25 | this.Call.write(request); 26 | }; 27 | this.Description = (obj) => { 28 | const request = new sfu_pb_1.SignalRequest(); 29 | let dataanswer = js_base64_1.Base64.encode(obj); 30 | request.setDescription(dataanswer); 31 | this.Call.write(request); 32 | }; 33 | this.Trickle = (target, obj) => { 34 | const requst = new sfu_pb_1.SignalRequest(); 35 | const trickle = new sfu_pb_1.Trickle(); 36 | trickle.setTarget(target); 37 | trickle.setInit(obj); 38 | }; 39 | this.event = new events_1.EventEmitter(); 40 | this.Call = conn_1.default.signal(); 41 | this.Call.on("data", (signalreply) => { 42 | // console.log("incoming", signalreply) 43 | const res = signalreply.getPayloadCase(); 44 | switch (res) { 45 | case sfu_pb_1.SignalReply.PayloadCase.JOIN: 46 | this.event.emit("onJoin", signalreply.getId(), js_base64_1.Base64.decode(signalreply.getJoin().getDescription_asB64())); 47 | // console.log("onjoin", signalreply.getId(), Base64.decode(signalreply.getJoin().getDescription_asB64())); 48 | break; 49 | case sfu_pb_1.SignalReply.PayloadCase.DESCRIPTION: 50 | this.event.emit("onDescription", js_base64_1.Base64.decode(signalreply.getDescription_asB64())); 51 | // console.log("onDescription", Base64.decode(signalreply.getDescription_asB64())) 52 | break; 53 | case sfu_pb_1.SignalReply.PayloadCase.TRICKLE: 54 | this.event.emit("onTrickle", signalreply.getTrickle().getTarget(), signalreply.getTrickle().getInit()); 55 | //console.log("onCadadidate", signalreply.getTrickle().getTarget()); 56 | // console.log("oncan", signalreply.getTrickle().getInit()); 57 | break; 58 | case sfu_pb_1.SignalReply.PayloadCase.ICECONNECTIONSTATE: 59 | this.event.emit("onIceconnectionstate", signalreply.getIceconnectionstate()); 60 | // console.log("icestatechanged: ", signalreply.getIceconnectionstate()); 61 | case sfu_pb_1.SignalReply.PayloadCase.ERROR: 62 | this.event.emit("onError", signalreply.getError()); 63 | //console.log("on Error"); 64 | break; 65 | default: 66 | break; 67 | } 68 | }); 69 | } 70 | } 71 | exports.default = ionSfu; 72 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /lib/index.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,yCAAmC;AACnC,mCAAoC;AACpC,kDAA2B;AAC3B,2CAAkF;AAIlF,MAAM,MAAO,SAAQ,qBAAY;IAI/B;QACE,KAAK,EAAE,CAAA;QAgCX,SAAI,GAAG,CAAC,GAAW,EAAE,EAAU,EAAE,GAAW,EAAE,EAAE;YAC9C,MAAM,OAAO,GAAG,IAAI,sBAAa,EAAE,CAAC;YACpC,MAAM,IAAI,GAAG,IAAI,oBAAW,EAAE,CAAC;YAE/B,IAAI,SAAS,GAAG,kBAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACrC,uCAAuC;YACrC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAClB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjB,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YAE/B,qBAAqB;YAErB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YACvB,wBAAwB;YACxB,6DAA6D;YAC3D,IAAI,CAAC,IAAI,CAAC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C,eAAe,EAAE,kBAAM,CAAC,MAAM,CAAC,WAAW,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC;oBACrF,kFAAkF;oBACjF,MAAM;gBACR,KAAK,oBAAW,CAAC,WAAW,CAAC,OAAO;oBAClC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE,EAAE,WAAW,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;oBACvG,oEAAoE;oBACrE,4DAA4D;oBAC3D,MAAM;gBACR,KAAK,oBAAW,CAAC,WAAW,CAAC,kBAAkB;oBAC7C,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,sBAAsB,EAAE,WAAW,CAAC,qBAAqB,EAAE,CAAC,CAAA;gBAC7E,yEAAyE;gBAC1E,KAAK,oBAAW,CAAC,WAAW,CAAC,KAAK;oBAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;oBACnD,0BAA0B;oBAC1B,MAAM;gBACR;oBACE,MAAM;aACT;QACJ,CAAC,CAAC,CAAA;IACH,CAAC;CAkCF;AAED,kBAAe,MAAM,CAAC"} -------------------------------------------------------------------------------- /lib/proto/sfu_grpc_pb.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | export namespace SFUService { 3 | namespace signal { 4 | export const path: string; 5 | export const requestStream: boolean; 6 | export const responseStream: boolean; 7 | export const requestType: typeof import("./sfu_pb.js").SignalRequest; 8 | export const responseType: typeof import("./sfu_pb.js").SignalReply; 9 | export { serialize_sfu_SignalRequest as requestSerialize }; 10 | export { deserialize_sfu_SignalRequest as requestDeserialize }; 11 | export { serialize_sfu_SignalReply as responseSerialize }; 12 | export { deserialize_sfu_SignalReply as responseDeserialize }; 13 | } 14 | } 15 | export var SFUClient: typeof import("grpc").Client; 16 | declare function serialize_sfu_SignalRequest(arg: any): Buffer; 17 | declare function deserialize_sfu_SignalRequest(buffer_arg: any): import("./sfu_pb.js").SignalRequest; 18 | declare function serialize_sfu_SignalReply(arg: any): Buffer; 19 | declare function deserialize_sfu_SignalReply(buffer_arg: any): import("./sfu_pb.js").SignalReply; 20 | export {}; 21 | //# sourceMappingURL=sfu_grpc_pb.d.ts.map -------------------------------------------------------------------------------- /lib/proto/sfu_grpc_pb.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"sfu_grpc_pb.d.ts","sourceRoot":"","sources":["../../src/proto/sfu_grpc_pb.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAiBA,+DAKC;AAED,qGAEC;AApBD,6DAKC;AAED,iGAEC"} -------------------------------------------------------------------------------- /lib/proto/sfu_grpc_pb.js: -------------------------------------------------------------------------------- 1 | // GENERATED CODE -- DO NOT EDIT! 2 | 'use strict'; 3 | var grpc = require('grpc'); 4 | var sfu_pb = require('./sfu_pb.js'); 5 | function serialize_sfu_SignalReply(arg) { 6 | if (!(arg instanceof sfu_pb.SignalReply)) { 7 | throw new Error('Expected argument of type sfu.SignalReply'); 8 | } 9 | return Buffer.from(arg.serializeBinary()); 10 | } 11 | function deserialize_sfu_SignalReply(buffer_arg) { 12 | return sfu_pb.SignalReply.deserializeBinary(new Uint8Array(buffer_arg)); 13 | } 14 | function serialize_sfu_SignalRequest(arg) { 15 | if (!(arg instanceof sfu_pb.SignalRequest)) { 16 | throw new Error('Expected argument of type sfu.SignalRequest'); 17 | } 18 | return Buffer.from(arg.serializeBinary()); 19 | } 20 | function deserialize_sfu_SignalRequest(buffer_arg) { 21 | return sfu_pb.SignalRequest.deserializeBinary(new Uint8Array(buffer_arg)); 22 | } 23 | var SFUService = exports.SFUService = { 24 | signal: { 25 | path: '/sfu.SFU/Signal', 26 | requestStream: true, 27 | responseStream: true, 28 | requestType: sfu_pb.SignalRequest, 29 | responseType: sfu_pb.SignalReply, 30 | requestSerialize: serialize_sfu_SignalRequest, 31 | requestDeserialize: deserialize_sfu_SignalRequest, 32 | responseSerialize: serialize_sfu_SignalReply, 33 | responseDeserialize: deserialize_sfu_SignalReply, 34 | }, 35 | }; 36 | exports.SFUClient = grpc.makeGenericClientConstructor(SFUService); 37 | //# sourceMappingURL=sfu_grpc_pb.js.map -------------------------------------------------------------------------------- /lib/proto/sfu_grpc_pb.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"sfu_grpc_pb.js","sourceRoot":"","sources":["../../src/proto/sfu_grpc_pb.js"],"names":[],"mappings":"AAAA,iCAAiC;AAEjC,YAAY,CAAC;AACb,IAAI,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC3B,IAAI,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAEpC,SAAS,yBAAyB,CAAC,GAAG;IACpC,IAAI,CAAC,CAAC,GAAG,YAAY,MAAM,CAAC,WAAW,CAAC,EAAE;QACxC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;KAC9D;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,2BAA2B,CAAC,UAAU;IAC7C,OAAO,MAAM,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED,SAAS,2BAA2B,CAAC,GAAG;IACtC,IAAI,CAAC,CAAC,GAAG,YAAY,MAAM,CAAC,aAAa,CAAC,EAAE;QAC1C,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;KAChE;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,6BAA6B,CAAC,UAAU;IAC/C,OAAO,MAAM,CAAC,aAAa,CAAC,iBAAiB,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;AAC5E,CAAC;AAGD,IAAI,UAAU,GAAG,OAAO,CAAC,UAAU,GAAG;IACpC,MAAM,EAAE;QACN,IAAI,EAAE,iBAAiB;QACvB,aAAa,EAAE,IAAI;QACnB,cAAc,EAAE,IAAI;QACpB,WAAW,EAAE,MAAM,CAAC,aAAa;QACjC,YAAY,EAAE,MAAM,CAAC,WAAW;QAChC,gBAAgB,EAAE,2BAA2B;QAC7C,kBAAkB,EAAE,6BAA6B;QACjD,iBAAiB,EAAE,yBAAyB;QAC5C,mBAAmB,EAAE,2BAA2B;KACjD;CACF,CAAC;AAEF,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC"} -------------------------------------------------------------------------------- /lib/proto/sfu_pb.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | //# sourceMappingURL=sfu_pb.d.ts.map -------------------------------------------------------------------------------- /lib/proto/sfu_pb.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"sfu_pb.d.ts","sourceRoot":"","sources":["../../src/proto/sfu_pb.js"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /lib/proto/sfu_pb.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | // source: sfu.proto 3 | /** 4 | * @fileoverview 5 | * @enhanceable 6 | * @suppress {messageConventions} JS Compiler reports an error if a variable or 7 | * field starts with 'MSG_' and isn't a translatable message. 8 | * @public 9 | */ 10 | // GENERATED CODE -- DO NOT EDIT! 11 | /* eslint-disable */ 12 | // @ts-nocheck 13 | var jspb = require('google-protobuf'); 14 | var goog = jspb; 15 | var global = Function('return this')(); 16 | goog.exportSymbol('proto.sfu.JoinReply', null, global); 17 | goog.exportSymbol('proto.sfu.JoinRequest', null, global); 18 | goog.exportSymbol('proto.sfu.SignalReply', null, global); 19 | goog.exportSymbol('proto.sfu.SignalReply.PayloadCase', null, global); 20 | goog.exportSymbol('proto.sfu.SignalRequest', null, global); 21 | goog.exportSymbol('proto.sfu.SignalRequest.PayloadCase', null, global); 22 | goog.exportSymbol('proto.sfu.Trickle', null, global); 23 | goog.exportSymbol('proto.sfu.Trickle.Target', null, global); 24 | /** 25 | * Generated by JsPbCodeGenerator. 26 | * @param {Array=} opt_data Optional initial data array, typically from a 27 | * server response, or constructed directly in Javascript. The array is used 28 | * in place and becomes part of the constructed object. It is not cloned. 29 | * If no data is provided, the constructed object will be empty, but still 30 | * valid. 31 | * @extends {jspb.Message} 32 | * @constructor 33 | */ 34 | proto.sfu.SignalRequest = function (opt_data) { 35 | jspb.Message.initialize(this, opt_data, 0, -1, null, proto.sfu.SignalRequest.oneofGroups_); 36 | }; 37 | goog.inherits(proto.sfu.SignalRequest, jspb.Message); 38 | if (goog.DEBUG && !COMPILED) { 39 | /** 40 | * @public 41 | * @override 42 | */ 43 | proto.sfu.SignalRequest.displayName = 'proto.sfu.SignalRequest'; 44 | } 45 | /** 46 | * Generated by JsPbCodeGenerator. 47 | * @param {Array=} opt_data Optional initial data array, typically from a 48 | * server response, or constructed directly in Javascript. The array is used 49 | * in place and becomes part of the constructed object. It is not cloned. 50 | * If no data is provided, the constructed object will be empty, but still 51 | * valid. 52 | * @extends {jspb.Message} 53 | * @constructor 54 | */ 55 | proto.sfu.SignalReply = function (opt_data) { 56 | jspb.Message.initialize(this, opt_data, 0, -1, null, proto.sfu.SignalReply.oneofGroups_); 57 | }; 58 | goog.inherits(proto.sfu.SignalReply, jspb.Message); 59 | if (goog.DEBUG && !COMPILED) { 60 | /** 61 | * @public 62 | * @override 63 | */ 64 | proto.sfu.SignalReply.displayName = 'proto.sfu.SignalReply'; 65 | } 66 | /** 67 | * Generated by JsPbCodeGenerator. 68 | * @param {Array=} opt_data Optional initial data array, typically from a 69 | * server response, or constructed directly in Javascript. The array is used 70 | * in place and becomes part of the constructed object. It is not cloned. 71 | * If no data is provided, the constructed object will be empty, but still 72 | * valid. 73 | * @extends {jspb.Message} 74 | * @constructor 75 | */ 76 | proto.sfu.JoinRequest = function (opt_data) { 77 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); 78 | }; 79 | goog.inherits(proto.sfu.JoinRequest, jspb.Message); 80 | if (goog.DEBUG && !COMPILED) { 81 | /** 82 | * @public 83 | * @override 84 | */ 85 | proto.sfu.JoinRequest.displayName = 'proto.sfu.JoinRequest'; 86 | } 87 | /** 88 | * Generated by JsPbCodeGenerator. 89 | * @param {Array=} opt_data Optional initial data array, typically from a 90 | * server response, or constructed directly in Javascript. The array is used 91 | * in place and becomes part of the constructed object. It is not cloned. 92 | * If no data is provided, the constructed object will be empty, but still 93 | * valid. 94 | * @extends {jspb.Message} 95 | * @constructor 96 | */ 97 | proto.sfu.JoinReply = function (opt_data) { 98 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); 99 | }; 100 | goog.inherits(proto.sfu.JoinReply, jspb.Message); 101 | if (goog.DEBUG && !COMPILED) { 102 | /** 103 | * @public 104 | * @override 105 | */ 106 | proto.sfu.JoinReply.displayName = 'proto.sfu.JoinReply'; 107 | } 108 | /** 109 | * Generated by JsPbCodeGenerator. 110 | * @param {Array=} opt_data Optional initial data array, typically from a 111 | * server response, or constructed directly in Javascript. The array is used 112 | * in place and becomes part of the constructed object. It is not cloned. 113 | * If no data is provided, the constructed object will be empty, but still 114 | * valid. 115 | * @extends {jspb.Message} 116 | * @constructor 117 | */ 118 | proto.sfu.Trickle = function (opt_data) { 119 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); 120 | }; 121 | goog.inherits(proto.sfu.Trickle, jspb.Message); 122 | if (goog.DEBUG && !COMPILED) { 123 | /** 124 | * @public 125 | * @override 126 | */ 127 | proto.sfu.Trickle.displayName = 'proto.sfu.Trickle'; 128 | } 129 | /** 130 | * Oneof group definitions for this message. Each group defines the field 131 | * numbers belonging to that group. When of these fields' value is set, all 132 | * other fields in the group are cleared. During deserialization, if multiple 133 | * fields are encountered for a group, only the last value seen will be kept. 134 | * @private {!Array>} 135 | * @const 136 | */ 137 | proto.sfu.SignalRequest.oneofGroups_ = [[2, 3, 4]]; 138 | /** 139 | * @enum {number} 140 | */ 141 | proto.sfu.SignalRequest.PayloadCase = { 142 | PAYLOAD_NOT_SET: 0, 143 | JOIN: 2, 144 | DESCRIPTION: 3, 145 | TRICKLE: 4 146 | }; 147 | /** 148 | * @return {proto.sfu.SignalRequest.PayloadCase} 149 | */ 150 | proto.sfu.SignalRequest.prototype.getPayloadCase = function () { 151 | return /** @type {proto.sfu.SignalRequest.PayloadCase} */ (jspb.Message.computeOneofCase(this, proto.sfu.SignalRequest.oneofGroups_[0])); 152 | }; 153 | if (jspb.Message.GENERATE_TO_OBJECT) { 154 | /** 155 | * Creates an object representation of this proto. 156 | * Field names that are reserved in JavaScript and will be renamed to pb_name. 157 | * Optional fields that are not set will be set to undefined. 158 | * To access a reserved field use, foo.pb_, eg, foo.pb_default. 159 | * For the list of reserved names please see: 160 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. 161 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the 162 | * JSPB instance for transitional soy proto support: 163 | * http://goto/soy-param-migration 164 | * @return {!Object} 165 | */ 166 | proto.sfu.SignalRequest.prototype.toObject = function (opt_includeInstance) { 167 | return proto.sfu.SignalRequest.toObject(opt_includeInstance, this); 168 | }; 169 | /** 170 | * Static version of the {@see toObject} method. 171 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include 172 | * the JSPB instance for transitional soy proto support: 173 | * http://goto/soy-param-migration 174 | * @param {!proto.sfu.SignalRequest} msg The msg instance to transform. 175 | * @return {!Object} 176 | * @suppress {unusedLocalVariables} f is only used for nested messages 177 | */ 178 | proto.sfu.SignalRequest.toObject = function (includeInstance, msg) { 179 | var f, obj = { 180 | id: jspb.Message.getFieldWithDefault(msg, 1, ""), 181 | join: (f = msg.getJoin()) && proto.sfu.JoinRequest.toObject(includeInstance, f), 182 | description: msg.getDescription_asB64(), 183 | trickle: (f = msg.getTrickle()) && proto.sfu.Trickle.toObject(includeInstance, f) 184 | }; 185 | if (includeInstance) { 186 | obj.$jspbMessageInstance = msg; 187 | } 188 | return obj; 189 | }; 190 | } 191 | /** 192 | * Deserializes binary data (in protobuf wire format). 193 | * @param {jspb.ByteSource} bytes The bytes to deserialize. 194 | * @return {!proto.sfu.SignalRequest} 195 | */ 196 | proto.sfu.SignalRequest.deserializeBinary = function (bytes) { 197 | var reader = new jspb.BinaryReader(bytes); 198 | var msg = new proto.sfu.SignalRequest; 199 | return proto.sfu.SignalRequest.deserializeBinaryFromReader(msg, reader); 200 | }; 201 | /** 202 | * Deserializes binary data (in protobuf wire format) from the 203 | * given reader into the given message object. 204 | * @param {!proto.sfu.SignalRequest} msg The message object to deserialize into. 205 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. 206 | * @return {!proto.sfu.SignalRequest} 207 | */ 208 | proto.sfu.SignalRequest.deserializeBinaryFromReader = function (msg, reader) { 209 | while (reader.nextField()) { 210 | if (reader.isEndGroup()) { 211 | break; 212 | } 213 | var field = reader.getFieldNumber(); 214 | switch (field) { 215 | case 1: 216 | var value = /** @type {string} */ (reader.readString()); 217 | msg.setId(value); 218 | break; 219 | case 2: 220 | var value = new proto.sfu.JoinRequest; 221 | reader.readMessage(value, proto.sfu.JoinRequest.deserializeBinaryFromReader); 222 | msg.setJoin(value); 223 | break; 224 | case 3: 225 | var value = /** @type {!Uint8Array} */ (reader.readBytes()); 226 | msg.setDescription(value); 227 | break; 228 | case 4: 229 | var value = new proto.sfu.Trickle; 230 | reader.readMessage(value, proto.sfu.Trickle.deserializeBinaryFromReader); 231 | msg.setTrickle(value); 232 | break; 233 | default: 234 | reader.skipField(); 235 | break; 236 | } 237 | } 238 | return msg; 239 | }; 240 | /** 241 | * Serializes the message to binary data (in protobuf wire format). 242 | * @return {!Uint8Array} 243 | */ 244 | proto.sfu.SignalRequest.prototype.serializeBinary = function () { 245 | var writer = new jspb.BinaryWriter(); 246 | proto.sfu.SignalRequest.serializeBinaryToWriter(this, writer); 247 | return writer.getResultBuffer(); 248 | }; 249 | /** 250 | * Serializes the given message to binary data (in protobuf wire 251 | * format), writing to the given BinaryWriter. 252 | * @param {!proto.sfu.SignalRequest} message 253 | * @param {!jspb.BinaryWriter} writer 254 | * @suppress {unusedLocalVariables} f is only used for nested messages 255 | */ 256 | proto.sfu.SignalRequest.serializeBinaryToWriter = function (message, writer) { 257 | var f = undefined; 258 | f = message.getId(); 259 | if (f.length > 0) { 260 | writer.writeString(1, f); 261 | } 262 | f = message.getJoin(); 263 | if (f != null) { 264 | writer.writeMessage(2, f, proto.sfu.JoinRequest.serializeBinaryToWriter); 265 | } 266 | f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); 267 | if (f != null) { 268 | writer.writeBytes(3, f); 269 | } 270 | f = message.getTrickle(); 271 | if (f != null) { 272 | writer.writeMessage(4, f, proto.sfu.Trickle.serializeBinaryToWriter); 273 | } 274 | }; 275 | /** 276 | * optional string id = 1; 277 | * @return {string} 278 | */ 279 | proto.sfu.SignalRequest.prototype.getId = function () { 280 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 281 | }; 282 | /** 283 | * @param {string} value 284 | * @return {!proto.sfu.SignalRequest} returns this 285 | */ 286 | proto.sfu.SignalRequest.prototype.setId = function (value) { 287 | return jspb.Message.setProto3StringField(this, 1, value); 288 | }; 289 | /** 290 | * optional JoinRequest join = 2; 291 | * @return {?proto.sfu.JoinRequest} 292 | */ 293 | proto.sfu.SignalRequest.prototype.getJoin = function () { 294 | return /** @type{?proto.sfu.JoinRequest} */ (jspb.Message.getWrapperField(this, proto.sfu.JoinRequest, 2)); 295 | }; 296 | /** 297 | * @param {?proto.sfu.JoinRequest|undefined} value 298 | * @return {!proto.sfu.SignalRequest} returns this 299 | */ 300 | proto.sfu.SignalRequest.prototype.setJoin = function (value) { 301 | return jspb.Message.setOneofWrapperField(this, 2, proto.sfu.SignalRequest.oneofGroups_[0], value); 302 | }; 303 | /** 304 | * Clears the message field making it undefined. 305 | * @return {!proto.sfu.SignalRequest} returns this 306 | */ 307 | proto.sfu.SignalRequest.prototype.clearJoin = function () { 308 | return this.setJoin(undefined); 309 | }; 310 | /** 311 | * Returns whether this field is set. 312 | * @return {boolean} 313 | */ 314 | proto.sfu.SignalRequest.prototype.hasJoin = function () { 315 | return jspb.Message.getField(this, 2) != null; 316 | }; 317 | /** 318 | * optional bytes description = 3; 319 | * @return {!(string|Uint8Array)} 320 | */ 321 | proto.sfu.SignalRequest.prototype.getDescription = function () { 322 | return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); 323 | }; 324 | /** 325 | * optional bytes description = 3; 326 | * This is a type-conversion wrapper around `getDescription()` 327 | * @return {string} 328 | */ 329 | proto.sfu.SignalRequest.prototype.getDescription_asB64 = function () { 330 | return /** @type {string} */ (jspb.Message.bytesAsB64(this.getDescription())); 331 | }; 332 | /** 333 | * optional bytes description = 3; 334 | * Note that Uint8Array is not supported on all browsers. 335 | * @see http://caniuse.com/Uint8Array 336 | * This is a type-conversion wrapper around `getDescription()` 337 | * @return {!Uint8Array} 338 | */ 339 | proto.sfu.SignalRequest.prototype.getDescription_asU8 = function () { 340 | return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getDescription())); 341 | }; 342 | /** 343 | * @param {!(string|Uint8Array)} value 344 | * @return {!proto.sfu.SignalRequest} returns this 345 | */ 346 | proto.sfu.SignalRequest.prototype.setDescription = function (value) { 347 | return jspb.Message.setOneofField(this, 3, proto.sfu.SignalRequest.oneofGroups_[0], value); 348 | }; 349 | /** 350 | * Clears the field making it undefined. 351 | * @return {!proto.sfu.SignalRequest} returns this 352 | */ 353 | proto.sfu.SignalRequest.prototype.clearDescription = function () { 354 | return jspb.Message.setOneofField(this, 3, proto.sfu.SignalRequest.oneofGroups_[0], undefined); 355 | }; 356 | /** 357 | * Returns whether this field is set. 358 | * @return {boolean} 359 | */ 360 | proto.sfu.SignalRequest.prototype.hasDescription = function () { 361 | return jspb.Message.getField(this, 3) != null; 362 | }; 363 | /** 364 | * optional Trickle trickle = 4; 365 | * @return {?proto.sfu.Trickle} 366 | */ 367 | proto.sfu.SignalRequest.prototype.getTrickle = function () { 368 | return /** @type{?proto.sfu.Trickle} */ (jspb.Message.getWrapperField(this, proto.sfu.Trickle, 4)); 369 | }; 370 | /** 371 | * @param {?proto.sfu.Trickle|undefined} value 372 | * @return {!proto.sfu.SignalRequest} returns this 373 | */ 374 | proto.sfu.SignalRequest.prototype.setTrickle = function (value) { 375 | return jspb.Message.setOneofWrapperField(this, 4, proto.sfu.SignalRequest.oneofGroups_[0], value); 376 | }; 377 | /** 378 | * Clears the message field making it undefined. 379 | * @return {!proto.sfu.SignalRequest} returns this 380 | */ 381 | proto.sfu.SignalRequest.prototype.clearTrickle = function () { 382 | return this.setTrickle(undefined); 383 | }; 384 | /** 385 | * Returns whether this field is set. 386 | * @return {boolean} 387 | */ 388 | proto.sfu.SignalRequest.prototype.hasTrickle = function () { 389 | return jspb.Message.getField(this, 4) != null; 390 | }; 391 | /** 392 | * Oneof group definitions for this message. Each group defines the field 393 | * numbers belonging to that group. When of these fields' value is set, all 394 | * other fields in the group are cleared. During deserialization, if multiple 395 | * fields are encountered for a group, only the last value seen will be kept. 396 | * @private {!Array>} 397 | * @const 398 | */ 399 | proto.sfu.SignalReply.oneofGroups_ = [[2, 3, 4, 5, 6]]; 400 | /** 401 | * @enum {number} 402 | */ 403 | proto.sfu.SignalReply.PayloadCase = { 404 | PAYLOAD_NOT_SET: 0, 405 | JOIN: 2, 406 | DESCRIPTION: 3, 407 | TRICKLE: 4, 408 | ICECONNECTIONSTATE: 5, 409 | ERROR: 6 410 | }; 411 | /** 412 | * @return {proto.sfu.SignalReply.PayloadCase} 413 | */ 414 | proto.sfu.SignalReply.prototype.getPayloadCase = function () { 415 | return /** @type {proto.sfu.SignalReply.PayloadCase} */ (jspb.Message.computeOneofCase(this, proto.sfu.SignalReply.oneofGroups_[0])); 416 | }; 417 | if (jspb.Message.GENERATE_TO_OBJECT) { 418 | /** 419 | * Creates an object representation of this proto. 420 | * Field names that are reserved in JavaScript and will be renamed to pb_name. 421 | * Optional fields that are not set will be set to undefined. 422 | * To access a reserved field use, foo.pb_, eg, foo.pb_default. 423 | * For the list of reserved names please see: 424 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. 425 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the 426 | * JSPB instance for transitional soy proto support: 427 | * http://goto/soy-param-migration 428 | * @return {!Object} 429 | */ 430 | proto.sfu.SignalReply.prototype.toObject = function (opt_includeInstance) { 431 | return proto.sfu.SignalReply.toObject(opt_includeInstance, this); 432 | }; 433 | /** 434 | * Static version of the {@see toObject} method. 435 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include 436 | * the JSPB instance for transitional soy proto support: 437 | * http://goto/soy-param-migration 438 | * @param {!proto.sfu.SignalReply} msg The msg instance to transform. 439 | * @return {!Object} 440 | * @suppress {unusedLocalVariables} f is only used for nested messages 441 | */ 442 | proto.sfu.SignalReply.toObject = function (includeInstance, msg) { 443 | var f, obj = { 444 | id: jspb.Message.getFieldWithDefault(msg, 1, ""), 445 | join: (f = msg.getJoin()) && proto.sfu.JoinReply.toObject(includeInstance, f), 446 | description: msg.getDescription_asB64(), 447 | trickle: (f = msg.getTrickle()) && proto.sfu.Trickle.toObject(includeInstance, f), 448 | iceconnectionstate: jspb.Message.getFieldWithDefault(msg, 5, ""), 449 | error: jspb.Message.getFieldWithDefault(msg, 6, "") 450 | }; 451 | if (includeInstance) { 452 | obj.$jspbMessageInstance = msg; 453 | } 454 | return obj; 455 | }; 456 | } 457 | /** 458 | * Deserializes binary data (in protobuf wire format). 459 | * @param {jspb.ByteSource} bytes The bytes to deserialize. 460 | * @return {!proto.sfu.SignalReply} 461 | */ 462 | proto.sfu.SignalReply.deserializeBinary = function (bytes) { 463 | var reader = new jspb.BinaryReader(bytes); 464 | var msg = new proto.sfu.SignalReply; 465 | return proto.sfu.SignalReply.deserializeBinaryFromReader(msg, reader); 466 | }; 467 | /** 468 | * Deserializes binary data (in protobuf wire format) from the 469 | * given reader into the given message object. 470 | * @param {!proto.sfu.SignalReply} msg The message object to deserialize into. 471 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. 472 | * @return {!proto.sfu.SignalReply} 473 | */ 474 | proto.sfu.SignalReply.deserializeBinaryFromReader = function (msg, reader) { 475 | while (reader.nextField()) { 476 | if (reader.isEndGroup()) { 477 | break; 478 | } 479 | var field = reader.getFieldNumber(); 480 | switch (field) { 481 | case 1: 482 | var value = /** @type {string} */ (reader.readString()); 483 | msg.setId(value); 484 | break; 485 | case 2: 486 | var value = new proto.sfu.JoinReply; 487 | reader.readMessage(value, proto.sfu.JoinReply.deserializeBinaryFromReader); 488 | msg.setJoin(value); 489 | break; 490 | case 3: 491 | var value = /** @type {!Uint8Array} */ (reader.readBytes()); 492 | msg.setDescription(value); 493 | break; 494 | case 4: 495 | var value = new proto.sfu.Trickle; 496 | reader.readMessage(value, proto.sfu.Trickle.deserializeBinaryFromReader); 497 | msg.setTrickle(value); 498 | break; 499 | case 5: 500 | var value = /** @type {string} */ (reader.readString()); 501 | msg.setIceconnectionstate(value); 502 | break; 503 | case 6: 504 | var value = /** @type {string} */ (reader.readString()); 505 | msg.setError(value); 506 | break; 507 | default: 508 | reader.skipField(); 509 | break; 510 | } 511 | } 512 | return msg; 513 | }; 514 | /** 515 | * Serializes the message to binary data (in protobuf wire format). 516 | * @return {!Uint8Array} 517 | */ 518 | proto.sfu.SignalReply.prototype.serializeBinary = function () { 519 | var writer = new jspb.BinaryWriter(); 520 | proto.sfu.SignalReply.serializeBinaryToWriter(this, writer); 521 | return writer.getResultBuffer(); 522 | }; 523 | /** 524 | * Serializes the given message to binary data (in protobuf wire 525 | * format), writing to the given BinaryWriter. 526 | * @param {!proto.sfu.SignalReply} message 527 | * @param {!jspb.BinaryWriter} writer 528 | * @suppress {unusedLocalVariables} f is only used for nested messages 529 | */ 530 | proto.sfu.SignalReply.serializeBinaryToWriter = function (message, writer) { 531 | var f = undefined; 532 | f = message.getId(); 533 | if (f.length > 0) { 534 | writer.writeString(1, f); 535 | } 536 | f = message.getJoin(); 537 | if (f != null) { 538 | writer.writeMessage(2, f, proto.sfu.JoinReply.serializeBinaryToWriter); 539 | } 540 | f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); 541 | if (f != null) { 542 | writer.writeBytes(3, f); 543 | } 544 | f = message.getTrickle(); 545 | if (f != null) { 546 | writer.writeMessage(4, f, proto.sfu.Trickle.serializeBinaryToWriter); 547 | } 548 | f = /** @type {string} */ (jspb.Message.getField(message, 5)); 549 | if (f != null) { 550 | writer.writeString(5, f); 551 | } 552 | f = /** @type {string} */ (jspb.Message.getField(message, 6)); 553 | if (f != null) { 554 | writer.writeString(6, f); 555 | } 556 | }; 557 | /** 558 | * optional string id = 1; 559 | * @return {string} 560 | */ 561 | proto.sfu.SignalReply.prototype.getId = function () { 562 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 563 | }; 564 | /** 565 | * @param {string} value 566 | * @return {!proto.sfu.SignalReply} returns this 567 | */ 568 | proto.sfu.SignalReply.prototype.setId = function (value) { 569 | return jspb.Message.setProto3StringField(this, 1, value); 570 | }; 571 | /** 572 | * optional JoinReply join = 2; 573 | * @return {?proto.sfu.JoinReply} 574 | */ 575 | proto.sfu.SignalReply.prototype.getJoin = function () { 576 | return /** @type{?proto.sfu.JoinReply} */ (jspb.Message.getWrapperField(this, proto.sfu.JoinReply, 2)); 577 | }; 578 | /** 579 | * @param {?proto.sfu.JoinReply|undefined} value 580 | * @return {!proto.sfu.SignalReply} returns this 581 | */ 582 | proto.sfu.SignalReply.prototype.setJoin = function (value) { 583 | return jspb.Message.setOneofWrapperField(this, 2, proto.sfu.SignalReply.oneofGroups_[0], value); 584 | }; 585 | /** 586 | * Clears the message field making it undefined. 587 | * @return {!proto.sfu.SignalReply} returns this 588 | */ 589 | proto.sfu.SignalReply.prototype.clearJoin = function () { 590 | return this.setJoin(undefined); 591 | }; 592 | /** 593 | * Returns whether this field is set. 594 | * @return {boolean} 595 | */ 596 | proto.sfu.SignalReply.prototype.hasJoin = function () { 597 | return jspb.Message.getField(this, 2) != null; 598 | }; 599 | /** 600 | * optional bytes description = 3; 601 | * @return {!(string|Uint8Array)} 602 | */ 603 | proto.sfu.SignalReply.prototype.getDescription = function () { 604 | return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); 605 | }; 606 | /** 607 | * optional bytes description = 3; 608 | * This is a type-conversion wrapper around `getDescription()` 609 | * @return {string} 610 | */ 611 | proto.sfu.SignalReply.prototype.getDescription_asB64 = function () { 612 | return /** @type {string} */ (jspb.Message.bytesAsB64(this.getDescription())); 613 | }; 614 | /** 615 | * optional bytes description = 3; 616 | * Note that Uint8Array is not supported on all browsers. 617 | * @see http://caniuse.com/Uint8Array 618 | * This is a type-conversion wrapper around `getDescription()` 619 | * @return {!Uint8Array} 620 | */ 621 | proto.sfu.SignalReply.prototype.getDescription_asU8 = function () { 622 | return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getDescription())); 623 | }; 624 | /** 625 | * @param {!(string|Uint8Array)} value 626 | * @return {!proto.sfu.SignalReply} returns this 627 | */ 628 | proto.sfu.SignalReply.prototype.setDescription = function (value) { 629 | return jspb.Message.setOneofField(this, 3, proto.sfu.SignalReply.oneofGroups_[0], value); 630 | }; 631 | /** 632 | * Clears the field making it undefined. 633 | * @return {!proto.sfu.SignalReply} returns this 634 | */ 635 | proto.sfu.SignalReply.prototype.clearDescription = function () { 636 | return jspb.Message.setOneofField(this, 3, proto.sfu.SignalReply.oneofGroups_[0], undefined); 637 | }; 638 | /** 639 | * Returns whether this field is set. 640 | * @return {boolean} 641 | */ 642 | proto.sfu.SignalReply.prototype.hasDescription = function () { 643 | return jspb.Message.getField(this, 3) != null; 644 | }; 645 | /** 646 | * optional Trickle trickle = 4; 647 | * @return {?proto.sfu.Trickle} 648 | */ 649 | proto.sfu.SignalReply.prototype.getTrickle = function () { 650 | return /** @type{?proto.sfu.Trickle} */ (jspb.Message.getWrapperField(this, proto.sfu.Trickle, 4)); 651 | }; 652 | /** 653 | * @param {?proto.sfu.Trickle|undefined} value 654 | * @return {!proto.sfu.SignalReply} returns this 655 | */ 656 | proto.sfu.SignalReply.prototype.setTrickle = function (value) { 657 | return jspb.Message.setOneofWrapperField(this, 4, proto.sfu.SignalReply.oneofGroups_[0], value); 658 | }; 659 | /** 660 | * Clears the message field making it undefined. 661 | * @return {!proto.sfu.SignalReply} returns this 662 | */ 663 | proto.sfu.SignalReply.prototype.clearTrickle = function () { 664 | return this.setTrickle(undefined); 665 | }; 666 | /** 667 | * Returns whether this field is set. 668 | * @return {boolean} 669 | */ 670 | proto.sfu.SignalReply.prototype.hasTrickle = function () { 671 | return jspb.Message.getField(this, 4) != null; 672 | }; 673 | /** 674 | * optional string iceConnectionState = 5; 675 | * @return {string} 676 | */ 677 | proto.sfu.SignalReply.prototype.getIceconnectionstate = function () { 678 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); 679 | }; 680 | /** 681 | * @param {string} value 682 | * @return {!proto.sfu.SignalReply} returns this 683 | */ 684 | proto.sfu.SignalReply.prototype.setIceconnectionstate = function (value) { 685 | return jspb.Message.setOneofField(this, 5, proto.sfu.SignalReply.oneofGroups_[0], value); 686 | }; 687 | /** 688 | * Clears the field making it undefined. 689 | * @return {!proto.sfu.SignalReply} returns this 690 | */ 691 | proto.sfu.SignalReply.prototype.clearIceconnectionstate = function () { 692 | return jspb.Message.setOneofField(this, 5, proto.sfu.SignalReply.oneofGroups_[0], undefined); 693 | }; 694 | /** 695 | * Returns whether this field is set. 696 | * @return {boolean} 697 | */ 698 | proto.sfu.SignalReply.prototype.hasIceconnectionstate = function () { 699 | return jspb.Message.getField(this, 5) != null; 700 | }; 701 | /** 702 | * optional string error = 6; 703 | * @return {string} 704 | */ 705 | proto.sfu.SignalReply.prototype.getError = function () { 706 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); 707 | }; 708 | /** 709 | * @param {string} value 710 | * @return {!proto.sfu.SignalReply} returns this 711 | */ 712 | proto.sfu.SignalReply.prototype.setError = function (value) { 713 | return jspb.Message.setOneofField(this, 6, proto.sfu.SignalReply.oneofGroups_[0], value); 714 | }; 715 | /** 716 | * Clears the field making it undefined. 717 | * @return {!proto.sfu.SignalReply} returns this 718 | */ 719 | proto.sfu.SignalReply.prototype.clearError = function () { 720 | return jspb.Message.setOneofField(this, 6, proto.sfu.SignalReply.oneofGroups_[0], undefined); 721 | }; 722 | /** 723 | * Returns whether this field is set. 724 | * @return {boolean} 725 | */ 726 | proto.sfu.SignalReply.prototype.hasError = function () { 727 | return jspb.Message.getField(this, 6) != null; 728 | }; 729 | if (jspb.Message.GENERATE_TO_OBJECT) { 730 | /** 731 | * Creates an object representation of this proto. 732 | * Field names that are reserved in JavaScript and will be renamed to pb_name. 733 | * Optional fields that are not set will be set to undefined. 734 | * To access a reserved field use, foo.pb_, eg, foo.pb_default. 735 | * For the list of reserved names please see: 736 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. 737 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the 738 | * JSPB instance for transitional soy proto support: 739 | * http://goto/soy-param-migration 740 | * @return {!Object} 741 | */ 742 | proto.sfu.JoinRequest.prototype.toObject = function (opt_includeInstance) { 743 | return proto.sfu.JoinRequest.toObject(opt_includeInstance, this); 744 | }; 745 | /** 746 | * Static version of the {@see toObject} method. 747 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include 748 | * the JSPB instance for transitional soy proto support: 749 | * http://goto/soy-param-migration 750 | * @param {!proto.sfu.JoinRequest} msg The msg instance to transform. 751 | * @return {!Object} 752 | * @suppress {unusedLocalVariables} f is only used for nested messages 753 | */ 754 | proto.sfu.JoinRequest.toObject = function (includeInstance, msg) { 755 | var f, obj = { 756 | sid: jspb.Message.getFieldWithDefault(msg, 1, ""), 757 | description: msg.getDescription_asB64() 758 | }; 759 | if (includeInstance) { 760 | obj.$jspbMessageInstance = msg; 761 | } 762 | return obj; 763 | }; 764 | } 765 | /** 766 | * Deserializes binary data (in protobuf wire format). 767 | * @param {jspb.ByteSource} bytes The bytes to deserialize. 768 | * @return {!proto.sfu.JoinRequest} 769 | */ 770 | proto.sfu.JoinRequest.deserializeBinary = function (bytes) { 771 | var reader = new jspb.BinaryReader(bytes); 772 | var msg = new proto.sfu.JoinRequest; 773 | return proto.sfu.JoinRequest.deserializeBinaryFromReader(msg, reader); 774 | }; 775 | /** 776 | * Deserializes binary data (in protobuf wire format) from the 777 | * given reader into the given message object. 778 | * @param {!proto.sfu.JoinRequest} msg The message object to deserialize into. 779 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. 780 | * @return {!proto.sfu.JoinRequest} 781 | */ 782 | proto.sfu.JoinRequest.deserializeBinaryFromReader = function (msg, reader) { 783 | while (reader.nextField()) { 784 | if (reader.isEndGroup()) { 785 | break; 786 | } 787 | var field = reader.getFieldNumber(); 788 | switch (field) { 789 | case 1: 790 | var value = /** @type {string} */ (reader.readString()); 791 | msg.setSid(value); 792 | break; 793 | case 2: 794 | var value = /** @type {!Uint8Array} */ (reader.readBytes()); 795 | msg.setDescription(value); 796 | break; 797 | default: 798 | reader.skipField(); 799 | break; 800 | } 801 | } 802 | return msg; 803 | }; 804 | /** 805 | * Serializes the message to binary data (in protobuf wire format). 806 | * @return {!Uint8Array} 807 | */ 808 | proto.sfu.JoinRequest.prototype.serializeBinary = function () { 809 | var writer = new jspb.BinaryWriter(); 810 | proto.sfu.JoinRequest.serializeBinaryToWriter(this, writer); 811 | return writer.getResultBuffer(); 812 | }; 813 | /** 814 | * Serializes the given message to binary data (in protobuf wire 815 | * format), writing to the given BinaryWriter. 816 | * @param {!proto.sfu.JoinRequest} message 817 | * @param {!jspb.BinaryWriter} writer 818 | * @suppress {unusedLocalVariables} f is only used for nested messages 819 | */ 820 | proto.sfu.JoinRequest.serializeBinaryToWriter = function (message, writer) { 821 | var f = undefined; 822 | f = message.getSid(); 823 | if (f.length > 0) { 824 | writer.writeString(1, f); 825 | } 826 | f = message.getDescription_asU8(); 827 | if (f.length > 0) { 828 | writer.writeBytes(2, f); 829 | } 830 | }; 831 | /** 832 | * optional string sid = 1; 833 | * @return {string} 834 | */ 835 | proto.sfu.JoinRequest.prototype.getSid = function () { 836 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 837 | }; 838 | /** 839 | * @param {string} value 840 | * @return {!proto.sfu.JoinRequest} returns this 841 | */ 842 | proto.sfu.JoinRequest.prototype.setSid = function (value) { 843 | return jspb.Message.setProto3StringField(this, 1, value); 844 | }; 845 | /** 846 | * optional bytes description = 2; 847 | * @return {!(string|Uint8Array)} 848 | */ 849 | proto.sfu.JoinRequest.prototype.getDescription = function () { 850 | return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); 851 | }; 852 | /** 853 | * optional bytes description = 2; 854 | * This is a type-conversion wrapper around `getDescription()` 855 | * @return {string} 856 | */ 857 | proto.sfu.JoinRequest.prototype.getDescription_asB64 = function () { 858 | return /** @type {string} */ (jspb.Message.bytesAsB64(this.getDescription())); 859 | }; 860 | /** 861 | * optional bytes description = 2; 862 | * Note that Uint8Array is not supported on all browsers. 863 | * @see http://caniuse.com/Uint8Array 864 | * This is a type-conversion wrapper around `getDescription()` 865 | * @return {!Uint8Array} 866 | */ 867 | proto.sfu.JoinRequest.prototype.getDescription_asU8 = function () { 868 | return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getDescription())); 869 | }; 870 | /** 871 | * @param {!(string|Uint8Array)} value 872 | * @return {!proto.sfu.JoinRequest} returns this 873 | */ 874 | proto.sfu.JoinRequest.prototype.setDescription = function (value) { 875 | return jspb.Message.setProto3BytesField(this, 2, value); 876 | }; 877 | if (jspb.Message.GENERATE_TO_OBJECT) { 878 | /** 879 | * Creates an object representation of this proto. 880 | * Field names that are reserved in JavaScript and will be renamed to pb_name. 881 | * Optional fields that are not set will be set to undefined. 882 | * To access a reserved field use, foo.pb_, eg, foo.pb_default. 883 | * For the list of reserved names please see: 884 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. 885 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the 886 | * JSPB instance for transitional soy proto support: 887 | * http://goto/soy-param-migration 888 | * @return {!Object} 889 | */ 890 | proto.sfu.JoinReply.prototype.toObject = function (opt_includeInstance) { 891 | return proto.sfu.JoinReply.toObject(opt_includeInstance, this); 892 | }; 893 | /** 894 | * Static version of the {@see toObject} method. 895 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include 896 | * the JSPB instance for transitional soy proto support: 897 | * http://goto/soy-param-migration 898 | * @param {!proto.sfu.JoinReply} msg The msg instance to transform. 899 | * @return {!Object} 900 | * @suppress {unusedLocalVariables} f is only used for nested messages 901 | */ 902 | proto.sfu.JoinReply.toObject = function (includeInstance, msg) { 903 | var f, obj = { 904 | description: msg.getDescription_asB64() 905 | }; 906 | if (includeInstance) { 907 | obj.$jspbMessageInstance = msg; 908 | } 909 | return obj; 910 | }; 911 | } 912 | /** 913 | * Deserializes binary data (in protobuf wire format). 914 | * @param {jspb.ByteSource} bytes The bytes to deserialize. 915 | * @return {!proto.sfu.JoinReply} 916 | */ 917 | proto.sfu.JoinReply.deserializeBinary = function (bytes) { 918 | var reader = new jspb.BinaryReader(bytes); 919 | var msg = new proto.sfu.JoinReply; 920 | return proto.sfu.JoinReply.deserializeBinaryFromReader(msg, reader); 921 | }; 922 | /** 923 | * Deserializes binary data (in protobuf wire format) from the 924 | * given reader into the given message object. 925 | * @param {!proto.sfu.JoinReply} msg The message object to deserialize into. 926 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. 927 | * @return {!proto.sfu.JoinReply} 928 | */ 929 | proto.sfu.JoinReply.deserializeBinaryFromReader = function (msg, reader) { 930 | while (reader.nextField()) { 931 | if (reader.isEndGroup()) { 932 | break; 933 | } 934 | var field = reader.getFieldNumber(); 935 | switch (field) { 936 | case 1: 937 | var value = /** @type {!Uint8Array} */ (reader.readBytes()); 938 | msg.setDescription(value); 939 | break; 940 | default: 941 | reader.skipField(); 942 | break; 943 | } 944 | } 945 | return msg; 946 | }; 947 | /** 948 | * Serializes the message to binary data (in protobuf wire format). 949 | * @return {!Uint8Array} 950 | */ 951 | proto.sfu.JoinReply.prototype.serializeBinary = function () { 952 | var writer = new jspb.BinaryWriter(); 953 | proto.sfu.JoinReply.serializeBinaryToWriter(this, writer); 954 | return writer.getResultBuffer(); 955 | }; 956 | /** 957 | * Serializes the given message to binary data (in protobuf wire 958 | * format), writing to the given BinaryWriter. 959 | * @param {!proto.sfu.JoinReply} message 960 | * @param {!jspb.BinaryWriter} writer 961 | * @suppress {unusedLocalVariables} f is only used for nested messages 962 | */ 963 | proto.sfu.JoinReply.serializeBinaryToWriter = function (message, writer) { 964 | var f = undefined; 965 | f = message.getDescription_asU8(); 966 | if (f.length > 0) { 967 | writer.writeBytes(1, f); 968 | } 969 | }; 970 | /** 971 | * optional bytes description = 1; 972 | * @return {!(string|Uint8Array)} 973 | */ 974 | proto.sfu.JoinReply.prototype.getDescription = function () { 975 | return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 976 | }; 977 | /** 978 | * optional bytes description = 1; 979 | * This is a type-conversion wrapper around `getDescription()` 980 | * @return {string} 981 | */ 982 | proto.sfu.JoinReply.prototype.getDescription_asB64 = function () { 983 | return /** @type {string} */ (jspb.Message.bytesAsB64(this.getDescription())); 984 | }; 985 | /** 986 | * optional bytes description = 1; 987 | * Note that Uint8Array is not supported on all browsers. 988 | * @see http://caniuse.com/Uint8Array 989 | * This is a type-conversion wrapper around `getDescription()` 990 | * @return {!Uint8Array} 991 | */ 992 | proto.sfu.JoinReply.prototype.getDescription_asU8 = function () { 993 | return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getDescription())); 994 | }; 995 | /** 996 | * @param {!(string|Uint8Array)} value 997 | * @return {!proto.sfu.JoinReply} returns this 998 | */ 999 | proto.sfu.JoinReply.prototype.setDescription = function (value) { 1000 | return jspb.Message.setProto3BytesField(this, 1, value); 1001 | }; 1002 | if (jspb.Message.GENERATE_TO_OBJECT) { 1003 | /** 1004 | * Creates an object representation of this proto. 1005 | * Field names that are reserved in JavaScript and will be renamed to pb_name. 1006 | * Optional fields that are not set will be set to undefined. 1007 | * To access a reserved field use, foo.pb_, eg, foo.pb_default. 1008 | * For the list of reserved names please see: 1009 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. 1010 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the 1011 | * JSPB instance for transitional soy proto support: 1012 | * http://goto/soy-param-migration 1013 | * @return {!Object} 1014 | */ 1015 | proto.sfu.Trickle.prototype.toObject = function (opt_includeInstance) { 1016 | return proto.sfu.Trickle.toObject(opt_includeInstance, this); 1017 | }; 1018 | /** 1019 | * Static version of the {@see toObject} method. 1020 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include 1021 | * the JSPB instance for transitional soy proto support: 1022 | * http://goto/soy-param-migration 1023 | * @param {!proto.sfu.Trickle} msg The msg instance to transform. 1024 | * @return {!Object} 1025 | * @suppress {unusedLocalVariables} f is only used for nested messages 1026 | */ 1027 | proto.sfu.Trickle.toObject = function (includeInstance, msg) { 1028 | var f, obj = { 1029 | target: jspb.Message.getFieldWithDefault(msg, 1, 0), 1030 | init: jspb.Message.getFieldWithDefault(msg, 2, "") 1031 | }; 1032 | if (includeInstance) { 1033 | obj.$jspbMessageInstance = msg; 1034 | } 1035 | return obj; 1036 | }; 1037 | } 1038 | /** 1039 | * Deserializes binary data (in protobuf wire format). 1040 | * @param {jspb.ByteSource} bytes The bytes to deserialize. 1041 | * @return {!proto.sfu.Trickle} 1042 | */ 1043 | proto.sfu.Trickle.deserializeBinary = function (bytes) { 1044 | var reader = new jspb.BinaryReader(bytes); 1045 | var msg = new proto.sfu.Trickle; 1046 | return proto.sfu.Trickle.deserializeBinaryFromReader(msg, reader); 1047 | }; 1048 | /** 1049 | * Deserializes binary data (in protobuf wire format) from the 1050 | * given reader into the given message object. 1051 | * @param {!proto.sfu.Trickle} msg The message object to deserialize into. 1052 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. 1053 | * @return {!proto.sfu.Trickle} 1054 | */ 1055 | proto.sfu.Trickle.deserializeBinaryFromReader = function (msg, reader) { 1056 | while (reader.nextField()) { 1057 | if (reader.isEndGroup()) { 1058 | break; 1059 | } 1060 | var field = reader.getFieldNumber(); 1061 | switch (field) { 1062 | case 1: 1063 | var value = /** @type {!proto.sfu.Trickle.Target} */ (reader.readEnum()); 1064 | msg.setTarget(value); 1065 | break; 1066 | case 2: 1067 | var value = /** @type {string} */ (reader.readString()); 1068 | msg.setInit(value); 1069 | break; 1070 | default: 1071 | reader.skipField(); 1072 | break; 1073 | } 1074 | } 1075 | return msg; 1076 | }; 1077 | /** 1078 | * Serializes the message to binary data (in protobuf wire format). 1079 | * @return {!Uint8Array} 1080 | */ 1081 | proto.sfu.Trickle.prototype.serializeBinary = function () { 1082 | var writer = new jspb.BinaryWriter(); 1083 | proto.sfu.Trickle.serializeBinaryToWriter(this, writer); 1084 | return writer.getResultBuffer(); 1085 | }; 1086 | /** 1087 | * Serializes the given message to binary data (in protobuf wire 1088 | * format), writing to the given BinaryWriter. 1089 | * @param {!proto.sfu.Trickle} message 1090 | * @param {!jspb.BinaryWriter} writer 1091 | * @suppress {unusedLocalVariables} f is only used for nested messages 1092 | */ 1093 | proto.sfu.Trickle.serializeBinaryToWriter = function (message, writer) { 1094 | var f = undefined; 1095 | f = message.getTarget(); 1096 | if (f !== 0.0) { 1097 | writer.writeEnum(1, f); 1098 | } 1099 | f = message.getInit(); 1100 | if (f.length > 0) { 1101 | writer.writeString(2, f); 1102 | } 1103 | }; 1104 | /** 1105 | * @enum {number} 1106 | */ 1107 | proto.sfu.Trickle.Target = { 1108 | PUBLISHER: 0, 1109 | SUBSCRIBER: 1 1110 | }; 1111 | /** 1112 | * optional Target target = 1; 1113 | * @return {!proto.sfu.Trickle.Target} 1114 | */ 1115 | proto.sfu.Trickle.prototype.getTarget = function () { 1116 | return /** @type {!proto.sfu.Trickle.Target} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); 1117 | }; 1118 | /** 1119 | * @param {!proto.sfu.Trickle.Target} value 1120 | * @return {!proto.sfu.Trickle} returns this 1121 | */ 1122 | proto.sfu.Trickle.prototype.setTarget = function (value) { 1123 | return jspb.Message.setProto3EnumField(this, 1, value); 1124 | }; 1125 | /** 1126 | * optional string init = 2; 1127 | * @return {string} 1128 | */ 1129 | proto.sfu.Trickle.prototype.getInit = function () { 1130 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); 1131 | }; 1132 | /** 1133 | * @param {string} value 1134 | * @return {!proto.sfu.Trickle} returns this 1135 | */ 1136 | proto.sfu.Trickle.prototype.setInit = function (value) { 1137 | return jspb.Message.setProto3StringField(this, 2, value); 1138 | }; 1139 | goog.object.extend(exports, proto.sfu); 1140 | //# sourceMappingURL=sfu_pb.js.map -------------------------------------------------------------------------------- /lib/proto/sfu_pb.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"sfu_pb.js","sourceRoot":"","sources":["../../src/proto/sfu_pb.js"],"names":[],"mappings":";AAAA,oBAAoB;AACpB;;;;;;GAMG;AACH,iCAAiC;AACjC,oBAAoB;AACpB,cAAc;AAEd,IAAI,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACtC,IAAI,IAAI,GAAG,IAAI,CAAC;AAChB,IAAI,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;AAEvC,IAAI,CAAC,YAAY,CAAC,qBAAqB,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACvD,IAAI,CAAC,YAAY,CAAC,uBAAuB,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACzD,IAAI,CAAC,YAAY,CAAC,uBAAuB,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACzD,IAAI,CAAC,YAAY,CAAC,mCAAmC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACrE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C,OAAO,qBAAqB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/E,CAAC,CAAC;AAGF;;;GAGG;AACH,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,GAAG,UAAS,KAAK;IAClD,OAAO,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC;AAC3D,CAAC,CAAC;AAGF,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC"} -------------------------------------------------------------------------------- /npmignore: -------------------------------------------------------------------------------- 1 | scripts 2 | ./src/test.* 3 | ./lib/test.* -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ion-sfu-nodejs", 3 | "version": "0.0.6", 4 | "description": "nodejs interface to pion/ion-sfu, bring the power of pion to nodejs", 5 | "main": "lib/index.js", 6 | "types": "lib", 7 | "repository": "https://github.com/jason-shen/ion-sfu-nodejs", 8 | "author": "Jason Shen", 9 | "license": "MIT", 10 | "scripts": { 11 | "build": "tsc -p ." 12 | }, 13 | "dependencies": { 14 | "@types/events": "^3.0.0", 15 | "events": "^3.2.0", 16 | "google-protobuf": "^3.14.0", 17 | "grpc": "^1.24.4", 18 | "js-base64": "^3.6.0" 19 | }, 20 | "devDependencies": { 21 | "@types/google-protobuf": "^3.7.4", 22 | "grpc-tools": "^1.10.0", 23 | "grpc_tools_node_protoc_ts": "^5.0.1" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/conn.ts: -------------------------------------------------------------------------------- 1 | import * as grpc from 'grpc'; 2 | import {SFUClient} from './proto/sfu_grpc_pb'; 3 | 4 | export default new SFUClient( 5 | `localhost:50051`, 6 | grpc.credentials.createInsecure(), 7 | ) -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { Base64 } from "js-base64"; 2 | import {EventEmitter} from 'events'; 3 | import client from "./conn" 4 | import { JoinRequest, SignalReply, SignalRequest, Trickle } from "./proto/sfu_pb"; 5 | import grpc from "grpc"; 6 | 7 | 8 | class ionSfu extends EventEmitter { 9 | event: EventEmitter; 10 | private Call: grpc.ClientDuplexStream; 11 | 12 | constructor() { 13 | super() 14 | this.event = new EventEmitter(); 15 | this.Call = client.signal(); 16 | this.Call.on("data", (signalreply: SignalReply) => { 17 | // console.log("incoming", signalreply) 18 | const res = signalreply.getPayloadCase(); 19 | switch (res) { 20 | case SignalReply.PayloadCase.JOIN: 21 | this.event.emit("onJoin", signalreply.getId(), Base64.decode(signalreply.getJoin().getDescription_asB64())) 22 | // console.log("onjoin", signalreply.getId(), Base64.decode(signalreply.getJoin().getDescription_asB64())); 23 | break; 24 | case SignalReply.PayloadCase.DESCRIPTION: 25 | this.event.emit("onDescription", Base64.decode(signalreply.getDescription_asB64())); 26 | // console.log("onDescription", Base64.decode(signalreply.getDescription_asB64())) 27 | break; 28 | case SignalReply.PayloadCase.TRICKLE: 29 | this.event.emit("onTrickle", signalreply.getTrickle().getTarget(), signalreply.getTrickle().getInit()); 30 | //console.log("onCadadidate", signalreply.getTrickle().getTarget()); 31 | // console.log("oncan", signalreply.getTrickle().getInit()); 32 | break; 33 | case SignalReply.PayloadCase.ICECONNECTIONSTATE: 34 | this.event.emit("onIceconnectionstate", signalreply.getIceconnectionstate()) 35 | // console.log("icestatechanged: ", signalreply.getIceconnectionstate()); 36 | case SignalReply.PayloadCase.ERROR: 37 | this.event.emit("onError", signalreply.getError()); 38 | //console.log("on Error"); 39 | break; 40 | default: 41 | break; 42 | } 43 | }) 44 | } 45 | Join = (obj: string, id: string, sid: string) => { 46 | const request = new SignalRequest(); 47 | const join = new JoinRequest(); 48 | 49 | let dataoffer = Base64.encode(obj); 50 | // console.log("object a", objJsonB64); 51 | request.setId(id); 52 | join.setSid(sid); 53 | join.setDescription(dataoffer); 54 | 55 | // console.log(join) 56 | 57 | request.setJoin(join) 58 | // console.log(request); 59 | // const bufferedData = Buffer.from(JSON.stringify(request)); 60 | this.Call.write(request); 61 | } 62 | 63 | Description = (obj: string) => { 64 | const request = new SignalRequest(); 65 | let dataanswer = Base64.encode(obj); 66 | request.setDescription(dataanswer); 67 | 68 | this.Call.write(request); 69 | } 70 | 71 | Trickle = (target: any,obj: string) => { 72 | const requst = new SignalRequest(); 73 | const trickle = new Trickle(); 74 | trickle.setTarget(target) 75 | trickle.setInit(obj) 76 | } 77 | 78 | } 79 | 80 | export default ionSfu; 81 | -------------------------------------------------------------------------------- /src/proto/sfu.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package sfu; 4 | 5 | service SFU { 6 | rpc Signal(stream SignalRequest) returns (stream SignalReply) {} 7 | } 8 | 9 | message SignalRequest { 10 | string id = 1; 11 | oneof payload { 12 | JoinRequest join = 2; 13 | bytes description = 3; 14 | Trickle trickle = 4; 15 | } 16 | } 17 | 18 | message SignalReply { 19 | string id = 1; 20 | oneof payload { 21 | JoinReply join = 2; 22 | bytes description = 3; 23 | Trickle trickle = 4; 24 | string iceConnectionState = 5; 25 | string error = 6; 26 | } 27 | } 28 | 29 | message JoinRequest { 30 | string sid = 1; 31 | bytes description = 2; 32 | } 33 | 34 | message JoinReply { 35 | bytes description = 1; 36 | } 37 | 38 | message Trickle { 39 | enum Target { 40 | PUBLISHER = 0; 41 | SUBSCRIBER = 1; 42 | } 43 | Target target = 1; 44 | string init = 2; 45 | } 46 | -------------------------------------------------------------------------------- /src/proto/sfu_grpc_pb.d.ts: -------------------------------------------------------------------------------- 1 | // package: sfu 2 | // file: sfu.proto 3 | 4 | /* tslint:disable */ 5 | /* eslint-disable */ 6 | 7 | import * as grpc from "grpc"; 8 | import * as sfu_pb from "./sfu_pb"; 9 | 10 | interface ISFUService extends grpc.ServiceDefinition { 11 | signal: ISFUService_ISignal; 12 | } 13 | 14 | interface ISFUService_ISignal extends grpc.MethodDefinition { 15 | path: "/sfu.SFU/Signal"; 16 | requestStream: true; 17 | responseStream: true; 18 | requestSerialize: grpc.serialize; 19 | requestDeserialize: grpc.deserialize; 20 | responseSerialize: grpc.serialize; 21 | responseDeserialize: grpc.deserialize; 22 | } 23 | 24 | export const SFUService: ISFUService; 25 | 26 | export interface ISFUServer { 27 | signal: grpc.handleBidiStreamingCall; 28 | } 29 | 30 | export interface ISFUClient { 31 | signal(): grpc.ClientDuplexStream; 32 | signal(options: Partial): grpc.ClientDuplexStream; 33 | signal(metadata: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; 34 | } 35 | 36 | export class SFUClient extends grpc.Client implements ISFUClient { 37 | constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); 38 | public signal(options?: Partial): grpc.ClientDuplexStream; 39 | public signal(metadata?: grpc.Metadata, options?: Partial): grpc.ClientDuplexStream; 40 | } 41 | -------------------------------------------------------------------------------- /src/proto/sfu_grpc_pb.js: -------------------------------------------------------------------------------- 1 | // GENERATED CODE -- DO NOT EDIT! 2 | 3 | 'use strict'; 4 | var grpc = require('grpc'); 5 | var sfu_pb = require('./sfu_pb.js'); 6 | 7 | function serialize_sfu_SignalReply(arg) { 8 | if (!(arg instanceof sfu_pb.SignalReply)) { 9 | throw new Error('Expected argument of type sfu.SignalReply'); 10 | } 11 | return Buffer.from(arg.serializeBinary()); 12 | } 13 | 14 | function deserialize_sfu_SignalReply(buffer_arg) { 15 | return sfu_pb.SignalReply.deserializeBinary(new Uint8Array(buffer_arg)); 16 | } 17 | 18 | function serialize_sfu_SignalRequest(arg) { 19 | if (!(arg instanceof sfu_pb.SignalRequest)) { 20 | throw new Error('Expected argument of type sfu.SignalRequest'); 21 | } 22 | return Buffer.from(arg.serializeBinary()); 23 | } 24 | 25 | function deserialize_sfu_SignalRequest(buffer_arg) { 26 | return sfu_pb.SignalRequest.deserializeBinary(new Uint8Array(buffer_arg)); 27 | } 28 | 29 | 30 | var SFUService = exports.SFUService = { 31 | signal: { 32 | path: '/sfu.SFU/Signal', 33 | requestStream: true, 34 | responseStream: true, 35 | requestType: sfu_pb.SignalRequest, 36 | responseType: sfu_pb.SignalReply, 37 | requestSerialize: serialize_sfu_SignalRequest, 38 | requestDeserialize: deserialize_sfu_SignalRequest, 39 | responseSerialize: serialize_sfu_SignalReply, 40 | responseDeserialize: deserialize_sfu_SignalReply, 41 | }, 42 | }; 43 | 44 | exports.SFUClient = grpc.makeGenericClientConstructor(SFUService); 45 | -------------------------------------------------------------------------------- /src/proto/sfu_pb.d.ts: -------------------------------------------------------------------------------- 1 | // package: sfu 2 | // file: sfu.proto 3 | 4 | /* tslint:disable */ 5 | /* eslint-disable */ 6 | 7 | import * as jspb from "google-protobuf"; 8 | 9 | export class SignalRequest extends jspb.Message { 10 | getId(): string; 11 | setId(value: string): SignalRequest; 12 | 13 | 14 | hasJoin(): boolean; 15 | clearJoin(): void; 16 | getJoin(): JoinRequest | undefined; 17 | setJoin(value?: JoinRequest): SignalRequest; 18 | 19 | 20 | hasDescription(): boolean; 21 | clearDescription(): void; 22 | getDescription(): Uint8Array | string; 23 | getDescription_asU8(): Uint8Array; 24 | getDescription_asB64(): string; 25 | setDescription(value: Uint8Array | string): SignalRequest; 26 | 27 | 28 | hasTrickle(): boolean; 29 | clearTrickle(): void; 30 | getTrickle(): Trickle | undefined; 31 | setTrickle(value?: Trickle): SignalRequest; 32 | 33 | 34 | getPayloadCase(): SignalRequest.PayloadCase; 35 | 36 | serializeBinary(): Uint8Array; 37 | toObject(includeInstance?: boolean): SignalRequest.AsObject; 38 | static toObject(includeInstance: boolean, msg: SignalRequest): SignalRequest.AsObject; 39 | static extensions: {[key: number]: jspb.ExtensionFieldInfo}; 40 | static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; 41 | static serializeBinaryToWriter(message: SignalRequest, writer: jspb.BinaryWriter): void; 42 | static deserializeBinary(bytes: Uint8Array): SignalRequest; 43 | static deserializeBinaryFromReader(message: SignalRequest, reader: jspb.BinaryReader): SignalRequest; 44 | } 45 | 46 | export namespace SignalRequest { 47 | export type AsObject = { 48 | id: string, 49 | join?: JoinRequest.AsObject, 50 | description: Uint8Array | string, 51 | trickle?: Trickle.AsObject, 52 | } 53 | 54 | export enum PayloadCase { 55 | PAYLOAD_NOT_SET = 0, 56 | 57 | JOIN = 2, 58 | 59 | DESCRIPTION = 3, 60 | 61 | TRICKLE = 4, 62 | 63 | } 64 | 65 | } 66 | 67 | export class SignalReply extends jspb.Message { 68 | getId(): string; 69 | setId(value: string): SignalReply; 70 | 71 | 72 | hasJoin(): boolean; 73 | clearJoin(): void; 74 | getJoin(): JoinReply | undefined; 75 | setJoin(value?: JoinReply): SignalReply; 76 | 77 | 78 | hasDescription(): boolean; 79 | clearDescription(): void; 80 | getDescription(): Uint8Array | string; 81 | getDescription_asU8(): Uint8Array; 82 | getDescription_asB64(): string; 83 | setDescription(value: Uint8Array | string): SignalReply; 84 | 85 | 86 | hasTrickle(): boolean; 87 | clearTrickle(): void; 88 | getTrickle(): Trickle | undefined; 89 | setTrickle(value?: Trickle): SignalReply; 90 | 91 | 92 | hasIceconnectionstate(): boolean; 93 | clearIceconnectionstate(): void; 94 | getIceconnectionstate(): string; 95 | setIceconnectionstate(value: string): SignalReply; 96 | 97 | 98 | hasError(): boolean; 99 | clearError(): void; 100 | getError(): string; 101 | setError(value: string): SignalReply; 102 | 103 | 104 | getPayloadCase(): SignalReply.PayloadCase; 105 | 106 | serializeBinary(): Uint8Array; 107 | toObject(includeInstance?: boolean): SignalReply.AsObject; 108 | static toObject(includeInstance: boolean, msg: SignalReply): SignalReply.AsObject; 109 | static extensions: {[key: number]: jspb.ExtensionFieldInfo}; 110 | static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; 111 | static serializeBinaryToWriter(message: SignalReply, writer: jspb.BinaryWriter): void; 112 | static deserializeBinary(bytes: Uint8Array): SignalReply; 113 | static deserializeBinaryFromReader(message: SignalReply, reader: jspb.BinaryReader): SignalReply; 114 | } 115 | 116 | export namespace SignalReply { 117 | export type AsObject = { 118 | id: string, 119 | join?: JoinReply.AsObject, 120 | description: Uint8Array | string, 121 | trickle?: Trickle.AsObject, 122 | iceconnectionstate: string, 123 | error: string, 124 | } 125 | 126 | export enum PayloadCase { 127 | PAYLOAD_NOT_SET = 0, 128 | 129 | JOIN = 2, 130 | 131 | DESCRIPTION = 3, 132 | 133 | TRICKLE = 4, 134 | 135 | ICECONNECTIONSTATE = 5, 136 | 137 | ERROR = 6, 138 | 139 | } 140 | 141 | } 142 | 143 | export class JoinRequest extends jspb.Message { 144 | getSid(): string; 145 | setSid(value: string): JoinRequest; 146 | 147 | getDescription(): Uint8Array | string; 148 | getDescription_asU8(): Uint8Array; 149 | getDescription_asB64(): string; 150 | setDescription(value: Uint8Array | string): JoinRequest; 151 | 152 | 153 | serializeBinary(): Uint8Array; 154 | toObject(includeInstance?: boolean): JoinRequest.AsObject; 155 | static toObject(includeInstance: boolean, msg: JoinRequest): JoinRequest.AsObject; 156 | static extensions: {[key: number]: jspb.ExtensionFieldInfo}; 157 | static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; 158 | static serializeBinaryToWriter(message: JoinRequest, writer: jspb.BinaryWriter): void; 159 | static deserializeBinary(bytes: Uint8Array): JoinRequest; 160 | static deserializeBinaryFromReader(message: JoinRequest, reader: jspb.BinaryReader): JoinRequest; 161 | } 162 | 163 | export namespace JoinRequest { 164 | export type AsObject = { 165 | sid: string, 166 | description: Uint8Array | string, 167 | } 168 | } 169 | 170 | export class JoinReply extends jspb.Message { 171 | getDescription(): Uint8Array | string; 172 | getDescription_asU8(): Uint8Array; 173 | getDescription_asB64(): string; 174 | setDescription(value: Uint8Array | string): JoinReply; 175 | 176 | 177 | serializeBinary(): Uint8Array; 178 | toObject(includeInstance?: boolean): JoinReply.AsObject; 179 | static toObject(includeInstance: boolean, msg: JoinReply): JoinReply.AsObject; 180 | static extensions: {[key: number]: jspb.ExtensionFieldInfo}; 181 | static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; 182 | static serializeBinaryToWriter(message: JoinReply, writer: jspb.BinaryWriter): void; 183 | static deserializeBinary(bytes: Uint8Array): JoinReply; 184 | static deserializeBinaryFromReader(message: JoinReply, reader: jspb.BinaryReader): JoinReply; 185 | } 186 | 187 | export namespace JoinReply { 188 | export type AsObject = { 189 | description: Uint8Array | string, 190 | } 191 | } 192 | 193 | export class Trickle extends jspb.Message { 194 | getTarget(): Trickle.Target; 195 | setTarget(value: Trickle.Target): Trickle; 196 | 197 | getInit(): string; 198 | setInit(value: string): Trickle; 199 | 200 | 201 | serializeBinary(): Uint8Array; 202 | toObject(includeInstance?: boolean): Trickle.AsObject; 203 | static toObject(includeInstance: boolean, msg: Trickle): Trickle.AsObject; 204 | static extensions: {[key: number]: jspb.ExtensionFieldInfo}; 205 | static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; 206 | static serializeBinaryToWriter(message: Trickle, writer: jspb.BinaryWriter): void; 207 | static deserializeBinary(bytes: Uint8Array): Trickle; 208 | static deserializeBinaryFromReader(message: Trickle, reader: jspb.BinaryReader): Trickle; 209 | } 210 | 211 | export namespace Trickle { 212 | export type AsObject = { 213 | target: Trickle.Target, 214 | init: string, 215 | } 216 | 217 | export enum Target { 218 | PUBLISHER = 0, 219 | SUBSCRIBER = 1, 220 | } 221 | 222 | } 223 | -------------------------------------------------------------------------------- /src/proto/sfu_pb.js: -------------------------------------------------------------------------------- 1 | // source: sfu.proto 2 | /** 3 | * @fileoverview 4 | * @enhanceable 5 | * @suppress {messageConventions} JS Compiler reports an error if a variable or 6 | * field starts with 'MSG_' and isn't a translatable message. 7 | * @public 8 | */ 9 | // GENERATED CODE -- DO NOT EDIT! 10 | /* eslint-disable */ 11 | // @ts-nocheck 12 | 13 | var jspb = require('google-protobuf'); 14 | var goog = jspb; 15 | var global = Function('return this')(); 16 | 17 | goog.exportSymbol('proto.sfu.JoinReply', null, global); 18 | goog.exportSymbol('proto.sfu.JoinRequest', null, global); 19 | goog.exportSymbol('proto.sfu.SignalReply', null, global); 20 | goog.exportSymbol('proto.sfu.SignalReply.PayloadCase', null, global); 21 | goog.exportSymbol('proto.sfu.SignalRequest', null, global); 22 | goog.exportSymbol('proto.sfu.SignalRequest.PayloadCase', null, global); 23 | goog.exportSymbol('proto.sfu.Trickle', null, global); 24 | goog.exportSymbol('proto.sfu.Trickle.Target', null, global); 25 | /** 26 | * Generated by JsPbCodeGenerator. 27 | * @param {Array=} opt_data Optional initial data array, typically from a 28 | * server response, or constructed directly in Javascript. The array is used 29 | * in place and becomes part of the constructed object. It is not cloned. 30 | * If no data is provided, the constructed object will be empty, but still 31 | * valid. 32 | * @extends {jspb.Message} 33 | * @constructor 34 | */ 35 | proto.sfu.SignalRequest = function(opt_data) { 36 | jspb.Message.initialize(this, opt_data, 0, -1, null, proto.sfu.SignalRequest.oneofGroups_); 37 | }; 38 | goog.inherits(proto.sfu.SignalRequest, jspb.Message); 39 | if (goog.DEBUG && !COMPILED) { 40 | /** 41 | * @public 42 | * @override 43 | */ 44 | proto.sfu.SignalRequest.displayName = 'proto.sfu.SignalRequest'; 45 | } 46 | /** 47 | * Generated by JsPbCodeGenerator. 48 | * @param {Array=} opt_data Optional initial data array, typically from a 49 | * server response, or constructed directly in Javascript. The array is used 50 | * in place and becomes part of the constructed object. It is not cloned. 51 | * If no data is provided, the constructed object will be empty, but still 52 | * valid. 53 | * @extends {jspb.Message} 54 | * @constructor 55 | */ 56 | proto.sfu.SignalReply = function(opt_data) { 57 | jspb.Message.initialize(this, opt_data, 0, -1, null, proto.sfu.SignalReply.oneofGroups_); 58 | }; 59 | goog.inherits(proto.sfu.SignalReply, jspb.Message); 60 | if (goog.DEBUG && !COMPILED) { 61 | /** 62 | * @public 63 | * @override 64 | */ 65 | proto.sfu.SignalReply.displayName = 'proto.sfu.SignalReply'; 66 | } 67 | /** 68 | * Generated by JsPbCodeGenerator. 69 | * @param {Array=} opt_data Optional initial data array, typically from a 70 | * server response, or constructed directly in Javascript. The array is used 71 | * in place and becomes part of the constructed object. It is not cloned. 72 | * If no data is provided, the constructed object will be empty, but still 73 | * valid. 74 | * @extends {jspb.Message} 75 | * @constructor 76 | */ 77 | proto.sfu.JoinRequest = function(opt_data) { 78 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); 79 | }; 80 | goog.inherits(proto.sfu.JoinRequest, jspb.Message); 81 | if (goog.DEBUG && !COMPILED) { 82 | /** 83 | * @public 84 | * @override 85 | */ 86 | proto.sfu.JoinRequest.displayName = 'proto.sfu.JoinRequest'; 87 | } 88 | /** 89 | * Generated by JsPbCodeGenerator. 90 | * @param {Array=} opt_data Optional initial data array, typically from a 91 | * server response, or constructed directly in Javascript. The array is used 92 | * in place and becomes part of the constructed object. It is not cloned. 93 | * If no data is provided, the constructed object will be empty, but still 94 | * valid. 95 | * @extends {jspb.Message} 96 | * @constructor 97 | */ 98 | proto.sfu.JoinReply = function(opt_data) { 99 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); 100 | }; 101 | goog.inherits(proto.sfu.JoinReply, jspb.Message); 102 | if (goog.DEBUG && !COMPILED) { 103 | /** 104 | * @public 105 | * @override 106 | */ 107 | proto.sfu.JoinReply.displayName = 'proto.sfu.JoinReply'; 108 | } 109 | /** 110 | * Generated by JsPbCodeGenerator. 111 | * @param {Array=} opt_data Optional initial data array, typically from a 112 | * server response, or constructed directly in Javascript. The array is used 113 | * in place and becomes part of the constructed object. It is not cloned. 114 | * If no data is provided, the constructed object will be empty, but still 115 | * valid. 116 | * @extends {jspb.Message} 117 | * @constructor 118 | */ 119 | proto.sfu.Trickle = function(opt_data) { 120 | jspb.Message.initialize(this, opt_data, 0, -1, null, null); 121 | }; 122 | goog.inherits(proto.sfu.Trickle, jspb.Message); 123 | if (goog.DEBUG && !COMPILED) { 124 | /** 125 | * @public 126 | * @override 127 | */ 128 | proto.sfu.Trickle.displayName = 'proto.sfu.Trickle'; 129 | } 130 | 131 | /** 132 | * Oneof group definitions for this message. Each group defines the field 133 | * numbers belonging to that group. When of these fields' value is set, all 134 | * other fields in the group are cleared. During deserialization, if multiple 135 | * fields are encountered for a group, only the last value seen will be kept. 136 | * @private {!Array>} 137 | * @const 138 | */ 139 | proto.sfu.SignalRequest.oneofGroups_ = [[2,3,4]]; 140 | 141 | /** 142 | * @enum {number} 143 | */ 144 | proto.sfu.SignalRequest.PayloadCase = { 145 | PAYLOAD_NOT_SET: 0, 146 | JOIN: 2, 147 | DESCRIPTION: 3, 148 | TRICKLE: 4 149 | }; 150 | 151 | /** 152 | * @return {proto.sfu.SignalRequest.PayloadCase} 153 | */ 154 | proto.sfu.SignalRequest.prototype.getPayloadCase = function() { 155 | return /** @type {proto.sfu.SignalRequest.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.sfu.SignalRequest.oneofGroups_[0])); 156 | }; 157 | 158 | 159 | 160 | if (jspb.Message.GENERATE_TO_OBJECT) { 161 | /** 162 | * Creates an object representation of this proto. 163 | * Field names that are reserved in JavaScript and will be renamed to pb_name. 164 | * Optional fields that are not set will be set to undefined. 165 | * To access a reserved field use, foo.pb_, eg, foo.pb_default. 166 | * For the list of reserved names please see: 167 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. 168 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the 169 | * JSPB instance for transitional soy proto support: 170 | * http://goto/soy-param-migration 171 | * @return {!Object} 172 | */ 173 | proto.sfu.SignalRequest.prototype.toObject = function(opt_includeInstance) { 174 | return proto.sfu.SignalRequest.toObject(opt_includeInstance, this); 175 | }; 176 | 177 | 178 | /** 179 | * Static version of the {@see toObject} method. 180 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include 181 | * the JSPB instance for transitional soy proto support: 182 | * http://goto/soy-param-migration 183 | * @param {!proto.sfu.SignalRequest} msg The msg instance to transform. 184 | * @return {!Object} 185 | * @suppress {unusedLocalVariables} f is only used for nested messages 186 | */ 187 | proto.sfu.SignalRequest.toObject = function(includeInstance, msg) { 188 | var f, obj = { 189 | id: jspb.Message.getFieldWithDefault(msg, 1, ""), 190 | join: (f = msg.getJoin()) && proto.sfu.JoinRequest.toObject(includeInstance, f), 191 | description: msg.getDescription_asB64(), 192 | trickle: (f = msg.getTrickle()) && proto.sfu.Trickle.toObject(includeInstance, f) 193 | }; 194 | 195 | if (includeInstance) { 196 | obj.$jspbMessageInstance = msg; 197 | } 198 | return obj; 199 | }; 200 | } 201 | 202 | 203 | /** 204 | * Deserializes binary data (in protobuf wire format). 205 | * @param {jspb.ByteSource} bytes The bytes to deserialize. 206 | * @return {!proto.sfu.SignalRequest} 207 | */ 208 | proto.sfu.SignalRequest.deserializeBinary = function(bytes) { 209 | var reader = new jspb.BinaryReader(bytes); 210 | var msg = new proto.sfu.SignalRequest; 211 | return proto.sfu.SignalRequest.deserializeBinaryFromReader(msg, reader); 212 | }; 213 | 214 | 215 | /** 216 | * Deserializes binary data (in protobuf wire format) from the 217 | * given reader into the given message object. 218 | * @param {!proto.sfu.SignalRequest} msg The message object to deserialize into. 219 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. 220 | * @return {!proto.sfu.SignalRequest} 221 | */ 222 | proto.sfu.SignalRequest.deserializeBinaryFromReader = function(msg, reader) { 223 | while (reader.nextField()) { 224 | if (reader.isEndGroup()) { 225 | break; 226 | } 227 | var field = reader.getFieldNumber(); 228 | switch (field) { 229 | case 1: 230 | var value = /** @type {string} */ (reader.readString()); 231 | msg.setId(value); 232 | break; 233 | case 2: 234 | var value = new proto.sfu.JoinRequest; 235 | reader.readMessage(value,proto.sfu.JoinRequest.deserializeBinaryFromReader); 236 | msg.setJoin(value); 237 | break; 238 | case 3: 239 | var value = /** @type {!Uint8Array} */ (reader.readBytes()); 240 | msg.setDescription(value); 241 | break; 242 | case 4: 243 | var value = new proto.sfu.Trickle; 244 | reader.readMessage(value,proto.sfu.Trickle.deserializeBinaryFromReader); 245 | msg.setTrickle(value); 246 | break; 247 | default: 248 | reader.skipField(); 249 | break; 250 | } 251 | } 252 | return msg; 253 | }; 254 | 255 | 256 | /** 257 | * Serializes the message to binary data (in protobuf wire format). 258 | * @return {!Uint8Array} 259 | */ 260 | proto.sfu.SignalRequest.prototype.serializeBinary = function() { 261 | var writer = new jspb.BinaryWriter(); 262 | proto.sfu.SignalRequest.serializeBinaryToWriter(this, writer); 263 | return writer.getResultBuffer(); 264 | }; 265 | 266 | 267 | /** 268 | * Serializes the given message to binary data (in protobuf wire 269 | * format), writing to the given BinaryWriter. 270 | * @param {!proto.sfu.SignalRequest} message 271 | * @param {!jspb.BinaryWriter} writer 272 | * @suppress {unusedLocalVariables} f is only used for nested messages 273 | */ 274 | proto.sfu.SignalRequest.serializeBinaryToWriter = function(message, writer) { 275 | var f = undefined; 276 | f = message.getId(); 277 | if (f.length > 0) { 278 | writer.writeString( 279 | 1, 280 | f 281 | ); 282 | } 283 | f = message.getJoin(); 284 | if (f != null) { 285 | writer.writeMessage( 286 | 2, 287 | f, 288 | proto.sfu.JoinRequest.serializeBinaryToWriter 289 | ); 290 | } 291 | f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); 292 | if (f != null) { 293 | writer.writeBytes( 294 | 3, 295 | f 296 | ); 297 | } 298 | f = message.getTrickle(); 299 | if (f != null) { 300 | writer.writeMessage( 301 | 4, 302 | f, 303 | proto.sfu.Trickle.serializeBinaryToWriter 304 | ); 305 | } 306 | }; 307 | 308 | 309 | /** 310 | * optional string id = 1; 311 | * @return {string} 312 | */ 313 | proto.sfu.SignalRequest.prototype.getId = function() { 314 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 315 | }; 316 | 317 | 318 | /** 319 | * @param {string} value 320 | * @return {!proto.sfu.SignalRequest} returns this 321 | */ 322 | proto.sfu.SignalRequest.prototype.setId = function(value) { 323 | return jspb.Message.setProto3StringField(this, 1, value); 324 | }; 325 | 326 | 327 | /** 328 | * optional JoinRequest join = 2; 329 | * @return {?proto.sfu.JoinRequest} 330 | */ 331 | proto.sfu.SignalRequest.prototype.getJoin = function() { 332 | return /** @type{?proto.sfu.JoinRequest} */ ( 333 | jspb.Message.getWrapperField(this, proto.sfu.JoinRequest, 2)); 334 | }; 335 | 336 | 337 | /** 338 | * @param {?proto.sfu.JoinRequest|undefined} value 339 | * @return {!proto.sfu.SignalRequest} returns this 340 | */ 341 | proto.sfu.SignalRequest.prototype.setJoin = function(value) { 342 | return jspb.Message.setOneofWrapperField(this, 2, proto.sfu.SignalRequest.oneofGroups_[0], value); 343 | }; 344 | 345 | 346 | /** 347 | * Clears the message field making it undefined. 348 | * @return {!proto.sfu.SignalRequest} returns this 349 | */ 350 | proto.sfu.SignalRequest.prototype.clearJoin = function() { 351 | return this.setJoin(undefined); 352 | }; 353 | 354 | 355 | /** 356 | * Returns whether this field is set. 357 | * @return {boolean} 358 | */ 359 | proto.sfu.SignalRequest.prototype.hasJoin = function() { 360 | return jspb.Message.getField(this, 2) != null; 361 | }; 362 | 363 | 364 | /** 365 | * optional bytes description = 3; 366 | * @return {!(string|Uint8Array)} 367 | */ 368 | proto.sfu.SignalRequest.prototype.getDescription = function() { 369 | return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); 370 | }; 371 | 372 | 373 | /** 374 | * optional bytes description = 3; 375 | * This is a type-conversion wrapper around `getDescription()` 376 | * @return {string} 377 | */ 378 | proto.sfu.SignalRequest.prototype.getDescription_asB64 = function() { 379 | return /** @type {string} */ (jspb.Message.bytesAsB64( 380 | this.getDescription())); 381 | }; 382 | 383 | 384 | /** 385 | * optional bytes description = 3; 386 | * Note that Uint8Array is not supported on all browsers. 387 | * @see http://caniuse.com/Uint8Array 388 | * This is a type-conversion wrapper around `getDescription()` 389 | * @return {!Uint8Array} 390 | */ 391 | proto.sfu.SignalRequest.prototype.getDescription_asU8 = function() { 392 | return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( 393 | this.getDescription())); 394 | }; 395 | 396 | 397 | /** 398 | * @param {!(string|Uint8Array)} value 399 | * @return {!proto.sfu.SignalRequest} returns this 400 | */ 401 | proto.sfu.SignalRequest.prototype.setDescription = function(value) { 402 | return jspb.Message.setOneofField(this, 3, proto.sfu.SignalRequest.oneofGroups_[0], value); 403 | }; 404 | 405 | 406 | /** 407 | * Clears the field making it undefined. 408 | * @return {!proto.sfu.SignalRequest} returns this 409 | */ 410 | proto.sfu.SignalRequest.prototype.clearDescription = function() { 411 | return jspb.Message.setOneofField(this, 3, proto.sfu.SignalRequest.oneofGroups_[0], undefined); 412 | }; 413 | 414 | 415 | /** 416 | * Returns whether this field is set. 417 | * @return {boolean} 418 | */ 419 | proto.sfu.SignalRequest.prototype.hasDescription = function() { 420 | return jspb.Message.getField(this, 3) != null; 421 | }; 422 | 423 | 424 | /** 425 | * optional Trickle trickle = 4; 426 | * @return {?proto.sfu.Trickle} 427 | */ 428 | proto.sfu.SignalRequest.prototype.getTrickle = function() { 429 | return /** @type{?proto.sfu.Trickle} */ ( 430 | jspb.Message.getWrapperField(this, proto.sfu.Trickle, 4)); 431 | }; 432 | 433 | 434 | /** 435 | * @param {?proto.sfu.Trickle|undefined} value 436 | * @return {!proto.sfu.SignalRequest} returns this 437 | */ 438 | proto.sfu.SignalRequest.prototype.setTrickle = function(value) { 439 | return jspb.Message.setOneofWrapperField(this, 4, proto.sfu.SignalRequest.oneofGroups_[0], value); 440 | }; 441 | 442 | 443 | /** 444 | * Clears the message field making it undefined. 445 | * @return {!proto.sfu.SignalRequest} returns this 446 | */ 447 | proto.sfu.SignalRequest.prototype.clearTrickle = function() { 448 | return this.setTrickle(undefined); 449 | }; 450 | 451 | 452 | /** 453 | * Returns whether this field is set. 454 | * @return {boolean} 455 | */ 456 | proto.sfu.SignalRequest.prototype.hasTrickle = function() { 457 | return jspb.Message.getField(this, 4) != null; 458 | }; 459 | 460 | 461 | 462 | /** 463 | * Oneof group definitions for this message. Each group defines the field 464 | * numbers belonging to that group. When of these fields' value is set, all 465 | * other fields in the group are cleared. During deserialization, if multiple 466 | * fields are encountered for a group, only the last value seen will be kept. 467 | * @private {!Array>} 468 | * @const 469 | */ 470 | proto.sfu.SignalReply.oneofGroups_ = [[2,3,4,5,6]]; 471 | 472 | /** 473 | * @enum {number} 474 | */ 475 | proto.sfu.SignalReply.PayloadCase = { 476 | PAYLOAD_NOT_SET: 0, 477 | JOIN: 2, 478 | DESCRIPTION: 3, 479 | TRICKLE: 4, 480 | ICECONNECTIONSTATE: 5, 481 | ERROR: 6 482 | }; 483 | 484 | /** 485 | * @return {proto.sfu.SignalReply.PayloadCase} 486 | */ 487 | proto.sfu.SignalReply.prototype.getPayloadCase = function() { 488 | return /** @type {proto.sfu.SignalReply.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.sfu.SignalReply.oneofGroups_[0])); 489 | }; 490 | 491 | 492 | 493 | if (jspb.Message.GENERATE_TO_OBJECT) { 494 | /** 495 | * Creates an object representation of this proto. 496 | * Field names that are reserved in JavaScript and will be renamed to pb_name. 497 | * Optional fields that are not set will be set to undefined. 498 | * To access a reserved field use, foo.pb_, eg, foo.pb_default. 499 | * For the list of reserved names please see: 500 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. 501 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the 502 | * JSPB instance for transitional soy proto support: 503 | * http://goto/soy-param-migration 504 | * @return {!Object} 505 | */ 506 | proto.sfu.SignalReply.prototype.toObject = function(opt_includeInstance) { 507 | return proto.sfu.SignalReply.toObject(opt_includeInstance, this); 508 | }; 509 | 510 | 511 | /** 512 | * Static version of the {@see toObject} method. 513 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include 514 | * the JSPB instance for transitional soy proto support: 515 | * http://goto/soy-param-migration 516 | * @param {!proto.sfu.SignalReply} msg The msg instance to transform. 517 | * @return {!Object} 518 | * @suppress {unusedLocalVariables} f is only used for nested messages 519 | */ 520 | proto.sfu.SignalReply.toObject = function(includeInstance, msg) { 521 | var f, obj = { 522 | id: jspb.Message.getFieldWithDefault(msg, 1, ""), 523 | join: (f = msg.getJoin()) && proto.sfu.JoinReply.toObject(includeInstance, f), 524 | description: msg.getDescription_asB64(), 525 | trickle: (f = msg.getTrickle()) && proto.sfu.Trickle.toObject(includeInstance, f), 526 | iceconnectionstate: jspb.Message.getFieldWithDefault(msg, 5, ""), 527 | error: jspb.Message.getFieldWithDefault(msg, 6, "") 528 | }; 529 | 530 | if (includeInstance) { 531 | obj.$jspbMessageInstance = msg; 532 | } 533 | return obj; 534 | }; 535 | } 536 | 537 | 538 | /** 539 | * Deserializes binary data (in protobuf wire format). 540 | * @param {jspb.ByteSource} bytes The bytes to deserialize. 541 | * @return {!proto.sfu.SignalReply} 542 | */ 543 | proto.sfu.SignalReply.deserializeBinary = function(bytes) { 544 | var reader = new jspb.BinaryReader(bytes); 545 | var msg = new proto.sfu.SignalReply; 546 | return proto.sfu.SignalReply.deserializeBinaryFromReader(msg, reader); 547 | }; 548 | 549 | 550 | /** 551 | * Deserializes binary data (in protobuf wire format) from the 552 | * given reader into the given message object. 553 | * @param {!proto.sfu.SignalReply} msg The message object to deserialize into. 554 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. 555 | * @return {!proto.sfu.SignalReply} 556 | */ 557 | proto.sfu.SignalReply.deserializeBinaryFromReader = function(msg, reader) { 558 | while (reader.nextField()) { 559 | if (reader.isEndGroup()) { 560 | break; 561 | } 562 | var field = reader.getFieldNumber(); 563 | switch (field) { 564 | case 1: 565 | var value = /** @type {string} */ (reader.readString()); 566 | msg.setId(value); 567 | break; 568 | case 2: 569 | var value = new proto.sfu.JoinReply; 570 | reader.readMessage(value,proto.sfu.JoinReply.deserializeBinaryFromReader); 571 | msg.setJoin(value); 572 | break; 573 | case 3: 574 | var value = /** @type {!Uint8Array} */ (reader.readBytes()); 575 | msg.setDescription(value); 576 | break; 577 | case 4: 578 | var value = new proto.sfu.Trickle; 579 | reader.readMessage(value,proto.sfu.Trickle.deserializeBinaryFromReader); 580 | msg.setTrickle(value); 581 | break; 582 | case 5: 583 | var value = /** @type {string} */ (reader.readString()); 584 | msg.setIceconnectionstate(value); 585 | break; 586 | case 6: 587 | var value = /** @type {string} */ (reader.readString()); 588 | msg.setError(value); 589 | break; 590 | default: 591 | reader.skipField(); 592 | break; 593 | } 594 | } 595 | return msg; 596 | }; 597 | 598 | 599 | /** 600 | * Serializes the message to binary data (in protobuf wire format). 601 | * @return {!Uint8Array} 602 | */ 603 | proto.sfu.SignalReply.prototype.serializeBinary = function() { 604 | var writer = new jspb.BinaryWriter(); 605 | proto.sfu.SignalReply.serializeBinaryToWriter(this, writer); 606 | return writer.getResultBuffer(); 607 | }; 608 | 609 | 610 | /** 611 | * Serializes the given message to binary data (in protobuf wire 612 | * format), writing to the given BinaryWriter. 613 | * @param {!proto.sfu.SignalReply} message 614 | * @param {!jspb.BinaryWriter} writer 615 | * @suppress {unusedLocalVariables} f is only used for nested messages 616 | */ 617 | proto.sfu.SignalReply.serializeBinaryToWriter = function(message, writer) { 618 | var f = undefined; 619 | f = message.getId(); 620 | if (f.length > 0) { 621 | writer.writeString( 622 | 1, 623 | f 624 | ); 625 | } 626 | f = message.getJoin(); 627 | if (f != null) { 628 | writer.writeMessage( 629 | 2, 630 | f, 631 | proto.sfu.JoinReply.serializeBinaryToWriter 632 | ); 633 | } 634 | f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); 635 | if (f != null) { 636 | writer.writeBytes( 637 | 3, 638 | f 639 | ); 640 | } 641 | f = message.getTrickle(); 642 | if (f != null) { 643 | writer.writeMessage( 644 | 4, 645 | f, 646 | proto.sfu.Trickle.serializeBinaryToWriter 647 | ); 648 | } 649 | f = /** @type {string} */ (jspb.Message.getField(message, 5)); 650 | if (f != null) { 651 | writer.writeString( 652 | 5, 653 | f 654 | ); 655 | } 656 | f = /** @type {string} */ (jspb.Message.getField(message, 6)); 657 | if (f != null) { 658 | writer.writeString( 659 | 6, 660 | f 661 | ); 662 | } 663 | }; 664 | 665 | 666 | /** 667 | * optional string id = 1; 668 | * @return {string} 669 | */ 670 | proto.sfu.SignalReply.prototype.getId = function() { 671 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 672 | }; 673 | 674 | 675 | /** 676 | * @param {string} value 677 | * @return {!proto.sfu.SignalReply} returns this 678 | */ 679 | proto.sfu.SignalReply.prototype.setId = function(value) { 680 | return jspb.Message.setProto3StringField(this, 1, value); 681 | }; 682 | 683 | 684 | /** 685 | * optional JoinReply join = 2; 686 | * @return {?proto.sfu.JoinReply} 687 | */ 688 | proto.sfu.SignalReply.prototype.getJoin = function() { 689 | return /** @type{?proto.sfu.JoinReply} */ ( 690 | jspb.Message.getWrapperField(this, proto.sfu.JoinReply, 2)); 691 | }; 692 | 693 | 694 | /** 695 | * @param {?proto.sfu.JoinReply|undefined} value 696 | * @return {!proto.sfu.SignalReply} returns this 697 | */ 698 | proto.sfu.SignalReply.prototype.setJoin = function(value) { 699 | return jspb.Message.setOneofWrapperField(this, 2, proto.sfu.SignalReply.oneofGroups_[0], value); 700 | }; 701 | 702 | 703 | /** 704 | * Clears the message field making it undefined. 705 | * @return {!proto.sfu.SignalReply} returns this 706 | */ 707 | proto.sfu.SignalReply.prototype.clearJoin = function() { 708 | return this.setJoin(undefined); 709 | }; 710 | 711 | 712 | /** 713 | * Returns whether this field is set. 714 | * @return {boolean} 715 | */ 716 | proto.sfu.SignalReply.prototype.hasJoin = function() { 717 | return jspb.Message.getField(this, 2) != null; 718 | }; 719 | 720 | 721 | /** 722 | * optional bytes description = 3; 723 | * @return {!(string|Uint8Array)} 724 | */ 725 | proto.sfu.SignalReply.prototype.getDescription = function() { 726 | return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); 727 | }; 728 | 729 | 730 | /** 731 | * optional bytes description = 3; 732 | * This is a type-conversion wrapper around `getDescription()` 733 | * @return {string} 734 | */ 735 | proto.sfu.SignalReply.prototype.getDescription_asB64 = function() { 736 | return /** @type {string} */ (jspb.Message.bytesAsB64( 737 | this.getDescription())); 738 | }; 739 | 740 | 741 | /** 742 | * optional bytes description = 3; 743 | * Note that Uint8Array is not supported on all browsers. 744 | * @see http://caniuse.com/Uint8Array 745 | * This is a type-conversion wrapper around `getDescription()` 746 | * @return {!Uint8Array} 747 | */ 748 | proto.sfu.SignalReply.prototype.getDescription_asU8 = function() { 749 | return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( 750 | this.getDescription())); 751 | }; 752 | 753 | 754 | /** 755 | * @param {!(string|Uint8Array)} value 756 | * @return {!proto.sfu.SignalReply} returns this 757 | */ 758 | proto.sfu.SignalReply.prototype.setDescription = function(value) { 759 | return jspb.Message.setOneofField(this, 3, proto.sfu.SignalReply.oneofGroups_[0], value); 760 | }; 761 | 762 | 763 | /** 764 | * Clears the field making it undefined. 765 | * @return {!proto.sfu.SignalReply} returns this 766 | */ 767 | proto.sfu.SignalReply.prototype.clearDescription = function() { 768 | return jspb.Message.setOneofField(this, 3, proto.sfu.SignalReply.oneofGroups_[0], undefined); 769 | }; 770 | 771 | 772 | /** 773 | * Returns whether this field is set. 774 | * @return {boolean} 775 | */ 776 | proto.sfu.SignalReply.prototype.hasDescription = function() { 777 | return jspb.Message.getField(this, 3) != null; 778 | }; 779 | 780 | 781 | /** 782 | * optional Trickle trickle = 4; 783 | * @return {?proto.sfu.Trickle} 784 | */ 785 | proto.sfu.SignalReply.prototype.getTrickle = function() { 786 | return /** @type{?proto.sfu.Trickle} */ ( 787 | jspb.Message.getWrapperField(this, proto.sfu.Trickle, 4)); 788 | }; 789 | 790 | 791 | /** 792 | * @param {?proto.sfu.Trickle|undefined} value 793 | * @return {!proto.sfu.SignalReply} returns this 794 | */ 795 | proto.sfu.SignalReply.prototype.setTrickle = function(value) { 796 | return jspb.Message.setOneofWrapperField(this, 4, proto.sfu.SignalReply.oneofGroups_[0], value); 797 | }; 798 | 799 | 800 | /** 801 | * Clears the message field making it undefined. 802 | * @return {!proto.sfu.SignalReply} returns this 803 | */ 804 | proto.sfu.SignalReply.prototype.clearTrickle = function() { 805 | return this.setTrickle(undefined); 806 | }; 807 | 808 | 809 | /** 810 | * Returns whether this field is set. 811 | * @return {boolean} 812 | */ 813 | proto.sfu.SignalReply.prototype.hasTrickle = function() { 814 | return jspb.Message.getField(this, 4) != null; 815 | }; 816 | 817 | 818 | /** 819 | * optional string iceConnectionState = 5; 820 | * @return {string} 821 | */ 822 | proto.sfu.SignalReply.prototype.getIceconnectionstate = function() { 823 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); 824 | }; 825 | 826 | 827 | /** 828 | * @param {string} value 829 | * @return {!proto.sfu.SignalReply} returns this 830 | */ 831 | proto.sfu.SignalReply.prototype.setIceconnectionstate = function(value) { 832 | return jspb.Message.setOneofField(this, 5, proto.sfu.SignalReply.oneofGroups_[0], value); 833 | }; 834 | 835 | 836 | /** 837 | * Clears the field making it undefined. 838 | * @return {!proto.sfu.SignalReply} returns this 839 | */ 840 | proto.sfu.SignalReply.prototype.clearIceconnectionstate = function() { 841 | return jspb.Message.setOneofField(this, 5, proto.sfu.SignalReply.oneofGroups_[0], undefined); 842 | }; 843 | 844 | 845 | /** 846 | * Returns whether this field is set. 847 | * @return {boolean} 848 | */ 849 | proto.sfu.SignalReply.prototype.hasIceconnectionstate = function() { 850 | return jspb.Message.getField(this, 5) != null; 851 | }; 852 | 853 | 854 | /** 855 | * optional string error = 6; 856 | * @return {string} 857 | */ 858 | proto.sfu.SignalReply.prototype.getError = function() { 859 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); 860 | }; 861 | 862 | 863 | /** 864 | * @param {string} value 865 | * @return {!proto.sfu.SignalReply} returns this 866 | */ 867 | proto.sfu.SignalReply.prototype.setError = function(value) { 868 | return jspb.Message.setOneofField(this, 6, proto.sfu.SignalReply.oneofGroups_[0], value); 869 | }; 870 | 871 | 872 | /** 873 | * Clears the field making it undefined. 874 | * @return {!proto.sfu.SignalReply} returns this 875 | */ 876 | proto.sfu.SignalReply.prototype.clearError = function() { 877 | return jspb.Message.setOneofField(this, 6, proto.sfu.SignalReply.oneofGroups_[0], undefined); 878 | }; 879 | 880 | 881 | /** 882 | * Returns whether this field is set. 883 | * @return {boolean} 884 | */ 885 | proto.sfu.SignalReply.prototype.hasError = function() { 886 | return jspb.Message.getField(this, 6) != null; 887 | }; 888 | 889 | 890 | 891 | 892 | 893 | if (jspb.Message.GENERATE_TO_OBJECT) { 894 | /** 895 | * Creates an object representation of this proto. 896 | * Field names that are reserved in JavaScript and will be renamed to pb_name. 897 | * Optional fields that are not set will be set to undefined. 898 | * To access a reserved field use, foo.pb_, eg, foo.pb_default. 899 | * For the list of reserved names please see: 900 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. 901 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the 902 | * JSPB instance for transitional soy proto support: 903 | * http://goto/soy-param-migration 904 | * @return {!Object} 905 | */ 906 | proto.sfu.JoinRequest.prototype.toObject = function(opt_includeInstance) { 907 | return proto.sfu.JoinRequest.toObject(opt_includeInstance, this); 908 | }; 909 | 910 | 911 | /** 912 | * Static version of the {@see toObject} method. 913 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include 914 | * the JSPB instance for transitional soy proto support: 915 | * http://goto/soy-param-migration 916 | * @param {!proto.sfu.JoinRequest} msg The msg instance to transform. 917 | * @return {!Object} 918 | * @suppress {unusedLocalVariables} f is only used for nested messages 919 | */ 920 | proto.sfu.JoinRequest.toObject = function(includeInstance, msg) { 921 | var f, obj = { 922 | sid: jspb.Message.getFieldWithDefault(msg, 1, ""), 923 | description: msg.getDescription_asB64() 924 | }; 925 | 926 | if (includeInstance) { 927 | obj.$jspbMessageInstance = msg; 928 | } 929 | return obj; 930 | }; 931 | } 932 | 933 | 934 | /** 935 | * Deserializes binary data (in protobuf wire format). 936 | * @param {jspb.ByteSource} bytes The bytes to deserialize. 937 | * @return {!proto.sfu.JoinRequest} 938 | */ 939 | proto.sfu.JoinRequest.deserializeBinary = function(bytes) { 940 | var reader = new jspb.BinaryReader(bytes); 941 | var msg = new proto.sfu.JoinRequest; 942 | return proto.sfu.JoinRequest.deserializeBinaryFromReader(msg, reader); 943 | }; 944 | 945 | 946 | /** 947 | * Deserializes binary data (in protobuf wire format) from the 948 | * given reader into the given message object. 949 | * @param {!proto.sfu.JoinRequest} msg The message object to deserialize into. 950 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. 951 | * @return {!proto.sfu.JoinRequest} 952 | */ 953 | proto.sfu.JoinRequest.deserializeBinaryFromReader = function(msg, reader) { 954 | while (reader.nextField()) { 955 | if (reader.isEndGroup()) { 956 | break; 957 | } 958 | var field = reader.getFieldNumber(); 959 | switch (field) { 960 | case 1: 961 | var value = /** @type {string} */ (reader.readString()); 962 | msg.setSid(value); 963 | break; 964 | case 2: 965 | var value = /** @type {!Uint8Array} */ (reader.readBytes()); 966 | msg.setDescription(value); 967 | break; 968 | default: 969 | reader.skipField(); 970 | break; 971 | } 972 | } 973 | return msg; 974 | }; 975 | 976 | 977 | /** 978 | * Serializes the message to binary data (in protobuf wire format). 979 | * @return {!Uint8Array} 980 | */ 981 | proto.sfu.JoinRequest.prototype.serializeBinary = function() { 982 | var writer = new jspb.BinaryWriter(); 983 | proto.sfu.JoinRequest.serializeBinaryToWriter(this, writer); 984 | return writer.getResultBuffer(); 985 | }; 986 | 987 | 988 | /** 989 | * Serializes the given message to binary data (in protobuf wire 990 | * format), writing to the given BinaryWriter. 991 | * @param {!proto.sfu.JoinRequest} message 992 | * @param {!jspb.BinaryWriter} writer 993 | * @suppress {unusedLocalVariables} f is only used for nested messages 994 | */ 995 | proto.sfu.JoinRequest.serializeBinaryToWriter = function(message, writer) { 996 | var f = undefined; 997 | f = message.getSid(); 998 | if (f.length > 0) { 999 | writer.writeString( 1000 | 1, 1001 | f 1002 | ); 1003 | } 1004 | f = message.getDescription_asU8(); 1005 | if (f.length > 0) { 1006 | writer.writeBytes( 1007 | 2, 1008 | f 1009 | ); 1010 | } 1011 | }; 1012 | 1013 | 1014 | /** 1015 | * optional string sid = 1; 1016 | * @return {string} 1017 | */ 1018 | proto.sfu.JoinRequest.prototype.getSid = function() { 1019 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 1020 | }; 1021 | 1022 | 1023 | /** 1024 | * @param {string} value 1025 | * @return {!proto.sfu.JoinRequest} returns this 1026 | */ 1027 | proto.sfu.JoinRequest.prototype.setSid = function(value) { 1028 | return jspb.Message.setProto3StringField(this, 1, value); 1029 | }; 1030 | 1031 | 1032 | /** 1033 | * optional bytes description = 2; 1034 | * @return {!(string|Uint8Array)} 1035 | */ 1036 | proto.sfu.JoinRequest.prototype.getDescription = function() { 1037 | return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); 1038 | }; 1039 | 1040 | 1041 | /** 1042 | * optional bytes description = 2; 1043 | * This is a type-conversion wrapper around `getDescription()` 1044 | * @return {string} 1045 | */ 1046 | proto.sfu.JoinRequest.prototype.getDescription_asB64 = function() { 1047 | return /** @type {string} */ (jspb.Message.bytesAsB64( 1048 | this.getDescription())); 1049 | }; 1050 | 1051 | 1052 | /** 1053 | * optional bytes description = 2; 1054 | * Note that Uint8Array is not supported on all browsers. 1055 | * @see http://caniuse.com/Uint8Array 1056 | * This is a type-conversion wrapper around `getDescription()` 1057 | * @return {!Uint8Array} 1058 | */ 1059 | proto.sfu.JoinRequest.prototype.getDescription_asU8 = function() { 1060 | return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( 1061 | this.getDescription())); 1062 | }; 1063 | 1064 | 1065 | /** 1066 | * @param {!(string|Uint8Array)} value 1067 | * @return {!proto.sfu.JoinRequest} returns this 1068 | */ 1069 | proto.sfu.JoinRequest.prototype.setDescription = function(value) { 1070 | return jspb.Message.setProto3BytesField(this, 2, value); 1071 | }; 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | if (jspb.Message.GENERATE_TO_OBJECT) { 1078 | /** 1079 | * Creates an object representation of this proto. 1080 | * Field names that are reserved in JavaScript and will be renamed to pb_name. 1081 | * Optional fields that are not set will be set to undefined. 1082 | * To access a reserved field use, foo.pb_, eg, foo.pb_default. 1083 | * For the list of reserved names please see: 1084 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. 1085 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the 1086 | * JSPB instance for transitional soy proto support: 1087 | * http://goto/soy-param-migration 1088 | * @return {!Object} 1089 | */ 1090 | proto.sfu.JoinReply.prototype.toObject = function(opt_includeInstance) { 1091 | return proto.sfu.JoinReply.toObject(opt_includeInstance, this); 1092 | }; 1093 | 1094 | 1095 | /** 1096 | * Static version of the {@see toObject} method. 1097 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include 1098 | * the JSPB instance for transitional soy proto support: 1099 | * http://goto/soy-param-migration 1100 | * @param {!proto.sfu.JoinReply} msg The msg instance to transform. 1101 | * @return {!Object} 1102 | * @suppress {unusedLocalVariables} f is only used for nested messages 1103 | */ 1104 | proto.sfu.JoinReply.toObject = function(includeInstance, msg) { 1105 | var f, obj = { 1106 | description: msg.getDescription_asB64() 1107 | }; 1108 | 1109 | if (includeInstance) { 1110 | obj.$jspbMessageInstance = msg; 1111 | } 1112 | return obj; 1113 | }; 1114 | } 1115 | 1116 | 1117 | /** 1118 | * Deserializes binary data (in protobuf wire format). 1119 | * @param {jspb.ByteSource} bytes The bytes to deserialize. 1120 | * @return {!proto.sfu.JoinReply} 1121 | */ 1122 | proto.sfu.JoinReply.deserializeBinary = function(bytes) { 1123 | var reader = new jspb.BinaryReader(bytes); 1124 | var msg = new proto.sfu.JoinReply; 1125 | return proto.sfu.JoinReply.deserializeBinaryFromReader(msg, reader); 1126 | }; 1127 | 1128 | 1129 | /** 1130 | * Deserializes binary data (in protobuf wire format) from the 1131 | * given reader into the given message object. 1132 | * @param {!proto.sfu.JoinReply} msg The message object to deserialize into. 1133 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. 1134 | * @return {!proto.sfu.JoinReply} 1135 | */ 1136 | proto.sfu.JoinReply.deserializeBinaryFromReader = function(msg, reader) { 1137 | while (reader.nextField()) { 1138 | if (reader.isEndGroup()) { 1139 | break; 1140 | } 1141 | var field = reader.getFieldNumber(); 1142 | switch (field) { 1143 | case 1: 1144 | var value = /** @type {!Uint8Array} */ (reader.readBytes()); 1145 | msg.setDescription(value); 1146 | break; 1147 | default: 1148 | reader.skipField(); 1149 | break; 1150 | } 1151 | } 1152 | return msg; 1153 | }; 1154 | 1155 | 1156 | /** 1157 | * Serializes the message to binary data (in protobuf wire format). 1158 | * @return {!Uint8Array} 1159 | */ 1160 | proto.sfu.JoinReply.prototype.serializeBinary = function() { 1161 | var writer = new jspb.BinaryWriter(); 1162 | proto.sfu.JoinReply.serializeBinaryToWriter(this, writer); 1163 | return writer.getResultBuffer(); 1164 | }; 1165 | 1166 | 1167 | /** 1168 | * Serializes the given message to binary data (in protobuf wire 1169 | * format), writing to the given BinaryWriter. 1170 | * @param {!proto.sfu.JoinReply} message 1171 | * @param {!jspb.BinaryWriter} writer 1172 | * @suppress {unusedLocalVariables} f is only used for nested messages 1173 | */ 1174 | proto.sfu.JoinReply.serializeBinaryToWriter = function(message, writer) { 1175 | var f = undefined; 1176 | f = message.getDescription_asU8(); 1177 | if (f.length > 0) { 1178 | writer.writeBytes( 1179 | 1, 1180 | f 1181 | ); 1182 | } 1183 | }; 1184 | 1185 | 1186 | /** 1187 | * optional bytes description = 1; 1188 | * @return {!(string|Uint8Array)} 1189 | */ 1190 | proto.sfu.JoinReply.prototype.getDescription = function() { 1191 | return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 1192 | }; 1193 | 1194 | 1195 | /** 1196 | * optional bytes description = 1; 1197 | * This is a type-conversion wrapper around `getDescription()` 1198 | * @return {string} 1199 | */ 1200 | proto.sfu.JoinReply.prototype.getDescription_asB64 = function() { 1201 | return /** @type {string} */ (jspb.Message.bytesAsB64( 1202 | this.getDescription())); 1203 | }; 1204 | 1205 | 1206 | /** 1207 | * optional bytes description = 1; 1208 | * Note that Uint8Array is not supported on all browsers. 1209 | * @see http://caniuse.com/Uint8Array 1210 | * This is a type-conversion wrapper around `getDescription()` 1211 | * @return {!Uint8Array} 1212 | */ 1213 | proto.sfu.JoinReply.prototype.getDescription_asU8 = function() { 1214 | return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( 1215 | this.getDescription())); 1216 | }; 1217 | 1218 | 1219 | /** 1220 | * @param {!(string|Uint8Array)} value 1221 | * @return {!proto.sfu.JoinReply} returns this 1222 | */ 1223 | proto.sfu.JoinReply.prototype.setDescription = function(value) { 1224 | return jspb.Message.setProto3BytesField(this, 1, value); 1225 | }; 1226 | 1227 | 1228 | 1229 | 1230 | 1231 | if (jspb.Message.GENERATE_TO_OBJECT) { 1232 | /** 1233 | * Creates an object representation of this proto. 1234 | * Field names that are reserved in JavaScript and will be renamed to pb_name. 1235 | * Optional fields that are not set will be set to undefined. 1236 | * To access a reserved field use, foo.pb_, eg, foo.pb_default. 1237 | * For the list of reserved names please see: 1238 | * net/proto2/compiler/js/internal/generator.cc#kKeyword. 1239 | * @param {boolean=} opt_includeInstance Deprecated. whether to include the 1240 | * JSPB instance for transitional soy proto support: 1241 | * http://goto/soy-param-migration 1242 | * @return {!Object} 1243 | */ 1244 | proto.sfu.Trickle.prototype.toObject = function(opt_includeInstance) { 1245 | return proto.sfu.Trickle.toObject(opt_includeInstance, this); 1246 | }; 1247 | 1248 | 1249 | /** 1250 | * Static version of the {@see toObject} method. 1251 | * @param {boolean|undefined} includeInstance Deprecated. Whether to include 1252 | * the JSPB instance for transitional soy proto support: 1253 | * http://goto/soy-param-migration 1254 | * @param {!proto.sfu.Trickle} msg The msg instance to transform. 1255 | * @return {!Object} 1256 | * @suppress {unusedLocalVariables} f is only used for nested messages 1257 | */ 1258 | proto.sfu.Trickle.toObject = function(includeInstance, msg) { 1259 | var f, obj = { 1260 | target: jspb.Message.getFieldWithDefault(msg, 1, 0), 1261 | init: jspb.Message.getFieldWithDefault(msg, 2, "") 1262 | }; 1263 | 1264 | if (includeInstance) { 1265 | obj.$jspbMessageInstance = msg; 1266 | } 1267 | return obj; 1268 | }; 1269 | } 1270 | 1271 | 1272 | /** 1273 | * Deserializes binary data (in protobuf wire format). 1274 | * @param {jspb.ByteSource} bytes The bytes to deserialize. 1275 | * @return {!proto.sfu.Trickle} 1276 | */ 1277 | proto.sfu.Trickle.deserializeBinary = function(bytes) { 1278 | var reader = new jspb.BinaryReader(bytes); 1279 | var msg = new proto.sfu.Trickle; 1280 | return proto.sfu.Trickle.deserializeBinaryFromReader(msg, reader); 1281 | }; 1282 | 1283 | 1284 | /** 1285 | * Deserializes binary data (in protobuf wire format) from the 1286 | * given reader into the given message object. 1287 | * @param {!proto.sfu.Trickle} msg The message object to deserialize into. 1288 | * @param {!jspb.BinaryReader} reader The BinaryReader to use. 1289 | * @return {!proto.sfu.Trickle} 1290 | */ 1291 | proto.sfu.Trickle.deserializeBinaryFromReader = function(msg, reader) { 1292 | while (reader.nextField()) { 1293 | if (reader.isEndGroup()) { 1294 | break; 1295 | } 1296 | var field = reader.getFieldNumber(); 1297 | switch (field) { 1298 | case 1: 1299 | var value = /** @type {!proto.sfu.Trickle.Target} */ (reader.readEnum()); 1300 | msg.setTarget(value); 1301 | break; 1302 | case 2: 1303 | var value = /** @type {string} */ (reader.readString()); 1304 | msg.setInit(value); 1305 | break; 1306 | default: 1307 | reader.skipField(); 1308 | break; 1309 | } 1310 | } 1311 | return msg; 1312 | }; 1313 | 1314 | 1315 | /** 1316 | * Serializes the message to binary data (in protobuf wire format). 1317 | * @return {!Uint8Array} 1318 | */ 1319 | proto.sfu.Trickle.prototype.serializeBinary = function() { 1320 | var writer = new jspb.BinaryWriter(); 1321 | proto.sfu.Trickle.serializeBinaryToWriter(this, writer); 1322 | return writer.getResultBuffer(); 1323 | }; 1324 | 1325 | 1326 | /** 1327 | * Serializes the given message to binary data (in protobuf wire 1328 | * format), writing to the given BinaryWriter. 1329 | * @param {!proto.sfu.Trickle} message 1330 | * @param {!jspb.BinaryWriter} writer 1331 | * @suppress {unusedLocalVariables} f is only used for nested messages 1332 | */ 1333 | proto.sfu.Trickle.serializeBinaryToWriter = function(message, writer) { 1334 | var f = undefined; 1335 | f = message.getTarget(); 1336 | if (f !== 0.0) { 1337 | writer.writeEnum( 1338 | 1, 1339 | f 1340 | ); 1341 | } 1342 | f = message.getInit(); 1343 | if (f.length > 0) { 1344 | writer.writeString( 1345 | 2, 1346 | f 1347 | ); 1348 | } 1349 | }; 1350 | 1351 | 1352 | /** 1353 | * @enum {number} 1354 | */ 1355 | proto.sfu.Trickle.Target = { 1356 | PUBLISHER: 0, 1357 | SUBSCRIBER: 1 1358 | }; 1359 | 1360 | /** 1361 | * optional Target target = 1; 1362 | * @return {!proto.sfu.Trickle.Target} 1363 | */ 1364 | proto.sfu.Trickle.prototype.getTarget = function() { 1365 | return /** @type {!proto.sfu.Trickle.Target} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); 1366 | }; 1367 | 1368 | 1369 | /** 1370 | * @param {!proto.sfu.Trickle.Target} value 1371 | * @return {!proto.sfu.Trickle} returns this 1372 | */ 1373 | proto.sfu.Trickle.prototype.setTarget = function(value) { 1374 | return jspb.Message.setProto3EnumField(this, 1, value); 1375 | }; 1376 | 1377 | 1378 | /** 1379 | * optional string init = 2; 1380 | * @return {string} 1381 | */ 1382 | proto.sfu.Trickle.prototype.getInit = function() { 1383 | return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); 1384 | }; 1385 | 1386 | 1387 | /** 1388 | * @param {string} value 1389 | * @return {!proto.sfu.Trickle} returns this 1390 | */ 1391 | proto.sfu.Trickle.prototype.setInit = function(value) { 1392 | return jspb.Message.setProto3StringField(this, 2, value); 1393 | }; 1394 | 1395 | 1396 | goog.object.extend(exports, proto.sfu); 1397 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es6", 4 | "module": "commonjs", 5 | "allowJs": true, 6 | "sourceMap": true, 7 | "outDir": "lib", 8 | "strict": true, 9 | "noImplicitAny": false, 10 | "strictNullChecks": false, 11 | "baseUrl": "src", 12 | "typeRoots": ["node_modules/@types"], 13 | "esModuleInterop": true, 14 | "declaration": true, 15 | "declarationMap": true 16 | }, 17 | "include": [ 18 | "src" 19 | ] 20 | } --------------------------------------------------------------------------------