function createLocalOffer(constraints) {
  peerConnection_().createOffer(
      function(localOffer) {
        success('createOffer');

        setLocalDescription(peerConnection, localOffer);
        if (gDefaultAudioCodec !== null) {
          localOffer.sdp = setSdpDefaultAudioCodec(localOffer.sdp,
                                                   gDefaultAudioCodec);
        }
        if (gDefaultVideoCodec !== null) {
          localOffer.sdp = setSdpDefaultVideoCodec(localOffer.sdp,
                                                   gDefaultVideoCodec,
                                                   gDefaultPreferHwVideoCodec);
        }
        if (gOpusDtx) {
          localOffer.sdp = setOpusDtxEnabled(localOffer.sdp);
        }
        returnToTest('ok-' + JSON.stringify(localOffer));
      },
      function(error) { failure('createOffer', error); },
      constraints);
}
/**
 * Asks this page to create a local offer.
 *
 * Returns a string on the format ok-(JSON encoded session description).
 *
 * @param {!Object} constraints Any createOffer constraints.
 */
Asks this page to create a local offer.
Returns a string on the format ok-(JSON encoded session description).

@param {!Object} constraints Any createOffer constraints.
Asks this page to create a local offer . Returns a string on the format ok - ( JSON encoded session description ) . @param { !Object } constraints Any createOffer constraints .
function createLocalOffer(constraints) {
  peerConnection_().createOffer(
      function(localOffer) {
        success('createOffer');
        setLocalDescription(peerConnection, localOffer);
        if (gDefaultAudioCodec !== null) {
          localOffer.sdp = setSdpDefaultAudioCodec(localOffer.sdp,
                                                   gDefaultAudioCodec);
        }
        if (gDefaultVideoCodec !== null) {
          localOffer.sdp = setSdpDefaultVideoCodec(localOffer.sdp,
                                                   gDefaultVideoCodec,
                                                   gDefaultPreferHwVideoCodec);
        }
        if (gOpusDtx) {
          localOffer.sdp = setOpusDtxEnabled(localOffer.sdp);
        }
        returnToTest('ok-' + JSON.stringify(localOffer));
      },
      function(error) { failure('createOffer', error); },
      constraints);
}
function createLocalOffer ( constraints ) { peerConnection_ ( ) . createOffer ( function ( localOffer ) { success ( 'createOffer' ) ; setLocalDescription ( peerConnection , localOffer ) ; if ( gDefaultAudioCodec !== null ) { localOffer . sdp = setSdpDefaultAudioCodec ( localOffer . sdp , gDefaultAudioCodec ) ; } if ( gDefaultVideoCodec !== null ) { localOffer . sdp = setSdpDefaultVideoCodec ( localOffer . sdp , gDefaultVideoCodec , gDefaultPreferHwVideoCodec ) ; } if ( gOpusDtx ) { localOffer . sdp = setOpusDtxEnabled ( localOffer . sdp ) ; } returnToTest ( 'ok-' + JSON . stringify ( localOffer ) ) ; } , function ( error ) { failure ( 'createOffer' , error ) ; } , constraints ) ; }
Asks this page to create a local offer.
Asks this page to create a local offer .