Files
jitsi-meet/react/features/mobile/polyfills/RTCPeerConnection.js
Saúl Ibarra Corretgé eb16f93153 fix(rn,polyfills) remove no longer needed hack
With react-native-webrtc 1.89.2 the remote SDP is properly updated before
onaddstream is fired so it's no longer needed.

Also, for readability, IPv6 address synthesis has been moved to a standalone
utils file.
2021-07-26 16:16:27 +02:00

22 lines
644 B
JavaScript

// @flow
import { RTCPeerConnection as PC } from 'react-native-webrtc';
import { synthesizeIPv6Addresses } from './ipv6utils';
/**
* Override PeerConnection to synthesize IPv6 addresses.
*/
export default class RTCPeerConnection extends PC {
/**
* Synthesize IPv6 addresses before calling the underlying setRemoteDescription.
*
* @param {Object} description - SDP.
* @returns {Promise<undefined>} A promise which is resolved once the operation is complete.
*/
async setRemoteDescription(description: Object) {
return super.setRemoteDescription(await synthesizeIPv6Addresses(description));
}
}