android-emulator-webrtc 1.0.18 → 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.
- package/README.md +93 -204
- package/dist/components/emulator/emulator.d.ts +64 -0
- package/dist/components/emulator/emulator.js +161 -173
- package/dist/components/emulator/net/emulator_status.d.ts +45 -0
- package/dist/components/emulator/net/emulator_status.js +35 -42
- package/dist/components/emulator/net/logcat.js +37 -54
- package/dist/components/emulator/net/logger.d.ts +7 -0
- package/dist/components/emulator/net/logger.js +20 -0
- package/dist/components/emulator/net/ws_jsep_protocol_driver.d.ts +213 -0
- package/dist/components/emulator/net/ws_jsep_protocol_driver.js +640 -0
- package/dist/components/emulator/views/event_handler.d.ts +37 -0
- package/dist/components/emulator/views/event_handler.js +274 -260
- package/dist/components/emulator/views/webrtc_view.d.ts +27 -0
- package/dist/components/emulator/views/webrtc_view.js +42 -20
- package/dist/index.d.ts +8 -0
- package/dist/index.js +0 -7
- package/dist/proto/emulator_controller_pb.d.ts +1 -0
- package/dist/proto/emulator_controller_pb.js +146 -287
- package/dist/src/components/emulator/emulator.d.ts +64 -0
- package/dist/src/components/emulator/net/emulator_status.d.ts +45 -0
- package/dist/src/components/emulator/net/logger.d.ts +7 -0
- package/dist/src/components/emulator/net/ws_jsep_protocol_driver.d.ts +213 -0
- package/dist/src/components/emulator/views/event_handler.d.ts +37 -0
- package/dist/src/components/emulator/views/webrtc_view.d.ts +27 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/proto/emulator_controller_pb.d.ts +1 -0
- package/package.json +17 -17
- package/proto/emulator_controller.proto +746 -181
- package/.vscode/launch.json +0 -21
- package/.vscode/settings.json +0 -3
- package/CONTRIBUTING.md +0 -28
- package/Makefile +0 -123
- package/android-emulator-webrtc.code-workspace +0 -7
- package/api_descriptor.pb +0 -0
- package/babel.config.js +0 -16
- package/cloudbuild.yaml +0 -41
- package/cloudbuilders/.gcloudignore +0 -1
- package/cloudbuilders/Dockerfile +0 -20
- package/cloudbuilders/README.md +0 -29
- package/cloudbuilders/cloudbuild.yaml +0 -19
- package/dist/components/emulator/net/jsep_protocol_driver.js +0 -365
- package/dist/components/emulator/views/simple_png_view.js +0 -110
- package/dist/proto/emulator_controller_grpc_web_pb.js +0 -1601
- package/dist/proto/emulator_web_client.js +0 -176
- package/dist/proto/rtc_service_grpc_web_pb.js +0 -231
- package/dist/proto/rtc_service_pb.js +0 -338
- package/emulator/index.js +0 -1
- package/eslint_prefix.py +0 -37
- package/gen_md_doc.js +0 -40
- package/npmrc.enc +0 -0
- package/proto/rtc_service.proto +0 -117
- package/protoc-plugin/Makefile +0 -31
- package/protoc-plugin/grpc_generator.cc +0 -1755
- package/src/components/emulator/emulator.js +0 -217
- package/src/components/emulator/net/emulator_status.js +0 -94
- package/src/components/emulator/net/jsep_protocol_driver.js +0 -364
- package/src/components/emulator/net/logcat.js +0 -155
- package/src/components/emulator/views/event_handler.js +0 -268
- package/src/components/emulator/views/simple_png_view.js +0 -105
- package/src/components/emulator/views/webrtc_view.js +0 -142
- package/src/index.js +0 -20
- package/src/proto/emulator_web_client.js +0 -140
- package/test/cloudbuild.yaml +0 -41
- package/test/emulator.test.js +0 -125
- package/test/event_handler.test.js +0 -91
- package/test/fake_events.js +0 -50
- package/test/jsep_protocol_driver.test.js +0 -228
- package/test/simple_png_view.test.js +0 -145
- package/test/touch_event_handler.test.js +0 -118
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.RtcService = exports.NopAuthenticator = exports.EmulatorControllerService = void 0;
|
|
8
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
9
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
10
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
|
-
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
12
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
14
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
var _emulator_controller_grpc_web_pb = require("../proto/emulator_controller_grpc_web_pb");
|
|
17
|
-
var _rtc_service_grpc_web_pb = require("../proto/rtc_service_grpc_web_pb");
|
|
18
|
-
var _grpcWeb = require("grpc-web");
|
|
19
|
-
var _events = require("events");
|
|
20
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
23
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*
|
|
24
|
-
* Copyright 2019 The Android Open Source Project
|
|
25
|
-
*
|
|
26
|
-
* Licensed under the Apache License, Version 2.0 (the "License")
|
|
27
|
-
* you may not use this file except in compliance with the License.
|
|
28
|
-
* You may obtain a copy of the License at
|
|
29
|
-
*
|
|
30
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
31
|
-
*
|
|
32
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
33
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
34
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
35
|
-
* See the License for the specific language governing permissions and
|
|
36
|
-
* limitations under the License.
|
|
37
|
-
*/
|
|
38
|
-
var NopAuthenticator = /*#__PURE__*/(0, _createClass2["default"])(function NopAuthenticator() {
|
|
39
|
-
(0, _classCallCheck2["default"])(this, NopAuthenticator);
|
|
40
|
-
(0, _defineProperty2["default"])(this, "authHeader", function () {
|
|
41
|
-
return {};
|
|
42
|
-
});
|
|
43
|
-
(0, _defineProperty2["default"])(this, "unauthorized", function () {});
|
|
44
|
-
});
|
|
45
|
-
/**
|
|
46
|
-
* A GrcpWebClientBase that inject authentication headers and intercepts
|
|
47
|
-
* errors. If the errors are 401, the unauthorized method of the authenticator will be invoked.
|
|
48
|
-
*
|
|
49
|
-
* @export
|
|
50
|
-
* @class EmulatorWebClient
|
|
51
|
-
* @extends {GrpcWebClientBase}
|
|
52
|
-
*/
|
|
53
|
-
exports.NopAuthenticator = NopAuthenticator;
|
|
54
|
-
var EmulatorWebClient = /*#__PURE__*/function (_GrpcWebClientBase) {
|
|
55
|
-
(0, _inherits2["default"])(EmulatorWebClient, _GrpcWebClientBase);
|
|
56
|
-
var _super = _createSuper(EmulatorWebClient);
|
|
57
|
-
function EmulatorWebClient(options, auth) {
|
|
58
|
-
var _thisSuper, _thisSuper2, _this;
|
|
59
|
-
(0, _classCallCheck2["default"])(this, EmulatorWebClient);
|
|
60
|
-
_this = _super.call(this, options);
|
|
61
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "on", function (name, fn) {
|
|
62
|
-
_this.events.on(name, fn);
|
|
63
|
-
});
|
|
64
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "rpcCall", function (method, request, metadata, methodinfo, callback) {
|
|
65
|
-
var authHeader = _this.auth.authHeader();
|
|
66
|
-
var meta = _objectSpread(_objectSpread({}, metadata), authHeader);
|
|
67
|
-
var self = (0, _assertThisInitialized2["default"])(_this);
|
|
68
|
-
return (0, _get2["default"])((_thisSuper = (0, _assertThisInitialized2["default"])(_this), (0, _getPrototypeOf2["default"])(EmulatorWebClient.prototype)), "rpcCall", _thisSuper).call(_thisSuper, method, request, meta, methodinfo, function (err, res) {
|
|
69
|
-
if (err) {
|
|
70
|
-
if (err.code === 401) self.auth.unauthorized();
|
|
71
|
-
if (self.events) self.events.emit("error", err);
|
|
72
|
-
}
|
|
73
|
-
if (callback) callback(err, res);
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "serverStreaming", function (method, request, metadata, methodInfo) {
|
|
77
|
-
var authHeader = _this.auth.authHeader();
|
|
78
|
-
var meta = _objectSpread(_objectSpread({}, metadata), authHeader);
|
|
79
|
-
var stream = (0, _get2["default"])((_thisSuper2 = (0, _assertThisInitialized2["default"])(_this), (0, _getPrototypeOf2["default"])(EmulatorWebClient.prototype)), "serverStreaming", _thisSuper2).call(_thisSuper2, method, request, meta, methodInfo);
|
|
80
|
-
var self = (0, _assertThisInitialized2["default"])(_this);
|
|
81
|
-
|
|
82
|
-
// Intercept errors.
|
|
83
|
-
stream.on("error", function (e) {
|
|
84
|
-
if (e.code === 401) {
|
|
85
|
-
self.auth.unauthorized();
|
|
86
|
-
}
|
|
87
|
-
self.events.emit("error", e);
|
|
88
|
-
});
|
|
89
|
-
return stream;
|
|
90
|
-
});
|
|
91
|
-
_this.auth = auth;
|
|
92
|
-
_this.events = new _events.EventEmitter();
|
|
93
|
-
_this.events.on("error", function (e) {
|
|
94
|
-
console.log("low level gRPC error: " + JSON.stringify(e));
|
|
95
|
-
});
|
|
96
|
-
return _this;
|
|
97
|
-
}
|
|
98
|
-
return (0, _createClass2["default"])(EmulatorWebClient);
|
|
99
|
-
}(_grpcWeb.GrpcWebClientBase);
|
|
100
|
-
/**
|
|
101
|
-
* An EmulatorControllerService is an EmulatorControllerClient that inject authentication headers.
|
|
102
|
-
* You can provide your own authenticator service that must implement the following mehtods:
|
|
103
|
-
*
|
|
104
|
-
* - `authHeader()` which must return a set of headers that should be send along with a request.
|
|
105
|
-
* - `unauthorized()` a function that gets called when a 401 was received.
|
|
106
|
-
*
|
|
107
|
-
* You can use this to simplify handling authentication failures.
|
|
108
|
-
*
|
|
109
|
-
* TODO(jansene): Maybe expose error handling? That way it does
|
|
110
|
-
* not have to be repeated at every function call.
|
|
111
|
-
*
|
|
112
|
-
* @export
|
|
113
|
-
* @class EmulatorControllerService
|
|
114
|
-
* @extends {EmulatorControllerClient}
|
|
115
|
-
*/
|
|
116
|
-
var EmulatorControllerService = /*#__PURE__*/function (_EmulatorControllerCl) {
|
|
117
|
-
(0, _inherits2["default"])(EmulatorControllerService, _EmulatorControllerCl);
|
|
118
|
-
var _super2 = _createSuper(EmulatorControllerService);
|
|
119
|
-
/**
|
|
120
|
-
*Creates an instance of EmulatorControllerService.
|
|
121
|
-
* @param {string} uri of the emulator controller endpoint.
|
|
122
|
-
* @param {Authenticator} authenticator used to authenticate with the emulator endpoint.
|
|
123
|
-
* @param onError callback that will be invoked when a low level gRPC error arises.
|
|
124
|
-
* @memberof EmulatorControllerService
|
|
125
|
-
*/
|
|
126
|
-
function EmulatorControllerService(uri, authenticator, onError) {
|
|
127
|
-
var _this2;
|
|
128
|
-
(0, _classCallCheck2["default"])(this, EmulatorControllerService);
|
|
129
|
-
_this2 = _super2.call(this, uri);
|
|
130
|
-
if (!authenticator) authenticator = new NopAuthenticator();
|
|
131
|
-
_this2.client_ = new EmulatorWebClient({}, authenticator);
|
|
132
|
-
if (onError) _this2.client_.on('error', function (e) {
|
|
133
|
-
onError(e);
|
|
134
|
-
});
|
|
135
|
-
return _this2;
|
|
136
|
-
}
|
|
137
|
-
return (0, _createClass2["default"])(EmulatorControllerService);
|
|
138
|
-
}(_emulator_controller_grpc_web_pb.EmulatorControllerClient);
|
|
139
|
-
/**
|
|
140
|
-
* An RtcService is an RtcClient that inject authentication headers.
|
|
141
|
-
* You can provide your own authenticator service that must implement the following mehtods:
|
|
142
|
-
*
|
|
143
|
-
* - `authHeader()` which must return a set of headers that should be send along with a request.
|
|
144
|
-
* - `unauthorized()` a function that gets called when a 401 was received.
|
|
145
|
-
*
|
|
146
|
-
* You can use this to simplify handling authentication failures.
|
|
147
|
-
*
|
|
148
|
-
* @export
|
|
149
|
-
* @class EmulatorControllerService
|
|
150
|
-
* @extends {RtcClient}
|
|
151
|
-
*/
|
|
152
|
-
exports.EmulatorControllerService = EmulatorControllerService;
|
|
153
|
-
var RtcService = /*#__PURE__*/function (_RtcClient) {
|
|
154
|
-
(0, _inherits2["default"])(RtcService, _RtcClient);
|
|
155
|
-
var _super3 = _createSuper(RtcService);
|
|
156
|
-
/**
|
|
157
|
-
*Creates an instance of RtcService.
|
|
158
|
-
* @param {string} uri of the emulator controller endpoint.
|
|
159
|
-
* @param {Authenticator} authenticator used to authenticate with the emulator endpoint.
|
|
160
|
-
* @param onError callback that will be invoked when a low level gRPC error arises.
|
|
161
|
-
* @memberof RtcService
|
|
162
|
-
*/
|
|
163
|
-
function RtcService(uri, authenticator, onError) {
|
|
164
|
-
var _this3;
|
|
165
|
-
(0, _classCallCheck2["default"])(this, RtcService);
|
|
166
|
-
_this3 = _super3.call(this, uri);
|
|
167
|
-
if (!authenticator) authenticator = new NopAuthenticator();
|
|
168
|
-
_this3.client_ = new EmulatorWebClient({}, authenticator);
|
|
169
|
-
if (onError) _this3.client_.on('error', function (e) {
|
|
170
|
-
onError(e);
|
|
171
|
-
});
|
|
172
|
-
return _this3;
|
|
173
|
-
}
|
|
174
|
-
return (0, _createClass2["default"])(RtcService);
|
|
175
|
-
}(_rtc_service_grpc_web_pb.RtcClient);
|
|
176
|
-
exports.RtcService = RtcService;
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview gRPC-Web generated client stub for android.emulation.control
|
|
5
|
-
* @enhanceable
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
// Code generated by protoc-gen-grpc-web. DO NOT EDIT.
|
|
10
|
-
// versions:
|
|
11
|
-
// protoc-gen-grpc-web v1.4.2
|
|
12
|
-
// protoc v3.12.4
|
|
13
|
-
// source: rtc_service.proto
|
|
14
|
-
|
|
15
|
-
/* eslint-disable */
|
|
16
|
-
// @ts-nocheck
|
|
17
|
-
|
|
18
|
-
var grpc = {};
|
|
19
|
-
grpc.web = require('grpc-web');
|
|
20
|
-
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
|
|
21
|
-
var proto = {};
|
|
22
|
-
proto.android = {};
|
|
23
|
-
proto.android.emulation = {};
|
|
24
|
-
proto.android.emulation.control = require('./rtc_service_pb.js');
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @param {string} hostname
|
|
28
|
-
* @param {?Object} credentials
|
|
29
|
-
* @param {?grpc.web.ClientOptions} options
|
|
30
|
-
* @constructor
|
|
31
|
-
* @struct
|
|
32
|
-
* @final
|
|
33
|
-
*/
|
|
34
|
-
proto.android.emulation.control.RtcClient = function (hostname, credentials, options) {
|
|
35
|
-
if (!options) options = {};
|
|
36
|
-
options.format = 'text';
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @private @const {!grpc.web.GrpcWebClientBase} The client
|
|
40
|
-
*/
|
|
41
|
-
this.client_ = new grpc.web.GrpcWebClientBase(options);
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @private @const {string} The hostname
|
|
45
|
-
*/
|
|
46
|
-
this.hostname_ = hostname.replace(/\/+$/, '');
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @param {string} hostname
|
|
51
|
-
* @param {?Object} credentials
|
|
52
|
-
* @param {?grpc.web.ClientOptions} options
|
|
53
|
-
* @constructor
|
|
54
|
-
* @struct
|
|
55
|
-
* @final
|
|
56
|
-
*/
|
|
57
|
-
proto.android.emulation.control.RtcPromiseClient = function (hostname, credentials, options) {
|
|
58
|
-
if (!options) options = {};
|
|
59
|
-
options.format = 'text';
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* @private @const {!grpc.web.GrpcWebClientBase} The client
|
|
63
|
-
*/
|
|
64
|
-
this.client_ = new grpc.web.GrpcWebClientBase(options);
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @private @const {string} The hostname
|
|
68
|
-
*/
|
|
69
|
-
this.hostname_ = hostname.replace(/\/+$/, '');
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* @const
|
|
74
|
-
* @type {!grpc.web.MethodDescriptor<
|
|
75
|
-
* !proto.google.protobuf.Empty,
|
|
76
|
-
* !proto.android.emulation.control.RtcId>}
|
|
77
|
-
*/
|
|
78
|
-
var methodDescriptor_Rtc_requestRtcStream = new grpc.web.MethodDescriptor('/android.emulation.control.Rtc/requestRtcStream', grpc.web.MethodType.UNARY, google_protobuf_empty_pb.Empty, proto.android.emulation.control.RtcId,
|
|
79
|
-
/**
|
|
80
|
-
* @param {!proto.google.protobuf.Empty} request
|
|
81
|
-
* @return {!Uint8Array}
|
|
82
|
-
*/
|
|
83
|
-
function (request) {
|
|
84
|
-
return request.serializeBinary();
|
|
85
|
-
}, proto.android.emulation.control.RtcId.deserializeBinary);
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* @param {!proto.google.protobuf.Empty} request The
|
|
89
|
-
* request proto
|
|
90
|
-
* @param {?Object<string, string>} metadata User defined
|
|
91
|
-
* call metadata
|
|
92
|
-
* @param {function(?grpc.web.RpcError, ?proto.android.emulation.control.RtcId)}
|
|
93
|
-
* callback The callback function(error, response)
|
|
94
|
-
* @return {!grpc.web.ClientReadableStream<!proto.android.emulation.control.RtcId>|undefined}
|
|
95
|
-
* The XHR Node Readable Stream
|
|
96
|
-
*/
|
|
97
|
-
proto.android.emulation.control.RtcClient.prototype.requestRtcStream = function (request, metadata, callback) {
|
|
98
|
-
return this.client_.rpcCall(this.hostname_ + '/android.emulation.control.Rtc/requestRtcStream', request, metadata || {}, methodDescriptor_Rtc_requestRtcStream, callback);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @param {!proto.google.protobuf.Empty} request The
|
|
103
|
-
* request proto
|
|
104
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
105
|
-
* call metadata
|
|
106
|
-
* @return {!Promise<!proto.android.emulation.control.RtcId>}
|
|
107
|
-
* Promise that resolves to the response
|
|
108
|
-
*/
|
|
109
|
-
proto.android.emulation.control.RtcPromiseClient.prototype.requestRtcStream = function (request, metadata) {
|
|
110
|
-
return this.client_.unaryCall(this.hostname_ + '/android.emulation.control.Rtc/requestRtcStream', request, metadata || {}, methodDescriptor_Rtc_requestRtcStream);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* @const
|
|
115
|
-
* @type {!grpc.web.MethodDescriptor<
|
|
116
|
-
* !proto.android.emulation.control.JsepMsg,
|
|
117
|
-
* !proto.google.protobuf.Empty>}
|
|
118
|
-
*/
|
|
119
|
-
var methodDescriptor_Rtc_sendJsepMessage = new grpc.web.MethodDescriptor('/android.emulation.control.Rtc/sendJsepMessage', grpc.web.MethodType.UNARY, proto.android.emulation.control.JsepMsg, google_protobuf_empty_pb.Empty,
|
|
120
|
-
/**
|
|
121
|
-
* @param {!proto.android.emulation.control.JsepMsg} request
|
|
122
|
-
* @return {!Uint8Array}
|
|
123
|
-
*/
|
|
124
|
-
function (request) {
|
|
125
|
-
return request.serializeBinary();
|
|
126
|
-
}, google_protobuf_empty_pb.Empty.deserializeBinary);
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* @param {!proto.android.emulation.control.JsepMsg} request The
|
|
130
|
-
* request proto
|
|
131
|
-
* @param {?Object<string, string>} metadata User defined
|
|
132
|
-
* call metadata
|
|
133
|
-
* @param {function(?grpc.web.RpcError, ?proto.google.protobuf.Empty)}
|
|
134
|
-
* callback The callback function(error, response)
|
|
135
|
-
* @return {!grpc.web.ClientReadableStream<!proto.google.protobuf.Empty>|undefined}
|
|
136
|
-
* The XHR Node Readable Stream
|
|
137
|
-
*/
|
|
138
|
-
proto.android.emulation.control.RtcClient.prototype.sendJsepMessage = function (request, metadata, callback) {
|
|
139
|
-
return this.client_.rpcCall(this.hostname_ + '/android.emulation.control.Rtc/sendJsepMessage', request, metadata || {}, methodDescriptor_Rtc_sendJsepMessage, callback);
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* @param {!proto.android.emulation.control.JsepMsg} request The
|
|
144
|
-
* request proto
|
|
145
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
146
|
-
* call metadata
|
|
147
|
-
* @return {!Promise<!proto.google.protobuf.Empty>}
|
|
148
|
-
* Promise that resolves to the response
|
|
149
|
-
*/
|
|
150
|
-
proto.android.emulation.control.RtcPromiseClient.prototype.sendJsepMessage = function (request, metadata) {
|
|
151
|
-
return this.client_.unaryCall(this.hostname_ + '/android.emulation.control.Rtc/sendJsepMessage', request, metadata || {}, methodDescriptor_Rtc_sendJsepMessage);
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* @const
|
|
156
|
-
* @type {!grpc.web.MethodDescriptor<
|
|
157
|
-
* !proto.android.emulation.control.RtcId,
|
|
158
|
-
* !proto.android.emulation.control.JsepMsg>}
|
|
159
|
-
*/
|
|
160
|
-
var methodDescriptor_Rtc_receiveJsepMessages = new grpc.web.MethodDescriptor('/android.emulation.control.Rtc/receiveJsepMessages', grpc.web.MethodType.SERVER_STREAMING, proto.android.emulation.control.RtcId, proto.android.emulation.control.JsepMsg,
|
|
161
|
-
/**
|
|
162
|
-
* @param {!proto.android.emulation.control.RtcId} request
|
|
163
|
-
* @return {!Uint8Array}
|
|
164
|
-
*/
|
|
165
|
-
function (request) {
|
|
166
|
-
return request.serializeBinary();
|
|
167
|
-
}, proto.android.emulation.control.JsepMsg.deserializeBinary);
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* @param {!proto.android.emulation.control.RtcId} request The request proto
|
|
171
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
172
|
-
* call metadata
|
|
173
|
-
* @return {!grpc.web.ClientReadableStream<!proto.android.emulation.control.JsepMsg>}
|
|
174
|
-
* The XHR Node Readable Stream
|
|
175
|
-
*/
|
|
176
|
-
proto.android.emulation.control.RtcClient.prototype.receiveJsepMessages = function (request, metadata) {
|
|
177
|
-
return this.client_.serverStreaming(this.hostname_ + '/android.emulation.control.Rtc/receiveJsepMessages', request, metadata || {}, methodDescriptor_Rtc_receiveJsepMessages);
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @param {!proto.android.emulation.control.RtcId} request The request proto
|
|
182
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
183
|
-
* call metadata
|
|
184
|
-
* @return {!grpc.web.ClientReadableStream<!proto.android.emulation.control.JsepMsg>}
|
|
185
|
-
* The XHR Node Readable Stream
|
|
186
|
-
*/
|
|
187
|
-
proto.android.emulation.control.RtcPromiseClient.prototype.receiveJsepMessages = function (request, metadata) {
|
|
188
|
-
return this.client_.serverStreaming(this.hostname_ + '/android.emulation.control.Rtc/receiveJsepMessages', request, metadata || {}, methodDescriptor_Rtc_receiveJsepMessages);
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* @const
|
|
193
|
-
* @type {!grpc.web.MethodDescriptor<
|
|
194
|
-
* !proto.android.emulation.control.RtcId,
|
|
195
|
-
* !proto.android.emulation.control.JsepMsg>}
|
|
196
|
-
*/
|
|
197
|
-
var methodDescriptor_Rtc_receiveJsepMessage = new grpc.web.MethodDescriptor('/android.emulation.control.Rtc/receiveJsepMessage', grpc.web.MethodType.UNARY, proto.android.emulation.control.RtcId, proto.android.emulation.control.JsepMsg,
|
|
198
|
-
/**
|
|
199
|
-
* @param {!proto.android.emulation.control.RtcId} request
|
|
200
|
-
* @return {!Uint8Array}
|
|
201
|
-
*/
|
|
202
|
-
function (request) {
|
|
203
|
-
return request.serializeBinary();
|
|
204
|
-
}, proto.android.emulation.control.JsepMsg.deserializeBinary);
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* @param {!proto.android.emulation.control.RtcId} request The
|
|
208
|
-
* request proto
|
|
209
|
-
* @param {?Object<string, string>} metadata User defined
|
|
210
|
-
* call metadata
|
|
211
|
-
* @param {function(?grpc.web.RpcError, ?proto.android.emulation.control.JsepMsg)}
|
|
212
|
-
* callback The callback function(error, response)
|
|
213
|
-
* @return {!grpc.web.ClientReadableStream<!proto.android.emulation.control.JsepMsg>|undefined}
|
|
214
|
-
* The XHR Node Readable Stream
|
|
215
|
-
*/
|
|
216
|
-
proto.android.emulation.control.RtcClient.prototype.receiveJsepMessage = function (request, metadata, callback) {
|
|
217
|
-
return this.client_.rpcCall(this.hostname_ + '/android.emulation.control.Rtc/receiveJsepMessage', request, metadata || {}, methodDescriptor_Rtc_receiveJsepMessage, callback);
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* @param {!proto.android.emulation.control.RtcId} request The
|
|
222
|
-
* request proto
|
|
223
|
-
* @param {?Object<string, string>=} metadata User defined
|
|
224
|
-
* call metadata
|
|
225
|
-
* @return {!Promise<!proto.android.emulation.control.JsepMsg>}
|
|
226
|
-
* Promise that resolves to the response
|
|
227
|
-
*/
|
|
228
|
-
proto.android.emulation.control.RtcPromiseClient.prototype.receiveJsepMessage = function (request, metadata) {
|
|
229
|
-
return this.client_.unaryCall(this.hostname_ + '/android.emulation.control.Rtc/receiveJsepMessage', request, metadata || {}, methodDescriptor_Rtc_receiveJsepMessage);
|
|
230
|
-
};
|
|
231
|
-
module.exports = proto.android.emulation.control;
|