react-native-webrtc 111.0.2 → 111.0.3
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/android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java +7 -4
- package/ios/RCTWebRTC/SerializeUtils.m +12 -10
- package/lib/commonjs/EventEmitter.js +4 -16
- package/lib/commonjs/EventEmitter.js.map +1 -1
- package/lib/commonjs/Logger.js +2 -26
- package/lib/commonjs/Logger.js.map +1 -1
- package/lib/commonjs/MediaDevices.js +2 -14
- package/lib/commonjs/MediaDevices.js.map +1 -1
- package/lib/commonjs/MediaStream.js +7 -43
- package/lib/commonjs/MediaStream.js.map +1 -1
- package/lib/commonjs/MediaStreamError.js +0 -11
- package/lib/commonjs/MediaStreamError.js.map +1 -1
- package/lib/commonjs/MediaStreamErrorEvent.js +0 -9
- package/lib/commonjs/MediaStreamErrorEvent.js.map +1 -1
- package/lib/commonjs/MediaStreamEvent.js +0 -9
- package/lib/commonjs/MediaStreamEvent.js.map +1 -1
- package/lib/commonjs/MediaStreamTrack.js +6 -65
- package/lib/commonjs/MediaStreamTrack.js.map +1 -1
- package/lib/commonjs/MediaStreamTrackEvent.js +0 -9
- package/lib/commonjs/MediaStreamTrackEvent.js.map +1 -1
- package/lib/commonjs/MessageEvent.js +0 -9
- package/lib/commonjs/MessageEvent.js.map +1 -1
- package/lib/commonjs/Permissions.js +19 -29
- package/lib/commonjs/Permissions.js.map +1 -1
- package/lib/commonjs/RTCDataChannel.js +8 -71
- package/lib/commonjs/RTCDataChannel.js.map +1 -1
- package/lib/commonjs/RTCDataChannelEvent.js +0 -9
- package/lib/commonjs/RTCDataChannelEvent.js.map +1 -1
- package/lib/commonjs/RTCErrorEvent.js +0 -12
- package/lib/commonjs/RTCErrorEvent.js.map +1 -1
- package/lib/commonjs/RTCEvent.js +0 -7
- package/lib/commonjs/RTCEvent.js.map +1 -1
- package/lib/commonjs/RTCIceCandidate.js +0 -14
- package/lib/commonjs/RTCIceCandidate.js.map +1 -1
- package/lib/commonjs/RTCIceCandidateEvent.js +1 -12
- package/lib/commonjs/RTCIceCandidateEvent.js.map +1 -1
- package/lib/commonjs/RTCPeerConnection.js +100 -225
- package/lib/commonjs/RTCPeerConnection.js.map +1 -1
- package/lib/commonjs/RTCRtcpParameters.js +0 -10
- package/lib/commonjs/RTCRtcpParameters.js.map +1 -1
- package/lib/commonjs/RTCRtpCapabilities.js +5 -22
- package/lib/commonjs/RTCRtpCapabilities.js.map +1 -1
- package/lib/commonjs/RTCRtpCodecCapability.js +0 -8
- package/lib/commonjs/RTCRtpCodecCapability.js.map +1 -1
- package/lib/commonjs/RTCRtpCodecParameters.js +0 -19
- package/lib/commonjs/RTCRtpCodecParameters.js.map +1 -1
- package/lib/commonjs/RTCRtpEncodingParameters.js +4 -34
- package/lib/commonjs/RTCRtpEncodingParameters.js.map +1 -1
- package/lib/commonjs/RTCRtpHeaderExtension.js +0 -12
- package/lib/commonjs/RTCRtpHeaderExtension.js.map +1 -1
- package/lib/commonjs/RTCRtpParameters.js +2 -18
- package/lib/commonjs/RTCRtpParameters.js.map +1 -1
- package/lib/commonjs/RTCRtpReceiveParameters.js +0 -5
- package/lib/commonjs/RTCRtpReceiveParameters.js.map +1 -1
- package/lib/commonjs/RTCRtpReceiver.js +1 -26
- package/lib/commonjs/RTCRtpReceiver.js.map +1 -1
- package/lib/commonjs/RTCRtpSendParameters.js +0 -22
- package/lib/commonjs/RTCRtpSendParameters.js.map +1 -1
- package/lib/commonjs/RTCRtpSender.js +1 -30
- package/lib/commonjs/RTCRtpSender.js.map +1 -1
- package/lib/commonjs/RTCRtpTransceiver.js +3 -38
- package/lib/commonjs/RTCRtpTransceiver.js.map +1 -1
- package/lib/commonjs/RTCSessionDescription.js +0 -13
- package/lib/commonjs/RTCSessionDescription.js.map +1 -1
- package/lib/commonjs/RTCTrackEvent.js +1 -15
- package/lib/commonjs/RTCTrackEvent.js.map +1 -1
- package/lib/commonjs/RTCUtil.js +9 -36
- package/lib/commonjs/RTCUtil.js.map +1 -1
- package/lib/commonjs/RTCView.js +6 -3
- package/lib/commonjs/RTCView.js.map +1 -1
- package/lib/commonjs/ScreenCapturePickerView.js +0 -3
- package/lib/commonjs/ScreenCapturePickerView.js.map +1 -1
- package/lib/commonjs/getDisplayMedia.js +0 -6
- package/lib/commonjs/getDisplayMedia.js.map +1 -1
- package/lib/commonjs/getUserMedia.js +7 -28
- package/lib/commonjs/getUserMedia.js.map +1 -1
- package/lib/commonjs/index.js +1 -26
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/EventEmitter.js +5 -12
- package/lib/module/EventEmitter.js.map +1 -1
- package/lib/module/Logger.js +2 -22
- package/lib/module/Logger.js.map +1 -1
- package/lib/module/MediaDevices.js +2 -7
- package/lib/module/MediaDevices.js.map +1 -1
- package/lib/module/MediaStream.js +7 -35
- package/lib/module/MediaStream.js.map +1 -1
- package/lib/module/MediaStreamError.js +0 -9
- package/lib/module/MediaStreamError.js.map +1 -1
- package/lib/module/MediaStreamErrorEvent.js +0 -7
- package/lib/module/MediaStreamErrorEvent.js.map +1 -1
- package/lib/module/MediaStreamEvent.js +0 -7
- package/lib/module/MediaStreamEvent.js.map +1 -1
- package/lib/module/MediaStreamTrack.js +6 -58
- package/lib/module/MediaStreamTrack.js.map +1 -1
- package/lib/module/MediaStreamTrackEvent.js +0 -7
- package/lib/module/MediaStreamTrackEvent.js.map +1 -1
- package/lib/module/MessageEvent.js +0 -7
- package/lib/module/MessageEvent.js.map +1 -1
- package/lib/module/Permissions.js +19 -26
- package/lib/module/Permissions.js.map +1 -1
- package/lib/module/RTCDataChannel.js +8 -59
- package/lib/module/RTCDataChannel.js.map +1 -1
- package/lib/module/RTCDataChannelEvent.js +0 -7
- package/lib/module/RTCDataChannelEvent.js.map +1 -1
- package/lib/module/RTCErrorEvent.js +0 -9
- package/lib/module/RTCErrorEvent.js.map +1 -1
- package/lib/module/RTCEvent.js +0 -5
- package/lib/module/RTCEvent.js.map +1 -1
- package/lib/module/RTCIceCandidate.js +0 -12
- package/lib/module/RTCIceCandidate.js.map +1 -1
- package/lib/module/RTCIceCandidateEvent.js +1 -10
- package/lib/module/RTCIceCandidateEvent.js.map +1 -1
- package/lib/module/RTCPeerConnection.js +100 -199
- package/lib/module/RTCPeerConnection.js.map +1 -1
- package/lib/module/RTCRtcpParameters.js +0 -8
- package/lib/module/RTCRtcpParameters.js.map +1 -1
- package/lib/module/RTCRtpCapabilities.js +5 -17
- package/lib/module/RTCRtpCapabilities.js.map +1 -1
- package/lib/module/RTCRtpCodecCapability.js +0 -6
- package/lib/module/RTCRtpCodecCapability.js.map +1 -1
- package/lib/module/RTCRtpCodecParameters.js +0 -17
- package/lib/module/RTCRtpCodecParameters.js.map +1 -1
- package/lib/module/RTCRtpEncodingParameters.js +4 -32
- package/lib/module/RTCRtpEncodingParameters.js.map +1 -1
- package/lib/module/RTCRtpHeaderExtension.js +0 -10
- package/lib/module/RTCRtpHeaderExtension.js.map +1 -1
- package/lib/module/RTCRtpParameters.js +2 -12
- package/lib/module/RTCRtpParameters.js.map +1 -1
- package/lib/module/RTCRtpReceiveParameters.js +0 -1
- package/lib/module/RTCRtpReceiveParameters.js.map +1 -1
- package/lib/module/RTCRtpReceiver.js +1 -19
- package/lib/module/RTCRtpReceiver.js.map +1 -1
- package/lib/module/RTCRtpSendParameters.js +0 -18
- package/lib/module/RTCRtpSendParameters.js.map +1 -1
- package/lib/module/RTCRtpSender.js +1 -23
- package/lib/module/RTCRtpSender.js.map +1 -1
- package/lib/module/RTCRtpTransceiver.js +3 -34
- package/lib/module/RTCRtpTransceiver.js.map +1 -1
- package/lib/module/RTCSessionDescription.js +0 -11
- package/lib/module/RTCSessionDescription.js.map +1 -1
- package/lib/module/RTCTrackEvent.js +1 -13
- package/lib/module/RTCTrackEvent.js.map +1 -1
- package/lib/module/RTCUtil.js +9 -32
- package/lib/module/RTCUtil.js.map +1 -1
- package/lib/module/RTCView.js +1 -0
- package/lib/module/RTCView.js.map +1 -1
- package/lib/module/ScreenCapturePickerView.js.map +1 -1
- package/lib/module/getDisplayMedia.js.map +1 -1
- package/lib/module/getUserMedia.js +7 -18
- package/lib/module/getUserMedia.js.map +1 -1
- package/lib/module/index.js +2 -7
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/EventEmitter.d.ts +3 -2
- package/lib/typescript/EventEmitter.d.ts.map +1 -0
- package/lib/typescript/Logger.d.ts +1 -0
- package/lib/typescript/Logger.d.ts.map +1 -0
- package/lib/typescript/MediaDevices.d.ts +1 -0
- package/lib/typescript/MediaDevices.d.ts.map +1 -0
- package/lib/typescript/MediaStream.d.ts +1 -0
- package/lib/typescript/MediaStream.d.ts.map +1 -0
- package/lib/typescript/MediaStreamError.d.ts +1 -0
- package/lib/typescript/MediaStreamError.d.ts.map +1 -0
- package/lib/typescript/MediaStreamErrorEvent.d.ts +1 -0
- package/lib/typescript/MediaStreamErrorEvent.d.ts.map +1 -0
- package/lib/typescript/MediaStreamEvent.d.ts +1 -0
- package/lib/typescript/MediaStreamEvent.d.ts.map +1 -0
- package/lib/typescript/MediaStreamTrack.d.ts +2 -1
- package/lib/typescript/MediaStreamTrack.d.ts.map +1 -0
- package/lib/typescript/MediaStreamTrackEvent.d.ts +1 -0
- package/lib/typescript/MediaStreamTrackEvent.d.ts.map +1 -0
- package/lib/typescript/MessageEvent.d.ts +2 -1
- package/lib/typescript/MessageEvent.d.ts.map +1 -0
- package/lib/typescript/Permissions.d.ts +2 -1
- package/lib/typescript/Permissions.d.ts.map +1 -0
- package/lib/typescript/RTCDataChannel.d.ts +2 -1
- package/lib/typescript/RTCDataChannel.d.ts.map +1 -0
- package/lib/typescript/RTCDataChannelEvent.d.ts +1 -0
- package/lib/typescript/RTCDataChannelEvent.d.ts.map +1 -0
- package/lib/typescript/RTCErrorEvent.d.ts +2 -1
- package/lib/typescript/RTCErrorEvent.d.ts.map +1 -0
- package/lib/typescript/RTCEvent.d.ts +1 -0
- package/lib/typescript/RTCEvent.d.ts.map +1 -0
- package/lib/typescript/RTCIceCandidate.d.ts +1 -0
- package/lib/typescript/RTCIceCandidate.d.ts.map +1 -0
- package/lib/typescript/RTCIceCandidateEvent.d.ts +1 -0
- package/lib/typescript/RTCIceCandidateEvent.d.ts.map +1 -0
- package/lib/typescript/RTCPeerConnection.d.ts +6 -5
- package/lib/typescript/RTCPeerConnection.d.ts.map +1 -0
- package/lib/typescript/RTCRtcpParameters.d.ts +1 -0
- package/lib/typescript/RTCRtcpParameters.d.ts.map +1 -0
- package/lib/typescript/RTCRtpCapabilities.d.ts +1 -0
- package/lib/typescript/RTCRtpCapabilities.d.ts.map +1 -0
- package/lib/typescript/RTCRtpCodecCapability.d.ts +1 -0
- package/lib/typescript/RTCRtpCodecCapability.d.ts.map +1 -0
- package/lib/typescript/RTCRtpCodecParameters.d.ts +1 -0
- package/lib/typescript/RTCRtpCodecParameters.d.ts.map +1 -0
- package/lib/typescript/RTCRtpEncodingParameters.d.ts +1 -0
- package/lib/typescript/RTCRtpEncodingParameters.d.ts.map +1 -0
- package/lib/typescript/RTCRtpHeaderExtension.d.ts +1 -0
- package/lib/typescript/RTCRtpHeaderExtension.d.ts.map +1 -0
- package/lib/typescript/RTCRtpParameters.d.ts +1 -0
- package/lib/typescript/RTCRtpParameters.d.ts.map +1 -0
- package/lib/typescript/RTCRtpReceiveParameters.d.ts +1 -0
- package/lib/typescript/RTCRtpReceiveParameters.d.ts.map +1 -0
- package/lib/typescript/RTCRtpReceiver.d.ts +1 -0
- package/lib/typescript/RTCRtpReceiver.d.ts.map +1 -0
- package/lib/typescript/RTCRtpSendParameters.d.ts +2 -1
- package/lib/typescript/RTCRtpSendParameters.d.ts.map +1 -0
- package/lib/typescript/RTCRtpSender.d.ts +1 -0
- package/lib/typescript/RTCRtpSender.d.ts.map +1 -0
- package/lib/typescript/RTCRtpTransceiver.d.ts +1 -0
- package/lib/typescript/RTCRtpTransceiver.d.ts.map +1 -0
- package/lib/typescript/RTCSessionDescription.d.ts +1 -0
- package/lib/typescript/RTCSessionDescription.d.ts.map +1 -0
- package/lib/typescript/RTCTrackEvent.d.ts +1 -0
- package/lib/typescript/RTCTrackEvent.d.ts.map +1 -0
- package/lib/typescript/RTCUtil.d.ts +1 -0
- package/lib/typescript/RTCUtil.d.ts.map +1 -0
- package/lib/typescript/RTCView.d.ts +1 -0
- package/lib/typescript/RTCView.d.ts.map +1 -0
- package/lib/typescript/ScreenCapturePickerView.d.ts +1 -0
- package/lib/typescript/ScreenCapturePickerView.d.ts.map +1 -0
- package/lib/typescript/getDisplayMedia.d.ts +1 -0
- package/lib/typescript/getDisplayMedia.d.ts.map +1 -0
- package/lib/typescript/getUserMedia.d.ts +1 -0
- package/lib/typescript/getUserMedia.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/package.json +2 -4
- package/src/RTCPeerConnection.ts +4 -1
- package/src/index.ts +1 -2
|
@@ -4,36 +4,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _RTCRtcpParameters = _interopRequireDefault(require("./RTCRtcpParameters"));
|
|
9
|
-
|
|
10
8
|
var _RTCRtpCodecParameters = _interopRequireDefault(require("./RTCRtpCodecParameters"));
|
|
11
|
-
|
|
12
9
|
var _RTCRtpHeaderExtension = _interopRequireDefault(require("./RTCRtpHeaderExtension"));
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
|
|
18
11
|
class RTCRtpParameters {
|
|
12
|
+
codecs = [];
|
|
13
|
+
headerExtensions = [];
|
|
19
14
|
constructor(init) {
|
|
20
|
-
_defineProperty(this, "codecs", []);
|
|
21
|
-
|
|
22
|
-
_defineProperty(this, "headerExtensions", []);
|
|
23
|
-
|
|
24
|
-
_defineProperty(this, "rtcp", void 0);
|
|
25
|
-
|
|
26
15
|
for (const codec of init.codecs) {
|
|
27
16
|
this.codecs.push(new _RTCRtpCodecParameters.default(codec));
|
|
28
17
|
}
|
|
29
|
-
|
|
30
18
|
for (const ext of init.headerExtensions) {
|
|
31
19
|
this.headerExtensions.push(new _RTCRtpHeaderExtension.default(ext));
|
|
32
20
|
}
|
|
33
|
-
|
|
34
21
|
this.rtcp = new _RTCRtcpParameters.default(init.rtcp);
|
|
35
22
|
}
|
|
36
|
-
|
|
37
23
|
toJSON() {
|
|
38
24
|
return {
|
|
39
25
|
codecs: this.codecs.map(c => c.toJSON()),
|
|
@@ -41,8 +27,6 @@ class RTCRtpParameters {
|
|
|
41
27
|
rtcp: this.rtcp.toJSON()
|
|
42
28
|
};
|
|
43
29
|
}
|
|
44
|
-
|
|
45
30
|
}
|
|
46
|
-
|
|
47
31
|
exports.default = RTCRtpParameters;
|
|
48
32
|
//# sourceMappingURL=RTCRtpParameters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_RTCRtcpParameters","_interopRequireDefault","require","_RTCRtpCodecParameters","_RTCRtpHeaderExtension","obj","__esModule","default","RTCRtpParameters","codecs","headerExtensions","constructor","init","codec","push","RTCRtpCodecParameters","ext","RTCRtpHeaderExtension","rtcp","RTCRtcpParameters","toJSON","map","c","he","exports"],"sourceRoot":"../../src","sources":["RTCRtpParameters.ts"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,sBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA2F,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAS5E,MAAMG,gBAAgB,CAAC;EACzBC,MAAM,GAA4B,EAAE;EACpCC,gBAAgB,GAA4B,EAAE;EAGvDC,WAAWA,CAACC,IAA0B,EAAE;IACpC,KAAK,MAAMC,KAAK,IAAID,IAAI,CAACH,MAAM,EAAE;MAC7B,IAAI,CAACA,MAAM,CAACK,IAAI,CAAC,IAAIC,8BAAqB,CAACF,KAAK,CAAC,CAAC;IACtD;IAEA,KAAK,MAAMG,GAAG,IAAIJ,IAAI,CAACF,gBAAgB,EAAE;MACrC,IAAI,CAACA,gBAAgB,CAACI,IAAI,CAAC,IAAIG,8BAAqB,CAACD,GAAG,CAAC,CAAC;IAC9D;IAEA,IAAI,CAACE,IAAI,GAAG,IAAIC,0BAAiB,CAACP,IAAI,CAACM,IAAI,CAAC;EAChD;EAEAE,MAAMA,CAAA,EAAyB;IAC3B,OAAO;MACHX,MAAM,EAAE,IAAI,CAACA,MAAM,CAACY,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACF,MAAM,CAAC,CAAC,CAAC;MACxCV,gBAAgB,EAAE,IAAI,CAACA,gBAAgB,CAACW,GAAG,CAACE,EAAE,IAAIA,EAAE,CAACH,MAAM,CAAC,CAAC,CAAC;MAC9DF,IAAI,EAAE,IAAI,CAACA,IAAI,CAACE,MAAM,CAAC;IAC3B,CAAC;EACL;AACJ;AAACI,OAAA,CAAAjB,OAAA,GAAAC,gBAAA"}
|
|
@@ -4,17 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _RTCRtpParameters = _interopRequireDefault(require("./RTCRtpParameters"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
9
|
class RTCRtpReceiveParameters extends _RTCRtpParameters.default {
|
|
13
10
|
constructor(init) {
|
|
14
11
|
super(init);
|
|
15
12
|
}
|
|
16
|
-
|
|
17
13
|
}
|
|
18
|
-
|
|
19
14
|
exports.default = RTCRtpReceiveParameters;
|
|
20
15
|
//# sourceMappingURL=RTCRtpReceiveParameters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_RTCRtpParameters","_interopRequireDefault","require","obj","__esModule","default","RTCRtpReceiveParameters","RTCRtpParameters","constructor","init","exports"],"sourceRoot":"../../src","sources":["RTCRtpReceiveParameters.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4E,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE7D,MAAMG,uBAAuB,SAASC,yBAAgB,CAAC;EAClEC,WAAWA,CAACC,IAA0B,EAAE;IACpC,KAAK,CAACA,IAAI,CAAC;EACf;AACJ;AAACC,OAAA,CAAAL,OAAA,GAAAC,uBAAA"}
|
|
@@ -4,52 +4,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
8
|
var _RTCRtpCapabilities = require("./RTCRtpCapabilities");
|
|
11
|
-
|
|
12
9
|
var _RTCRtpReceiveParameters = _interopRequireDefault(require("./RTCRtpReceiveParameters"));
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
|
|
18
11
|
const {
|
|
19
12
|
WebRTCModule
|
|
20
13
|
} = _reactNative.NativeModules;
|
|
21
|
-
|
|
22
14
|
class RTCRtpReceiver {
|
|
15
|
+
_track = null;
|
|
23
16
|
constructor(info) {
|
|
24
|
-
_defineProperty(this, "_id", void 0);
|
|
25
|
-
|
|
26
|
-
_defineProperty(this, "_peerConnectionId", void 0);
|
|
27
|
-
|
|
28
|
-
_defineProperty(this, "_track", null);
|
|
29
|
-
|
|
30
|
-
_defineProperty(this, "_rtpParameters", void 0);
|
|
31
|
-
|
|
32
17
|
this._id = info.id;
|
|
33
18
|
this._peerConnectionId = info.peerConnectionId;
|
|
34
19
|
this._rtpParameters = new _RTCRtpReceiveParameters.default(info.rtpParameters);
|
|
35
|
-
|
|
36
20
|
if (info.track) {
|
|
37
21
|
this._track = info.track;
|
|
38
22
|
}
|
|
39
23
|
}
|
|
40
|
-
|
|
41
24
|
static getCapabilities(kind) {
|
|
42
25
|
if (kind === 'audio') {
|
|
43
26
|
return _RTCRtpCapabilities.DEFAULT_AUDIO_CAPABILITIES;
|
|
44
27
|
}
|
|
45
|
-
|
|
46
28
|
if (!_RTCRtpCapabilities.receiverCapabilities) {
|
|
47
29
|
throw new Error('Receiver Capabilities is null');
|
|
48
30
|
}
|
|
49
|
-
|
|
50
31
|
return _RTCRtpCapabilities.receiverCapabilities;
|
|
51
32
|
}
|
|
52
|
-
|
|
53
33
|
getStats() {
|
|
54
34
|
return WebRTCModule.receiverGetStats(this._peerConnectionId, this._id).then(data =>
|
|
55
35
|
/* On both Android and iOS it is faster to construct a single
|
|
@@ -62,20 +42,15 @@ class RTCRtpReceiver {
|
|
|
62
42
|
*/
|
|
63
43
|
new Map(JSON.parse(data)));
|
|
64
44
|
}
|
|
65
|
-
|
|
66
45
|
getParameters() {
|
|
67
46
|
return this._rtpParameters;
|
|
68
47
|
}
|
|
69
|
-
|
|
70
48
|
get id() {
|
|
71
49
|
return this._id;
|
|
72
50
|
}
|
|
73
|
-
|
|
74
51
|
get track() {
|
|
75
52
|
return this._track;
|
|
76
53
|
}
|
|
77
|
-
|
|
78
54
|
}
|
|
79
|
-
|
|
80
55
|
exports.default = RTCRtpReceiver;
|
|
81
56
|
//# sourceMappingURL=RTCRtpReceiver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_RTCRtpCapabilities","_RTCRtpReceiveParameters","_interopRequireDefault","obj","__esModule","default","WebRTCModule","NativeModules","RTCRtpReceiver","_track","constructor","info","_id","id","_peerConnectionId","peerConnectionId","_rtpParameters","RTCRtpReceiveParameters","rtpParameters","track","getCapabilities","kind","DEFAULT_AUDIO_CAPABILITIES","receiverCapabilities","Error","getStats","receiverGetStats","then","data","Map","JSON","parse","getParameters","exports"],"sourceRoot":"../../src","sources":["RTCRtpReceiver.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,mBAAA,GAAAD,OAAA;AAEA,IAAAE,wBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAgE,SAAAG,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhE,MAAM;EAAEG;AAAa,CAAC,GAAGC,0BAAa;AAEvB,MAAMC,cAAc,CAAC;EAGhCC,MAAM,GAA4B,IAAI;EAGtCC,WAAWA,CAACC,IAKX,EAAE;IACC,IAAI,CAACC,GAAG,GAAGD,IAAI,CAACE,EAAE;IAClB,IAAI,CAACC,iBAAiB,GAAGH,IAAI,CAACI,gBAAgB;IAC9C,IAAI,CAACC,cAAc,GAAG,IAAIC,gCAAuB,CAACN,IAAI,CAACO,aAAa,CAAC;IAErE,IAAIP,IAAI,CAACQ,KAAK,EAAE;MACZ,IAAI,CAACV,MAAM,GAAGE,IAAI,CAACQ,KAAK;IAC5B;EACJ;EAEA,OAAOC,eAAeA,CAACC,IAAuB,EAAsB;IAChE,IAAIA,IAAI,KAAK,OAAO,EAAE;MAClB,OAAOC,8CAA0B;IACrC;IAEA,IAAI,CAACC,wCAAoB,EAAE;MACvB,MAAM,IAAIC,KAAK,CAAC,+BAA+B,CAAC;IACpD;IAEA,OAAOD,wCAAoB;EAC/B;EAEAE,QAAQA,CAAA,EAAG;IACP,OAAOnB,YAAY,CAACoB,gBAAgB,CAAC,IAAI,CAACZ,iBAAiB,EAAE,IAAI,CAACF,GAAG,CAAC,CAACe,IAAI,CAACC,IAAI;IAC5E;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;IACY,IAAIC,GAAG,CAACC,IAAI,CAACC,KAAK,CAACH,IAAI,CAAC,CAC5B,CAAC;EACL;EAEAI,aAAaA,CAAA,EAA4B;IACrC,OAAO,IAAI,CAAChB,cAAc;EAC9B;EAEA,IAAIH,EAAEA,CAAA,EAAG;IACL,OAAO,IAAI,CAACD,GAAG;EACnB;EAEA,IAAIO,KAAKA,CAAA,EAAG;IACR,OAAO,IAAI,CAACV,MAAM;EACtB;AACJ;AAACwB,OAAA,CAAA5B,OAAA,GAAAG,cAAA"}
|
|
@@ -4,15 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _RTCRtpEncodingParameters = _interopRequireDefault(require("./RTCRtpEncodingParameters"));
|
|
9
|
-
|
|
10
8
|
var _RTCRtpParameters = _interopRequireDefault(require("./RTCRtpParameters"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
|
|
16
10
|
/**
|
|
17
11
|
* Class to convert degradation preference format. Native has a format such as
|
|
18
12
|
* MAINTAIN_FRAMERATE whereas the web APIs expect maintain-framerate
|
|
@@ -22,45 +16,29 @@ class DegradationPreference {
|
|
|
22
16
|
const stringFormat = nativeFormat.toLowerCase().replace('_', '-');
|
|
23
17
|
return stringFormat;
|
|
24
18
|
}
|
|
25
|
-
|
|
26
19
|
static toNative(format) {
|
|
27
20
|
return format.toUpperCase().replace('-', '_');
|
|
28
21
|
}
|
|
29
|
-
|
|
30
22
|
}
|
|
31
|
-
|
|
32
23
|
class RTCRtpSendParameters extends _RTCRtpParameters.default {
|
|
33
24
|
constructor(init) {
|
|
34
25
|
super(init);
|
|
35
|
-
|
|
36
|
-
_defineProperty(this, "transactionId", void 0);
|
|
37
|
-
|
|
38
|
-
_defineProperty(this, "encodings", void 0);
|
|
39
|
-
|
|
40
|
-
_defineProperty(this, "degradationPreference", void 0);
|
|
41
|
-
|
|
42
26
|
this.transactionId = init.transactionId;
|
|
43
27
|
this.encodings = [];
|
|
44
28
|
this.degradationPreference = init.degradationPreference ? DegradationPreference.fromNative(init.degradationPreference) : null;
|
|
45
|
-
|
|
46
29
|
for (const enc of init.encodings) {
|
|
47
30
|
this.encodings.push(new _RTCRtpEncodingParameters.default(enc));
|
|
48
31
|
}
|
|
49
32
|
}
|
|
50
|
-
|
|
51
33
|
toJSON() {
|
|
52
34
|
const obj = super.toJSON();
|
|
53
35
|
obj['transactionId'] = this.transactionId;
|
|
54
36
|
obj['encodings'] = this.encodings.map(e => e.toJSON());
|
|
55
|
-
|
|
56
37
|
if (this.degradationPreference !== null) {
|
|
57
38
|
obj['degradationPreference'] = DegradationPreference.toNative(this.degradationPreference);
|
|
58
39
|
}
|
|
59
|
-
|
|
60
40
|
return obj;
|
|
61
41
|
}
|
|
62
|
-
|
|
63
42
|
}
|
|
64
|
-
|
|
65
43
|
exports.default = RTCRtpSendParameters;
|
|
66
44
|
//# sourceMappingURL=RTCRtpSendParameters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_RTCRtpEncodingParameters","_interopRequireDefault","require","_RTCRtpParameters","obj","__esModule","default","DegradationPreference","fromNative","nativeFormat","stringFormat","toLowerCase","replace","toNative","format","toUpperCase","RTCRtpSendParameters","RTCRtpParameters","constructor","init","transactionId","encodings","degradationPreference","enc","push","RTCRtpEncodingParameters","toJSON","map","e","exports"],"sourceRoot":"../../src","sources":["RTCRtpSendParameters.ts"],"mappings":";;;;;;AAAA,IAAAA,yBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA4E,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAQ5E;AACA;AACA;AACA;AACA,MAAMG,qBAAqB,CAAC;EACxB,OAAOC,UAAUA,CAACC,YAAoB,EAA6B;IAC/D,MAAMC,YAAY,GAAGD,YAAY,CAACE,WAAW,CAAC,CAAC,CAACC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;IAEjE,OAAOF,YAAY;EACvB;EAEA,OAAOG,QAAQA,CAACC,MAAiC,EAAU;IACvD,OAAOA,MAAM,CAACC,WAAW,CAAC,CAAC,CAACH,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC;EACjD;AACJ;AAQe,MAAMI,oBAAoB,SAASC,yBAAgB,CAAC;EAK/DC,WAAWA,CAACC,IAA8B,EAAE;IACxC,KAAK,CAACA,IAAI,CAAC;IAEX,IAAI,CAACC,aAAa,GAAGD,IAAI,CAACC,aAAa;IACvC,IAAI,CAACC,SAAS,GAAG,EAAE;IACnB,IAAI,CAACC,qBAAqB,GAAGH,IAAI,CAACG,qBAAqB,GACnDf,qBAAqB,CAACC,UAAU,CAACW,IAAI,CAACG,qBAAqB,CAAC,GAAG,IAAI;IAEvE,KAAK,MAAMC,GAAG,IAAIJ,IAAI,CAACE,SAAS,EAAE;MAC9B,IAAI,CAACA,SAAS,CAACG,IAAI,CAAC,IAAIC,iCAAwB,CAACF,GAAG,CAAC,CAAC;IAC1D;EACJ;EAEAG,MAAMA,CAAA,EAA6B;IAC/B,MAAMtB,GAAG,GAAG,KAAK,CAACsB,MAAM,CAAC,CAAC;IAE1BtB,GAAG,CAAC,eAAe,CAAC,GAAG,IAAI,CAACgB,aAAa;IAEzChB,GAAG,CAAC,WAAW,CAAC,GAAG,IAAI,CAACiB,SAAS,CAACM,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACF,MAAM,CAAC,CAAC,CAAC;IAEtD,IAAI,IAAI,CAACJ,qBAAqB,KAAK,IAAI,EAAE;MACrClB,GAAG,CAAC,uBAAuB,CAAC,GAAGG,qBAAqB,CAACM,QAAQ,CAAC,IAAI,CAACS,qBAAqB,CAAC;IAC7F;IAEA,OAAOlB,GAAG;EACd;AACJ;AAACyB,OAAA,CAAAvB,OAAA,GAAAU,oBAAA"}
|
|
@@ -4,74 +4,49 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
8
|
var _RTCRtpCapabilities = require("./RTCRtpCapabilities");
|
|
11
|
-
|
|
12
9
|
var _RTCRtpSendParameters = _interopRequireDefault(require("./RTCRtpSendParameters"));
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
|
|
18
11
|
const {
|
|
19
12
|
WebRTCModule
|
|
20
13
|
} = _reactNative.NativeModules;
|
|
21
|
-
|
|
22
14
|
class RTCRtpSender {
|
|
15
|
+
_track = null;
|
|
23
16
|
constructor(info) {
|
|
24
|
-
_defineProperty(this, "_id", void 0);
|
|
25
|
-
|
|
26
|
-
_defineProperty(this, "_track", null);
|
|
27
|
-
|
|
28
|
-
_defineProperty(this, "_peerConnectionId", void 0);
|
|
29
|
-
|
|
30
|
-
_defineProperty(this, "_rtpParameters", void 0);
|
|
31
|
-
|
|
32
17
|
this._peerConnectionId = info.peerConnectionId;
|
|
33
18
|
this._id = info.id;
|
|
34
19
|
this._rtpParameters = new _RTCRtpSendParameters.default(info.rtpParameters);
|
|
35
|
-
|
|
36
20
|
if (info.track) {
|
|
37
21
|
this._track = info.track;
|
|
38
22
|
}
|
|
39
23
|
}
|
|
40
|
-
|
|
41
24
|
async replaceTrack(track) {
|
|
42
25
|
try {
|
|
43
26
|
await WebRTCModule.senderReplaceTrack(this._peerConnectionId, this._id, track ? track.id : null);
|
|
44
27
|
} catch (e) {
|
|
45
28
|
return;
|
|
46
29
|
}
|
|
47
|
-
|
|
48
30
|
this._track = track;
|
|
49
31
|
}
|
|
50
|
-
|
|
51
32
|
static getCapabilities(kind) {
|
|
52
33
|
if (kind === 'audio') {
|
|
53
34
|
return _RTCRtpCapabilities.DEFAULT_AUDIO_CAPABILITIES;
|
|
54
35
|
}
|
|
55
|
-
|
|
56
36
|
if (!_RTCRtpCapabilities.senderCapabilities) {
|
|
57
37
|
throw new Error('sender Capabilities are null');
|
|
58
38
|
}
|
|
59
|
-
|
|
60
39
|
return _RTCRtpCapabilities.senderCapabilities;
|
|
61
40
|
}
|
|
62
|
-
|
|
63
41
|
getParameters() {
|
|
64
42
|
return this._rtpParameters;
|
|
65
43
|
}
|
|
66
|
-
|
|
67
44
|
async setParameters(parameters) {
|
|
68
45
|
// This allows us to get rid of private "underscore properties"
|
|
69
46
|
const _params = JSON.parse(JSON.stringify(parameters));
|
|
70
|
-
|
|
71
47
|
const newParameters = await WebRTCModule.senderSetParameters(this._peerConnectionId, this._id, _params);
|
|
72
48
|
this._rtpParameters = new _RTCRtpSendParameters.default(newParameters);
|
|
73
49
|
}
|
|
74
|
-
|
|
75
50
|
getStats() {
|
|
76
51
|
return WebRTCModule.senderGetStats(this._peerConnectionId, this._id).then(data =>
|
|
77
52
|
/* On both Android and iOS it is faster to construct a single
|
|
@@ -84,16 +59,12 @@ class RTCRtpSender {
|
|
|
84
59
|
*/
|
|
85
60
|
new Map(JSON.parse(data)));
|
|
86
61
|
}
|
|
87
|
-
|
|
88
62
|
get track() {
|
|
89
63
|
return this._track;
|
|
90
64
|
}
|
|
91
|
-
|
|
92
65
|
get id() {
|
|
93
66
|
return this._id;
|
|
94
67
|
}
|
|
95
|
-
|
|
96
68
|
}
|
|
97
|
-
|
|
98
69
|
exports.default = RTCRtpSender;
|
|
99
70
|
//# sourceMappingURL=RTCRtpSender.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_RTCRtpCapabilities","_RTCRtpSendParameters","_interopRequireDefault","obj","__esModule","default","WebRTCModule","NativeModules","RTCRtpSender","_track","constructor","info","_peerConnectionId","peerConnectionId","_id","id","_rtpParameters","RTCRtpSendParameters","rtpParameters","track","replaceTrack","senderReplaceTrack","e","getCapabilities","kind","DEFAULT_AUDIO_CAPABILITIES","senderCapabilities","Error","getParameters","setParameters","parameters","_params","JSON","parse","stringify","newParameters","senderSetParameters","getStats","senderGetStats","then","data","Map","exports"],"sourceRoot":"../../src","sources":["RTCRtpSender.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAwF,SAAAG,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAExF,MAAM;EAAEG;AAAa,CAAC,GAAGC,0BAAa;AAGvB,MAAMC,YAAY,CAAC;EAE9BC,MAAM,GAA4B,IAAI;EAItCC,WAAWA,CAACC,IAKX,EAAE;IACC,IAAI,CAACC,iBAAiB,GAAGD,IAAI,CAACE,gBAAgB;IAC9C,IAAI,CAACC,GAAG,GAAGH,IAAI,CAACI,EAAE;IAClB,IAAI,CAACC,cAAc,GAAG,IAAIC,6BAAoB,CAACN,IAAI,CAACO,aAAa,CAAC;IAElE,IAAIP,IAAI,CAACQ,KAAK,EAAE;MACZ,IAAI,CAACV,MAAM,GAAGE,IAAI,CAACQ,KAAK;IAC5B;EACJ;EAEA,MAAMC,YAAYA,CAACD,KAA8B,EAAiB;IAC9D,IAAI;MACA,MAAMb,YAAY,CAACe,kBAAkB,CAAC,IAAI,CAACT,iBAAiB,EAAE,IAAI,CAACE,GAAG,EAAEK,KAAK,GAAGA,KAAK,CAACJ,EAAE,GAAG,IAAI,CAAC;IACpG,CAAC,CAAC,OAAOO,CAAC,EAAE;MACR;IACJ;IAEA,IAAI,CAACb,MAAM,GAAGU,KAAK;EACvB;EAEA,OAAOI,eAAeA,CAACC,IAAuB,EAAsB;IAChE,IAAIA,IAAI,KAAK,OAAO,EAAE;MAClB,OAAOC,8CAA0B;IACrC;IAEA,IAAI,CAACC,sCAAkB,EAAE;MACrB,MAAM,IAAIC,KAAK,CAAC,8BAA8B,CAAC;IACnD;IAEA,OAAOD,sCAAkB;EAC7B;EAEAE,aAAaA,CAAA,EAAyB;IAClC,OAAO,IAAI,CAACZ,cAAc;EAC9B;EAEA,MAAMa,aAAaA,CAACC,UAAgC,EAAiB;IACjE;IACA,MAAMC,OAAO,GAAGC,IAAI,CAACC,KAAK,CAACD,IAAI,CAACE,SAAS,CAACJ,UAAU,CAAC,CAAC;IACtD,MAAMK,aAAa,GAAG,MAAM7B,YAAY,CAAC8B,mBAAmB,CAAC,IAAI,CAACxB,iBAAiB,EAAE,IAAI,CAACE,GAAG,EAAEiB,OAAO,CAAC;IAEvG,IAAI,CAACf,cAAc,GAAG,IAAIC,6BAAoB,CAACkB,aAAa,CAAC;EACjE;EAEAE,QAAQA,CAAA,EAAG;IACP,OAAO/B,YAAY,CAACgC,cAAc,CAAC,IAAI,CAAC1B,iBAAiB,EAAE,IAAI,CAACE,GAAG,CAAC,CAACyB,IAAI,CAACC,IAAI;IAC1E;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;IACY,IAAIC,GAAG,CAACT,IAAI,CAACC,KAAK,CAACO,IAAI,CAAC,CAC5B,CAAC;EACL;EAEA,IAAIrB,KAAKA,CAAA,EAAG;IACR,OAAO,IAAI,CAACV,MAAM;EACtB;EAEA,IAAIM,EAAEA,CAAA,EAAG;IACL,OAAO,IAAI,CAACD,GAAG;EACnB;AACJ;AAAC4B,OAAA,CAAArC,OAAA,GAAAG,YAAA"}
|
|
@@ -4,102 +4,67 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _reactNative = require("react-native");
|
|
9
|
-
|
|
10
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
-
|
|
12
8
|
const {
|
|
13
9
|
WebRTCModule
|
|
14
10
|
} = _reactNative.NativeModules;
|
|
15
|
-
|
|
16
11
|
class RTCRtpTransceiver {
|
|
12
|
+
_mid = null;
|
|
17
13
|
constructor(args) {
|
|
18
|
-
var _args$mid, _args$currentDirectio;
|
|
19
|
-
|
|
20
|
-
_defineProperty(this, "_peerConnectionId", void 0);
|
|
21
|
-
|
|
22
|
-
_defineProperty(this, "_sender", void 0);
|
|
23
|
-
|
|
24
|
-
_defineProperty(this, "_receiver", void 0);
|
|
25
|
-
|
|
26
|
-
_defineProperty(this, "_mid", null);
|
|
27
|
-
|
|
28
|
-
_defineProperty(this, "_direction", void 0);
|
|
29
|
-
|
|
30
|
-
_defineProperty(this, "_currentDirection", void 0);
|
|
31
|
-
|
|
32
|
-
_defineProperty(this, "_stopped", void 0);
|
|
33
|
-
|
|
34
14
|
this._peerConnectionId = args.peerConnectionId;
|
|
35
|
-
this._mid =
|
|
15
|
+
this._mid = args.mid ?? null;
|
|
36
16
|
this._direction = args.direction;
|
|
37
|
-
this._currentDirection =
|
|
17
|
+
this._currentDirection = args.currentDirection ?? null;
|
|
38
18
|
this._stopped = Boolean(args.isStopped);
|
|
39
19
|
this._sender = args.sender;
|
|
40
20
|
this._receiver = args.receiver;
|
|
41
21
|
}
|
|
42
|
-
|
|
43
22
|
get mid() {
|
|
44
23
|
return this._mid;
|
|
45
24
|
}
|
|
46
|
-
|
|
47
25
|
get stopped() {
|
|
48
26
|
return this._stopped;
|
|
49
27
|
}
|
|
50
|
-
|
|
51
28
|
get direction() {
|
|
52
29
|
return this._direction;
|
|
53
30
|
}
|
|
54
|
-
|
|
55
31
|
set direction(val) {
|
|
56
32
|
if (!['sendonly', 'recvonly', 'sendrecv', 'inactive'].includes(val)) {
|
|
57
33
|
throw new TypeError('Invalid direction provided');
|
|
58
34
|
}
|
|
59
|
-
|
|
60
35
|
if (this._stopped) {
|
|
61
36
|
throw new Error('Transceiver Stopped');
|
|
62
37
|
}
|
|
63
|
-
|
|
64
38
|
if (this._direction === val) {
|
|
65
39
|
return;
|
|
66
40
|
}
|
|
67
|
-
|
|
68
41
|
const oldDirection = this._direction;
|
|
69
42
|
WebRTCModule.transceiverSetDirection(this._peerConnectionId, this.sender.id, val).catch(() => {
|
|
70
43
|
this._direction = oldDirection;
|
|
71
44
|
});
|
|
72
45
|
this._direction = val;
|
|
73
46
|
}
|
|
74
|
-
|
|
75
47
|
get currentDirection() {
|
|
76
48
|
return this._currentDirection;
|
|
77
49
|
}
|
|
78
|
-
|
|
79
50
|
get sender() {
|
|
80
51
|
return this._sender;
|
|
81
52
|
}
|
|
82
|
-
|
|
83
53
|
get receiver() {
|
|
84
54
|
return this._receiver;
|
|
85
55
|
}
|
|
86
|
-
|
|
87
56
|
stop() {
|
|
88
57
|
if (this._stopped) {
|
|
89
58
|
return;
|
|
90
59
|
}
|
|
91
|
-
|
|
92
60
|
WebRTCModule.transceiverStop(this._peerConnectionId, this.sender.id).then(() => this._setStopped());
|
|
93
61
|
}
|
|
94
|
-
|
|
95
62
|
_setStopped() {
|
|
96
63
|
this._stopped = true;
|
|
97
64
|
this._direction = 'stopped';
|
|
98
65
|
this._currentDirection = 'stopped';
|
|
99
66
|
this._mid = null;
|
|
100
67
|
}
|
|
101
|
-
|
|
102
68
|
}
|
|
103
|
-
|
|
104
69
|
exports.default = RTCRtpTransceiver;
|
|
105
70
|
//# sourceMappingURL=RTCRtpTransceiver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["_reactNative","require","WebRTCModule","NativeModules","RTCRtpTransceiver","_mid","constructor","args","_peerConnectionId","peerConnectionId","mid","_direction","direction","_currentDirection","currentDirection","_stopped","Boolean","isStopped","_sender","sender","_receiver","receiver","stopped","val","includes","TypeError","Error","oldDirection","transceiverSetDirection","id","catch","stop","transceiverStop","then","_setStopped","exports","default"],"sourceRoot":"../../src","sources":["RTCRtpTransceiver.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAKA,MAAM;EAAEC;AAAa,CAAC,GAAGC,0BAAa;AAEvB,MAAMC,iBAAiB,CAAC;EAKnCC,IAAI,GAAkB,IAAI;EAK1BC,WAAWA,CAACC,IAQX,EAAE;IACC,IAAI,CAACC,iBAAiB,GAAGD,IAAI,CAACE,gBAAgB;IAC9C,IAAI,CAACJ,IAAI,GAAGE,IAAI,CAACG,GAAG,IAAI,IAAI;IAC5B,IAAI,CAACC,UAAU,GAAGJ,IAAI,CAACK,SAAS;IAChC,IAAI,CAACC,iBAAiB,GAAGN,IAAI,CAACO,gBAAgB,IAAI,IAAI;IACtD,IAAI,CAACC,QAAQ,GAAGC,OAAO,CAACT,IAAI,CAACU,SAAS,CAAC;IACvC,IAAI,CAACC,OAAO,GAAGX,IAAI,CAACY,MAAM;IAC1B,IAAI,CAACC,SAAS,GAAGb,IAAI,CAACc,QAAQ;EAClC;EAEA,IAAIX,GAAGA,CAAA,EAAG;IACN,OAAO,IAAI,CAACL,IAAI;EACpB;EAEA,IAAIiB,OAAOA,CAAA,EAAG;IACV,OAAO,IAAI,CAACP,QAAQ;EACxB;EAEA,IAAIH,SAASA,CAAA,EAAG;IACZ,OAAO,IAAI,CAACD,UAAU;EAC1B;EAEA,IAAIC,SAASA,CAACW,GAAG,EAAE;IACf,IAAI,CAAC,CAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAE,CAACC,QAAQ,CAACD,GAAG,CAAC,EAAE;MACnE,MAAM,IAAIE,SAAS,CAAC,4BAA4B,CAAC;IACrD;IAEA,IAAI,IAAI,CAACV,QAAQ,EAAE;MACf,MAAM,IAAIW,KAAK,CAAC,qBAAqB,CAAC;IAC1C;IAEA,IAAI,IAAI,CAACf,UAAU,KAAKY,GAAG,EAAE;MACzB;IACJ;IAEA,MAAMI,YAAY,GAAG,IAAI,CAAChB,UAAU;IAEpCT,YAAY,CAAC0B,uBAAuB,CAAC,IAAI,CAACpB,iBAAiB,EAAE,IAAI,CAACW,MAAM,CAACU,EAAE,EAAEN,GAAG,CAAC,CAC5EO,KAAK,CAAC,MAAM;MACT,IAAI,CAACnB,UAAU,GAAGgB,YAAY;IAClC,CAAC,CAAC;IAEN,IAAI,CAAChB,UAAU,GAAGY,GAAG;EACzB;EAEA,IAAIT,gBAAgBA,CAAA,EAAG;IACnB,OAAO,IAAI,CAACD,iBAAiB;EACjC;EAEA,IAAIM,MAAMA,CAAA,EAAG;IACT,OAAO,IAAI,CAACD,OAAO;EACvB;EAEA,IAAIG,QAAQA,CAAA,EAAG;IACX,OAAO,IAAI,CAACD,SAAS;EACzB;EAEAW,IAAIA,CAAA,EAAG;IACH,IAAI,IAAI,CAAChB,QAAQ,EAAE;MACf;IACJ;IAEAb,YAAY,CAAC8B,eAAe,CAAC,IAAI,CAACxB,iBAAiB,EAAE,IAAI,CAACW,MAAM,CAACU,EAAE,CAAC,CAC/DI,IAAI,CAAC,MAAM,IAAI,CAACC,WAAW,CAAC,CAAC,CAAC;EACvC;EAEAA,WAAWA,CAAA,EAAG;IACV,IAAI,CAACnB,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACJ,UAAU,GAAG,SAAS;IAC3B,IAAI,CAACE,iBAAiB,GAAG,SAAS;IAClC,IAAI,CAACR,IAAI,GAAG,IAAI;EACpB;AACJ;AAAC8B,OAAA,CAAAC,OAAA,GAAAhC,iBAAA"}
|
|
@@ -4,40 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
|
|
10
7
|
class RTCSessionDescription {
|
|
11
8
|
constructor() {
|
|
12
9
|
let info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
13
10
|
type: null,
|
|
14
11
|
sdp: ''
|
|
15
12
|
};
|
|
16
|
-
|
|
17
|
-
_defineProperty(this, "_sdp", void 0);
|
|
18
|
-
|
|
19
|
-
_defineProperty(this, "_type", void 0);
|
|
20
|
-
|
|
21
13
|
this._sdp = info.sdp;
|
|
22
14
|
this._type = info.type;
|
|
23
15
|
}
|
|
24
|
-
|
|
25
16
|
get sdp() {
|
|
26
17
|
return this._sdp;
|
|
27
18
|
}
|
|
28
|
-
|
|
29
19
|
get type() {
|
|
30
20
|
return this._type;
|
|
31
21
|
}
|
|
32
|
-
|
|
33
22
|
toJSON() {
|
|
34
23
|
return {
|
|
35
24
|
sdp: this._sdp,
|
|
36
25
|
type: this._type
|
|
37
26
|
};
|
|
38
27
|
}
|
|
39
|
-
|
|
40
28
|
}
|
|
41
|
-
|
|
42
29
|
exports.default = RTCSessionDescription;
|
|
43
30
|
//# sourceMappingURL=RTCSessionDescription.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["RTCSessionDescription","constructor","info","arguments","length","undefined","type","sdp","_sdp","_type","toJSON","exports","default"],"sourceRoot":"../../src","sources":["RTCSessionDescription.ts"],"mappings":";;;;;;AAMe,MAAMA,qBAAqB,CAAC;EAIvCC,WAAWA,CAAA,EAA4D;IAAA,IAA3DC,IAA+B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG;MAAEG,IAAI,EAAE,IAAI;MAAEC,GAAG,EAAE;IAAG,CAAC;IACjE,IAAI,CAACC,IAAI,GAAGN,IAAI,CAACK,GAAG;IACpB,IAAI,CAACE,KAAK,GAAGP,IAAI,CAACI,IAAI;EAC1B;EAEA,IAAIC,GAAGA,CAAA,EAAW;IACd,OAAO,IAAI,CAACC,IAAI;EACpB;EAEA,IAAIF,IAAIA,CAAA,EAAkB;IACtB,OAAO,IAAI,CAACG,KAAK;EACrB;EAEAC,MAAMA,CAAA,EAA8B;IAChC,OAAO;MACHH,GAAG,EAAE,IAAI,CAACC,IAAI;MACdF,IAAI,EAAE,IAAI,CAACG;IACf,CAAC;EACL;AACJ;AAACE,OAAA,CAAAC,OAAA,GAAAZ,qBAAA"}
|
|
@@ -4,29 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
|
|
10
7
|
class RTCTrackEvent {
|
|
8
|
+
streams = [];
|
|
11
9
|
constructor(type, eventInitDict) {
|
|
12
|
-
_defineProperty(this, "type", void 0);
|
|
13
|
-
|
|
14
|
-
_defineProperty(this, "streams", []);
|
|
15
|
-
|
|
16
|
-
_defineProperty(this, "transceiver", void 0);
|
|
17
|
-
|
|
18
|
-
_defineProperty(this, "receiver", void 0);
|
|
19
|
-
|
|
20
|
-
_defineProperty(this, "track", void 0);
|
|
21
|
-
|
|
22
10
|
this.type = type.toString();
|
|
23
11
|
this.streams = eventInitDict.streams;
|
|
24
12
|
this.transceiver = eventInitDict.transceiver;
|
|
25
13
|
this.receiver = eventInitDict.transceiver.receiver;
|
|
26
14
|
this.track = eventInitDict.transceiver.receiver ? eventInitDict.transceiver.receiver.track : null;
|
|
27
15
|
}
|
|
28
|
-
|
|
29
16
|
}
|
|
30
|
-
|
|
31
17
|
exports.default = RTCTrackEvent;
|
|
32
18
|
//# sourceMappingURL=RTCTrackEvent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["RTCTrackEvent","streams","constructor","type","eventInitDict","toString","transceiver","receiver","track","exports","default"],"sourceRoot":"../../src","sources":["RTCTrackEvent.ts"],"mappings":";;;;;;AAMe,MAAMA,aAAa,CAAC;EAEtBC,OAAO,GAAkB,EAAE;EAKpCC,WAAWA,CAACC,IAAY,EAAEC,aAAyE,EAAE;IACjG,IAAI,CAACD,IAAI,GAAGA,IAAI,CAACE,QAAQ,CAAC,CAAC;IAC3B,IAAI,CAACJ,OAAO,GAAGG,aAAa,CAACH,OAAO;IACpC,IAAI,CAACK,WAAW,GAAGF,aAAa,CAACE,WAAW;IAC5C,IAAI,CAACC,QAAQ,GAAGH,aAAa,CAACE,WAAW,CAACC,QAAQ;IAClD,IAAI,CAACC,KAAK,GAAGJ,aAAa,CAACE,WAAW,CAACC,QAAQ,GAAGH,aAAa,CAACE,WAAW,CAACC,QAAQ,CAACC,KAAK,GAAG,IAAI;EACrG;AACJ;AAACC,OAAA,CAAAC,OAAA,GAAAV,aAAA"}
|