Files
jitsi-meet/react/features/mobile/polyfills/RTCPeerConnection.js
Robert Pintilii 6b28af8329 ref(flow) Remove flow (#13343)
Remove flow-related packages
Remove type annotations from JS files
2023-05-12 16:39:18 +03:00

20 lines
626 B
JavaScript

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) {
return super.setRemoteDescription(await synthesizeIPv6Addresses(description));
}
}