<commit_before>;(function() {

  var localStream;
  var pc;
  var remoteStream;
  var turnReady;

  var xpush;
  var channel;
  var channelNm;
  var userId;

  var localVideo;
  var remoteVideo;

  var CONFIG = {};
  var STATUS = {
    READY: false,
    INIT: false,
    STARTED: false
  };

  var _initProcess = function (type, data){
    console.log('EVENT', type, data);

    if(data.event == 'CONNECTION' && userId == data.U){

      if(!channel){
        channel = xpush.getChannel(channelNm);
      }

      // channel 연결 후!
      if(data.count == 1){ // created
        STATUS.INIT = true;
      }else if(data.count == 2){ // joined

        STATUS.READY = true;
        channel.send('message', 'JOIN');

      }else if(data.count == 0 || data.count > 2){
        console.error('FULL!! & something is wrong.. (_ _); ');

      }

      getUserMedia(CONFIG.constraints, handleUserMedia, handleUserMediaError);

    }

  };

  var XWebRTC = function(_host, _app, _channelName, _userId, _localVideo, _remoteVideo){
    var self = this;

    CONFIG.constraints    = {video: true};
    CONFIG.pc             = {'iceServers': [{'url': 'stun:stun.l.google.com:19302'}]};
    CONFIG.pcConstraints  = {'optional': [{'DtlsSrtpKeyAgreement': true}]};
    CONFIG.sdpConstraints = {'mandatory': {'OfferToReceiveAudio':true,'OfferToReceiveVideo':true }};

    channelNm   = _channelName;
    localVideo  = _localVideo;<commit_msg>set audio constraint on webrtc<commit_after>;(function() {

  var localStream;
  var pc;
  var remoteStream;
  var turnReady;

  var xpush;
  var channel;
  var channelNm;
  var userId;

  var localVideo;
  var remoteVideo;

  var CONFIG = {};
  var STATUS = {
    READY: false,
    INIT: false,
    STARTED: false
  };

  var _initProcess = function (type, data){
    console.log('EVENT', type, data);

    if(data.event == 'CONNECTION' && userId == data.U){

      if(!channel){
        channel = xpush.getChannel(channelNm);
      }

      // channel 연결 후!
      if(data.count == 1){ // created
        STATUS.INIT = true;
      }else if(data.count == 2){ // joined

        STATUS.READY = true;
        channel.send('message', 'JOIN');

      }else if(data.count == 0 || data.count > 2){
        console.error('FULL!! & something is wrong.. (_ _); ');

      }

      getUserMedia(CONFIG.constraints, handleUserMedia, handleUserMediaError);

    }

  };

  var XWebRTC = function(_host, _app, _channelName, _userId, _localVideo, _remoteVideo){
    var self = this;

    CONFIG.constraints    = {'audio': true, 'video': true};
    CONFIG.pc             = {'iceServers': [{'url': 'stun:stun.l.google.com:19302'}]};
    CONFIG.pcConstraints  = {'optional': [{'DtlsSrtpKeyAgreement': true}]};
    CONFIG.sdpConstraints = {'mandatory': {'OfferToReceiveAudio':true,'OfferToReceiveVideo':true }};

    channelNm   = _channelName;
    localVideo  = _localVideo;
{'fraction_non_alphanumeric': 0.14930555555555555, 'fraction_numerical': 0.00625, 'mean_word_length': 2.795783926218709, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6762605', 'n_tokens_mistral': 998, 'n_tokens_neox': 944, 'n_words': 211}