android-emulator-webrtc 1.0.17 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/README.md +93 -204
  2. package/dist/components/emulator/emulator.d.ts +64 -0
  3. package/dist/components/emulator/emulator.js +161 -173
  4. package/dist/components/emulator/net/emulator_status.d.ts +45 -0
  5. package/dist/components/emulator/net/emulator_status.js +35 -42
  6. package/dist/components/emulator/net/logcat.js +37 -54
  7. package/dist/components/emulator/net/logger.d.ts +7 -0
  8. package/dist/components/emulator/net/logger.js +20 -0
  9. package/dist/components/emulator/net/ws_jsep_protocol_driver.d.ts +213 -0
  10. package/dist/components/emulator/net/ws_jsep_protocol_driver.js +640 -0
  11. package/dist/components/emulator/views/event_handler.d.ts +37 -0
  12. package/dist/components/emulator/views/event_handler.js +274 -260
  13. package/dist/components/emulator/views/webrtc_view.d.ts +27 -0
  14. package/dist/components/emulator/views/webrtc_view.js +42 -25
  15. package/dist/index.d.ts +8 -0
  16. package/dist/index.js +0 -7
  17. package/dist/proto/emulator_controller_pb.d.ts +1 -0
  18. package/dist/proto/emulator_controller_pb.js +146 -287
  19. package/dist/src/components/emulator/emulator.d.ts +64 -0
  20. package/dist/src/components/emulator/net/emulator_status.d.ts +45 -0
  21. package/dist/src/components/emulator/net/logger.d.ts +7 -0
  22. package/dist/src/components/emulator/net/ws_jsep_protocol_driver.d.ts +213 -0
  23. package/dist/src/components/emulator/views/event_handler.d.ts +37 -0
  24. package/dist/src/components/emulator/views/webrtc_view.d.ts +27 -0
  25. package/dist/src/index.d.ts +8 -0
  26. package/dist/src/proto/emulator_controller_pb.d.ts +1 -0
  27. package/package.json +17 -18
  28. package/proto/emulator_controller.proto +746 -181
  29. package/.vscode/launch.json +0 -21
  30. package/.vscode/settings.json +0 -3
  31. package/CONTRIBUTING.md +0 -28
  32. package/Makefile +0 -123
  33. package/android-emulator-webrtc.code-workspace +0 -7
  34. package/api_descriptor.pb +0 -0
  35. package/babel.config.js +0 -16
  36. package/cloudbuild.yaml +0 -41
  37. package/cloudbuilders/.gcloudignore +0 -1
  38. package/cloudbuilders/Dockerfile +0 -20
  39. package/cloudbuilders/README.md +0 -29
  40. package/cloudbuilders/cloudbuild.yaml +0 -19
  41. package/dist/components/emulator/net/jsep_protocol_driver.js +0 -365
  42. package/dist/components/emulator/views/resizing_component.js +0 -86
  43. package/dist/components/emulator/views/simple_png_view.js +0 -111
  44. package/dist/proto/emulator_controller_grpc_web_pb.js +0 -1601
  45. package/dist/proto/emulator_web_client.js +0 -176
  46. package/dist/proto/rtc_service_grpc_web_pb.js +0 -231
  47. package/dist/proto/rtc_service_pb.js +0 -338
  48. package/emulator/index.js +0 -1
  49. package/eslint_prefix.py +0 -37
  50. package/gen_md_doc.js +0 -40
  51. package/npmrc.enc +0 -0
  52. package/proto/rtc_service.proto +0 -117
  53. package/protoc-plugin/Makefile +0 -31
  54. package/protoc-plugin/grpc_generator.cc +0 -1755
  55. package/src/components/emulator/emulator.js +0 -217
  56. package/src/components/emulator/net/emulator_status.js +0 -94
  57. package/src/components/emulator/net/jsep_protocol_driver.js +0 -364
  58. package/src/components/emulator/net/logcat.js +0 -155
  59. package/src/components/emulator/views/event_handler.js +0 -268
  60. package/src/components/emulator/views/resizing_component.js +0 -65
  61. package/src/components/emulator/views/simple_png_view.js +0 -106
  62. package/src/components/emulator/views/webrtc_view.js +0 -146
  63. package/src/index.js +0 -20
  64. package/src/proto/emulator_web_client.js +0 -140
  65. package/test/cloudbuild.yaml +0 -41
  66. package/test/emulator.test.js +0 -125
  67. package/test/event_handler.test.js +0 -91
  68. package/test/fake_events.js +0 -50
  69. package/test/jsep_protocol_driver.test.js +0 -228
  70. package/test/resizing_component.test.js +0 -37
  71. package/test/simple_png_view.test.js +0 -145
  72. package/test/touch_event_handler.test.js +0 -118
