params.fingerprints.forEach(function(fp) { sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n'; });
async _setupTransport({ localDtlsRole }) { logger.debug('_setupTransport()'); // Get our local DTLS parameters. const dtlsParameters = this._dtlsTransport.getLocalParameters(); dtlsParameters.role = localDtlsRole; // Need to tell the remote transport about our parameters. await this.safeEmitAsPromise('@connect', { dtlsParameters }); // Start the RTCIceTransport. this._iceTransport.start(this._iceGatherer, this._remoteIceParameters, 'controlling'); // Add remote ICE candidates. for (const candidate of this._remoteIceCandidates) { this._iceTransport.addRemoteCandidate(candidate); } // Also signal a 'complete' candidate as per spec. // NOTE: It should be {complete: true} but Edge prefers {}. // NOTE: If we don't signal end of candidates, the Edge RTCIceTransport // won't enter the 'completed' state. this._iceTransport.addRemoteCandidate({}); // NOTE: Edge does not like SHA less than 256. this._remoteDtlsParameters.fingerprints = this._remoteDtlsParameters.fingerprints .filter((fingerprint) => { return (fingerprint.algorithm === 'sha-256' || fingerprint.algorithm === 'sha-384' || fingerprint.algorithm === 'sha-512'); }); // Start the RTCDtlsTransport. this._dtlsTransport.start(this._remoteDtlsParameters); this._transportReady = true; }
this._direction = direction; dtlsParameters.fingerprints = dtlsParameters.fingerprints.filter((f) => f.algorithm === 'sha-256'); this._remoteSdp = new RemoteSdp_1.RemoteSdp({ iceParameters,
this._sdpObject.msidSemantic = { semantic: 'WMS', token: '*' }; const numFingerprints = this._dtlsParameters.fingerprints.length; this._sdpObject.fingerprint = type: dtlsParameters.fingerprints[numFingerprints - 1].algorithm, hash: dtlsParameters.fingerprints[numFingerprints - 1].value }; this._sdpObject.groups = [{ type: 'BUNDLE', mids: '' }];
const numFingerprints = this._dtlsParameters!.fingerprints.length; type : dtlsParameters.fingerprints[numFingerprints - 1].algorithm, hash : dtlsParameters.fingerprints[numFingerprints - 1].value };
params.fingerprints.forEach(function(fp) { sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n'; });
params.fingerprints.forEach(function(fp) { sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n'; });
this._remoteDtlsParameters!.fingerprints = this._remoteDtlsParameters!.fingerprints .filter((fingerprint: any) =>
dtlsParameters.fingerprints = dtlsParameters.fingerprints.filter((f) => f.algorithm ==='sha-256');