File tree 2 files changed +39
-0
lines changed
2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -16,12 +16,19 @@ export interface RtcConfig {
16
16
bindAddress?: string;
17
17
enableIceTcp?: boolean;
18
18
enableIceUdpMux?: boolean;
19
+ disableAutoNegotiation?: boolean;
20
+ disableFingerprintVerification?: boolean;
21
+ disableAutoGathering?: boolean;
22
+ forceMediaTransport?: boolean;
19
23
portRangeBegin?: number;
20
24
portRangeEnd?: number;
21
25
maxMessageSize?: number;
22
26
mtu?: number;
23
27
iceTransportPolicy?: TransportPolicy;
24
28
disableFingerprintVerification?: boolean;
29
+ certificatePemFile?: string;
30
+ keyPemFile?: string;
31
+ keyPemPass?: string;
25
32
}
26
33
27
34
export const enum RelayType {
@@ -69,6 +76,27 @@ export const enum DescriptionType {
69
76
}
70
77
```
71
78
79
+ ** setLocalDescription: (sdp: string, init?: LocalDescriptionInit) => void**
80
+
81
+ Set Local Description and optionally the ICE ufrag/pwd to use. These should not
82
+ be set as they will be generated automatically as per the spec.
83
+ ```
84
+ export interface LocalDescriptionInit {
85
+ iceUfrag?: string;
86
+ icePwd?: string;
87
+ }
88
+ ```
89
+
90
+ ** remoteFingerprint: () => CertificateFingerprint**
91
+
92
+ Returns the certificate fingerprint used by the remote peer
93
+ ```
94
+ export interface CertificateFingerprint {
95
+ value: string;
96
+ algorithm: 'sha-1' | 'sha-224' | 'sha-256' | 'sha-384' | 'sha-512' | 'md5' | 'md2';
97
+ }
98
+ ```
99
+
72
100
** addRemoteCandidate: (candidate: string, mid: string) => void**
73
101
74
102
Add remote candidate info
Original file line number Diff line number Diff line change @@ -256,6 +256,17 @@ PeerConnectionWrapper::PeerConnectionWrapper(const Napi::CallbackInfo &info) : N
256
256
rtcConfig.disableFingerprintVerification = config.Get (" disableFingerprintVerification" ).As <Napi::Boolean >();
257
257
}
258
258
259
+ // Specify certificate to use if set
260
+ if (config.Get (" certificatePemFile" ).IsString ()) {
261
+ rtcConfig.certificatePemFile = config.Get (" certificatePemFile" ).As <Napi::String>().ToString ();
262
+ }
263
+ if (config.Get (" keyPemFile" ).IsString ()) {
264
+ rtcConfig.keyPemFile = config.Get (" keyPemFile" ).As <Napi::String>().ToString ();
265
+ }
266
+ if (config.Get (" keyPemPass" ).IsString ()) {
267
+ rtcConfig.keyPemPass = config.Get (" keyPemPass" ).As <Napi::String>().ToString ();
268
+ }
269
+
259
270
// Create peer-connection
260
271
try
261
272
{
You can’t perform that action at this time.
0 commit comments