@@ -1,338 +0,0 @@
1
- "use strict";
2
-
3
- // source: rtc_service.proto
4
- /**
5
- * @fileoverview
6
- * @enhanceable
7
- * @suppress {messageConventions} JS Compiler reports an error if a variable or
8
- * field starts with 'MSG_' and isn't a translatable message.
9
- * @public
10
- */
11
- // GENERATED CODE -- DO NOT EDIT!
12
-
13
- var jspb = require('google-protobuf');
14
- var goog = jspb;
15
- var global = Function('return this')();
16
- var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
17
- goog.object.extend(proto, google_protobuf_empty_pb);
18
- goog.exportSymbol('proto.android.emulation.control.JsepMsg', null, global);
19
- goog.exportSymbol('proto.android.emulation.control.RtcId', null, global);
20
- /**
21
- * Generated by JsPbCodeGenerator.
22
- * @param {Array=} opt_data Optional initial data array, typically from a
23
- * server response, or constructed directly in Javascript. The array is used
24
- * in place and becomes part of the constructed object. It is not cloned.
25
- * If no data is provided, the constructed object will be empty, but still
26
- * valid.
27
- * @extends {jspb.Message}
28
- * @constructor
29
- */
30
- proto.android.emulation.control.RtcId = function (opt_data) {
31
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
32
- };
33
- goog.inherits(proto.android.emulation.control.RtcId, jspb.Message);
34
- if (goog.DEBUG && !COMPILED) {
35
- /**
36
- * @public
37
- * @override
38
- */
39
- proto.android.emulation.control.RtcId.displayName = 'proto.android.emulation.control.RtcId';
40
- }
41
- /**
42
- * Generated by JsPbCodeGenerator.
43
- * @param {Array=} opt_data Optional initial data array, typically from a
44
- * server response, or constructed directly in Javascript. The array is used
45
- * in place and becomes part of the constructed object. It is not cloned.
46
- * If no data is provided, the constructed object will be empty, but still
47
- * valid.
48
- * @extends {jspb.Message}
49
- * @constructor
50
- */
51
- proto.android.emulation.control.JsepMsg = function (opt_data) {
52
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
53
- };
54
- goog.inherits(proto.android.emulation.control.JsepMsg, jspb.Message);
55
- if (goog.DEBUG && !COMPILED) {
56
- /**
57
- * @public
58
- * @override
59
- */
60
- proto.android.emulation.control.JsepMsg.displayName = 'proto.android.emulation.control.JsepMsg';
61
- }
62
- if (jspb.Message.GENERATE_TO_OBJECT) {
63
- /**
64
- * Creates an object representation of this proto.
65
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
66
- * Optional fields that are not set will be set to undefined.
67
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
68
- * For the list of reserved names please see:
69
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
70
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
71
- * JSPB instance for transitional soy proto support:
72
- * http://goto/soy-param-migration
73
- * @return {!Object}
74
- */
75
- proto.android.emulation.control.RtcId.prototype.toObject = function (opt_includeInstance) {
76
- return proto.android.emulation.control.RtcId.toObject(opt_includeInstance, this);
77
- };
78
-
79
- /**
80
- * Static version of the {@see toObject} method.
81
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
82
- * the JSPB instance for transitional soy proto support:
83
- * http://goto/soy-param-migration
84
- * @param {!proto.android.emulation.control.RtcId} msg The msg instance to transform.
85
- * @return {!Object}
86
- * @suppress {unusedLocalVariables} f is only used for nested messages
87
- */
88
- proto.android.emulation.control.RtcId.toObject = function (includeInstance, msg) {
89
- var f,
90
- obj = {
91
- guid: jspb.Message.getFieldWithDefault(msg, 1, "")
92
- };
93
- if (includeInstance) {
94
- obj.$jspbMessageInstance = msg;
95
- }
96
- return obj;
97
- };
98
- }
99
-
100
- /**
101
- * Deserializes binary data (in protobuf wire format).
102
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
103
- * @return {!proto.android.emulation.control.RtcId}
104
- */
105
- proto.android.emulation.control.RtcId.deserializeBinary = function (bytes) {
106
- var reader = new jspb.BinaryReader(bytes);
107
- var msg = new proto.android.emulation.control.RtcId();
108
- return proto.android.emulation.control.RtcId.deserializeBinaryFromReader(msg, reader);
109
- };
110
-
111
- /**
112
- * Deserializes binary data (in protobuf wire format) from the
113
- * given reader into the given message object.
114
- * @param {!proto.android.emulation.control.RtcId} msg The message object to deserialize into.
115
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
116
- * @return {!proto.android.emulation.control.RtcId}
117
- */
118
- proto.android.emulation.control.RtcId.deserializeBinaryFromReader = function (msg, reader) {
119
- while (reader.nextField()) {
120
- if (reader.isEndGroup()) {
121
- break;
122
- }
123
- var field = reader.getFieldNumber();
124
- switch (field) {
125
- case 1:
126
- var value = /** @type {string} */reader.readString();
127
- msg.setGuid(value);
128
- break;
129
- default:
130
- reader.skipField();
131
- break;
132
- }
133
- }
134
- return msg;
135
- };
136
-
137
- /**
138
- * Serializes the message to binary data (in protobuf wire format).
139
- * @return {!Uint8Array}
140
- */
141
- proto.android.emulation.control.RtcId.prototype.serializeBinary = function () {
142
- var writer = new jspb.BinaryWriter();
143
- proto.android.emulation.control.RtcId.serializeBinaryToWriter(this, writer);
144
- return writer.getResultBuffer();
145
- };
146
-
147
- /**
148
- * Serializes the given message to binary data (in protobuf wire
149
- * format), writing to the given BinaryWriter.
150
- * @param {!proto.android.emulation.control.RtcId} message
151
- * @param {!jspb.BinaryWriter} writer
152
- * @suppress {unusedLocalVariables} f is only used for nested messages
153
- */
154
- proto.android.emulation.control.RtcId.serializeBinaryToWriter = function (message, writer) {
155
- var f = undefined;
156
- f = message.getGuid();
157
- if (f.length > 0) {
158
- writer.writeString(1, f);
159
- }
160
- };
161
-
162
- /**
163
- * optional string guid = 1;
164
- * @return {string}
165
- */
166
- proto.android.emulation.control.RtcId.prototype.getGuid = function () {
167
- return (/** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "")
168
- );
169
- };
170
-
171
- /**
172
- * @param {string} value
173
- * @return {!proto.android.emulation.control.RtcId} returns this
174
- */
175
- proto.android.emulation.control.RtcId.prototype.setGuid = function (value) {
176
- return jspb.Message.setProto3StringField(this, 1, value);
177
- };
178
- if (jspb.Message.GENERATE_TO_OBJECT) {
179
- /**
180
- * Creates an object representation of this proto.
181
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
182
- * Optional fields that are not set will be set to undefined.
183
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
184
- * For the list of reserved names please see:
185
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
186
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
187
- * JSPB instance for transitional soy proto support:
188
- * http://goto/soy-param-migration
189
- * @return {!Object}
190
- */
191
- proto.android.emulation.control.JsepMsg.prototype.toObject = function (opt_includeInstance) {
192
- return proto.android.emulation.control.JsepMsg.toObject(opt_includeInstance, this);
193
- };
194
-
195
- /**
196
- * Static version of the {@see toObject} method.
197
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
198
- * the JSPB instance for transitional soy proto support:
199
- * http://goto/soy-param-migration
200
- * @param {!proto.android.emulation.control.JsepMsg} msg The msg instance to transform.
201
- * @return {!Object}
202
- * @suppress {unusedLocalVariables} f is only used for nested messages
203
- */
204
- proto.android.emulation.control.JsepMsg.toObject = function (includeInstance, msg) {
205
- var f,
206
- obj = {
207
- id: (f = msg.getId()) && proto.android.emulation.control.RtcId.toObject(includeInstance, f),
208
- message: jspb.Message.getFieldWithDefault(msg, 2, "")
209
- };
210
- if (includeInstance) {
211
- obj.$jspbMessageInstance = msg;
212
- }
213
- return obj;
214
- };
215
- }
216
-
217
- /**
218
- * Deserializes binary data (in protobuf wire format).
219
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
220
- * @return {!proto.android.emulation.control.JsepMsg}
221
- */
222
- proto.android.emulation.control.JsepMsg.deserializeBinary = function (bytes) {
223
- var reader = new jspb.BinaryReader(bytes);
224
- var msg = new proto.android.emulation.control.JsepMsg();
225
- return proto.android.emulation.control.JsepMsg.deserializeBinaryFromReader(msg, reader);
226
- };
227
-
228
- /**
229
- * Deserializes binary data (in protobuf wire format) from the
230
- * given reader into the given message object.
231
- * @param {!proto.android.emulation.control.JsepMsg} msg The message object to deserialize into.
232
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
233
- * @return {!proto.android.emulation.control.JsepMsg}
234
- */
235
- proto.android.emulation.control.JsepMsg.deserializeBinaryFromReader = function (msg, reader) {
236
- while (reader.nextField()) {
237
- if (reader.isEndGroup()) {
238
- break;
239
- }
240
- var field = reader.getFieldNumber();
241
- switch (field) {
242
- case 1:
243
- var value = new proto.android.emulation.control.RtcId();
244
- reader.readMessage(value, proto.android.emulation.control.RtcId.deserializeBinaryFromReader);
245
- msg.setId(value);
246
- break;
247
- case 2:
248
- var value = /** @type {string} */reader.readString();
249
- msg.setMessage(value);
250
- break;
251
- default:
252
- reader.skipField();
253
- break;
254
- }
255
- }
256
- return msg;
257
- };
258
-
259
- /**
260
- * Serializes the message to binary data (in protobuf wire format).
261
- * @return {!Uint8Array}
262
- */
263
- proto.android.emulation.control.JsepMsg.prototype.serializeBinary = function () {
264
- var writer = new jspb.BinaryWriter();
265
- proto.android.emulation.control.JsepMsg.serializeBinaryToWriter(this, writer);
266
- return writer.getResultBuffer();
267
- };
268
-
269
- /**
270
- * Serializes the given message to binary data (in protobuf wire
271
- * format), writing to the given BinaryWriter.
272
- * @param {!proto.android.emulation.control.JsepMsg} message
273
- * @param {!jspb.BinaryWriter} writer
274
- * @suppress {unusedLocalVariables} f is only used for nested messages
275
- */
276
- proto.android.emulation.control.JsepMsg.serializeBinaryToWriter = function (message, writer) {
277
- var f = undefined;
278
- f = message.getId();
279
- if (f != null) {
280
- writer.writeMessage(1, f, proto.android.emulation.control.RtcId.serializeBinaryToWriter);
281
- }
282
- f = message.getMessage();
283
- if (f.length > 0) {
284
- writer.writeString(2, f);
285
- }
286
- };
287
-
288
- /**
289
- * optional RtcId id = 1;
290
- * @return {?proto.android.emulation.control.RtcId}
291
- */
292
- proto.android.emulation.control.JsepMsg.prototype.getId = function () {
293
- return (/** @type{?proto.android.emulation.control.RtcId} */
294
- jspb.Message.getWrapperField(this, proto.android.emulation.control.RtcId, 1)
295
- );
296
- };
297
-
298
- /**
299
- * @param {?proto.android.emulation.control.RtcId|undefined} value
300
- * @return {!proto.android.emulation.control.JsepMsg} returns this
301
- */
302
- proto.android.emulation.control.JsepMsg.prototype.setId = function (value) {
303
- return jspb.Message.setWrapperField(this, 1, value);
304
- };
305
-
306
- /**
307
- * Clears the message field making it undefined.
308
- * @return {!proto.android.emulation.control.JsepMsg} returns this
309
- */
310
- proto.android.emulation.control.JsepMsg.prototype.clearId = function () {
311
- return this.setId(undefined);
312
- };
313
-
314
- /**
315
- * Returns whether this field is set.
316
- * @return {boolean}
317
- */
318
- proto.android.emulation.control.JsepMsg.prototype.hasId = function () {
319
- return jspb.Message.getField(this, 1) != null;
320
- };
321
-
322
- /**
323
- * optional string message = 2;
324
- * @return {string}
325
- */
326
- proto.android.emulation.control.JsepMsg.prototype.getMessage = function () {
327
- return (/** @type {string} */jspb.Message.getFieldWithDefault(this, 2, "")
328
- );
329
- };
330
-
331
- /**
332
- * @param {string} value
333
- * @return {!proto.android.emulation.control.JsepMsg} returns this
334
- */
335
- proto.android.emulation.control.JsepMsg.prototype.setMessage = function (value) {
336
- return jspb.Message.setProto3StringField(this, 2, value);
337
- };
338
- goog.object.extend(exports, proto.android.emulation.control);
package/emulator/index.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require('../dist')
package/eslint_prefix.py DELETED
@@ -1,37 +0,0 @@
1
- # Copyright 2019 The Android Open Source Project
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- import sys
15
- """This script prefixes the /* eslint-disable */ to the given file.
16
-
17
- For example:
18
-
19
- python eslint_prefix.py foo.js
20
-
21
- Will prefix /* eslint-disable */ to the file foo.js.
22
- """
23
-
24
- def main(argv):
25
- prefix = '/* eslint-disable */'
26
- fname = argv[1]
27
- text = ''
28
- with open(fname, 'r') as fn:
29
- text = fn.read()
30
-
31
- with open(fname, 'w') as fn:
32
- fn.write(prefix)
33
- fn.write('\n')
34
- fn.write(text)
35
-
36
- if __name__ == '__main__':
37
- main(sys.argv)
package/gen_md_doc.js DELETED
@@ -1,40 +0,0 @@
1
- /*
2
- * Copyright 2020 The Android Open Source Project
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License")
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- const path = require("path");
17
- const fs = require("fs");
18
- const reactDocgen = require("react-docgen");
19
- const ReactDocGenMarkdownRenderer = require("react-docgen-markdown-renderer");
20
- const componentPath = path.join(
21
- __dirname,
22
- "src/components/emulator/emulator.js"
23
- );
24
- const renderer = new ReactDocGenMarkdownRenderer();
25
-
26
- fs.readFile(componentPath, (error, content) => {
27
- const documentationPath =
28
- path.basename(componentPath, path.extname(componentPath)) +
29
- renderer.extension;
30
- console.log(documentationPath);
31
-
32
- const doc = reactDocgen.parse(content);
33
- const md = renderer.render(componentPath, doc, []);
34
- fs.writeFile(documentationPath, md, (err) => {
35
- if (err) {
36
- console.error(err);
37
- return;
38
- }
39
- });
40
- });
package/npmrc.enc DELETED
Binary file
@@ -1,117 +0,0 @@
1
- // Copyright (C) 2018 The Android Open Source Project
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- // Note that if you add/remove methods in this file you must update
16
- // the metrics sql as well by running ./android/scripts/gen-grpc-sql.py
17
- //
18
- // Please group deleted methods in a block including the date (MM/DD/YY)
19
- // it was removed. This enables us to easily keep metrics around after removal
20
- //
21
- // List of deleted methods
22
- // rpc iWasDeleted (03/12/12)
23
- // ...
24
- syntax = "proto3";
25
-
26
- option java_multiple_files = true;
27
- option java_package = "com.android.emulator.control";
28
- option objc_class_prefix = "AEC";
29
-
30
- package android.emulation.control;
31
- import "google/protobuf/empty.proto";
32
-
33
- // An RTC service lets you interact with the emulator through WebRTC
34
- // Note that this is currently an experimental feature, and that the
35
- // service definition might change without notice. Use at your own risk!
36
- //
37
- // The following endpoints are needed to establish the webrtc protocol
38
- // Due to limitiations in Javascript we cannot make use of bidirectional
39
- // endpoints See this [blog](https://grpc.io/blog/state-of-grpc-web) for
40
- // details.
41
- service Rtc {
42
- // This function will generate a new identifier that the client
43
- // should use for further interaction. It will initiate the
44
- // JSEP protocol on the server side.
45
- rpc requestRtcStream(google.protobuf.Empty) returns (RtcId) {}
46
-
47
- // Sends the given JsepMsg to the server. The RtcId in the
48
- // message should point to an active stream negotiation in
49
- // progress, otherwise the message will be ignored.
50
- rpc sendJsepMessage(JsepMsg) returns (google.protobuf.Empty) {}
51
-
52
- // Reads an available jsep messages for the given client id,
53
- // blocking until one becomes available. Do not use the polling version
54
- // above if you opt for this one.
55
- //
56
- // The ice candidates for example will trickle in on this callback,
57
- // as will the SDP negotation.
58
- rpc receiveJsepMessages(RtcId) returns (stream JsepMsg) {}
59
-
60
-
61
- // [DEPRECATED] This is only here as the go grpc webproxy used
62
- // by fuchsia does not support server side streaming. This method
63
- // will be removed in the future and should not be relied upon.
64
- //
65
- // Reads an available jsep messages for the given client id,
66
- // blocking until one becomes available. Do not use the polling version
67
- // above if you opt for this one.
68
- //
69
- // The ice candidates for example will trickle in on this callback,
70
- // as will the SDP negotation.
71
- rpc receiveJsepMessage(RtcId) returns (JsepMsg) {}
72
- }
73
-
74
- message RtcId {
75
- // The unique identifier of this connection. You will have to use the
76
- // same identifier when sending/receiving messages. The server will
77
- // generate a guid when receiving the start message.
78
- string guid = 1;
79
- }
80
-
81
- message JsepMsg {
82
- // The unique identifier of this connection. You will have to use the
83
- // same identifier when sending/receiving messages. The server will
84
- // generate a guid when receiving the start message.
85
- RtcId id = 1;
86
- // The JSON payload. This usually can be directly handled by the
87
- // Javascript library.
88
- //
89
- // The dictionary can contain the following properties
90
- //
91
- // - bye:
92
- // You can hang up now. No new message expected for you.
93
- // The server has stopped the RTC stream.
94
- //
95
- // - start:
96
- // An RTCConfiguration dictionary providing options to
97
- // configure the new connection. This can include the
98
- // turn configuration the serve is using. This dictionary can be
99
- // passed in directly to the
100
- // [RTCPeerConnection](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection)
101
- // object.
102
- //
103
- // - candidate:
104
- // The WebRTC API's RTCIceCandidateInit dictionary, which
105
- // contains the information needed to fundamentally describe an
106
- // RTCIceCandidate. See
107
- // [RTCIceCandidate](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceCandidate)
108
- // and [Session
109
- // Lifetime](https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Session_lifetime)
110
- // for more details.
111
- //
112
- // - sdp:
113
- // RTCSessionDescriptionInit dictionary containing the values
114
- // to that can be assigned to a
115
- // [RTCSessionDescription](https://developer.mozilla.org/en-US/docs/Web/API/RTCSessionDescription)
116
- string message = 2;
117
- }
@@ -1,31 +0,0 @@
1
- # Copyright 2018 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- CXX = g++
16
- PROTOHEADER=$(shell pkg-config --variable prefix protobuf)/include
17
- PROTOLIB=$(shell pkg-config --variable prefix protobuf)/lib
18
- CPPFLAGS += -I/usr/local/include -pthread -I$(PROTOHEADER)
19
- CXXFLAGS += -std=c++11
20
- LDFLAGS += -L/usr/local/lib -L$(PROTOLIB) -lprotoc -lprotobuf -lpthread -ldl
21
-
22
- all: protoc-gen-grpc-web
23
-
24
- protoc-gen-grpc-web: grpc_generator.o
25
- $(CXX) $^ $(LDFLAGS) -o $@
26
-
27
- install: protoc-gen-grpc-web
28
- install protoc-gen-grpc-web /usr/local/bin/protoc-gen-grpc-web
29
-
30
- clean:
31
- rm -f *.o protoc-gen-grpc-web