您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

RTCPeerConnection.js 644B

123456789101112131415161718192021
  1. // @flow
  2. import { RTCPeerConnection as PC } from 'react-native-webrtc';
  3. import { synthesizeIPv6Addresses } from './ipv6utils';
  4. /**
  5. * Override PeerConnection to synthesize IPv6 addresses.
  6. */
  7. export default class RTCPeerConnection extends PC {
  8. /**
  9. * Synthesize IPv6 addresses before calling the underlying setRemoteDescription.
  10. *
  11. * @param {Object} description - SDP.
  12. * @returns {Promise<undefined>} A promise which is resolved once the operation is complete.
  13. */
  14. async setRemoteDescription(description: Object) {
  15. return super.setRemoteDescription(await synthesizeIPv6Addresses(description));
  16. }
  17. }