2013-08-10 1 views
0

vLine에서 응용 프로그램을 만들고 있습니다.vLine에서 벨소리를 사용할 수 없습니다.

나는 소리와 함께 화상 채팅을했습니다.

하지만 벨소리가 울리지 않습니다.

벨소리를 울리는 데 특별한 것이 있습니까?

explanation 외모에 대한 몇 가지 특별한 설정이없는 것 같습니다.

var client, vlinesession;var lastMsg; 
var vlineClient = (function(){  
    if('{{vlineData.serviceId}}' == 'YOUR_SERVICE_ID' || '{{vlineData.serviceId}}' == 'YOUR_SERVICE_ID'){ 
     alert('Please make sure you have created a vLine service and that you have properly set the $serviceID and $apiSecret variables in classes/Vline.php file.');  

    } 
    var authToken = '{{ vlineData.authToken }}', 
     serviceId = '{{ vlineData.serviceId }}', 
     profile = {"displayName": '{{ vlineData.displayName }}', "id": '{{ vlineData.id }}'}; 




    // Create vLine client 
    window.vlineClient = client_ = vline.Client.create({"serviceId": serviceId, "ui": true, 
     'uiVideoPanel':'showvideo' 
    }); 
    // Add login event handler 

    client_.on('login', onLogin); 
    client_.login(serviceId, profile, authToken).done(this.init_,this); 
    // Do login 
// 
    // 
    // 
    // 


    function initCallButton(button) { 
    var userId = button.attr('data-userid'); 

    // fetch person object associated with username 
    vlinesession.getPerson(userId).done(function(person) { 
     // update button state with presence 
     function onPresenceChange() { 
     if(person.getPresenceState() == 'online'){ 
      button.removeClass().addClass('active'); 
     }else{ 
      button.removeClass().addClass('disabled'); 
     } 
     button.attr('data-presence', person.getPresenceState()); 
     } 

     // set current presence 
     onPresenceChange(); 

     // handle presence changes 
     person.on('change:presenceState', onPresenceChange); 


     // start a call when button is clicked 
     button.click(function() { 
       if (person.getId() == vlinesession.getLocalPersonId()) { 
      alert('You cannot call yourself. Login as another user in an incognito window'); 
      return; 
       } 
      if(button.hasClass('active')) 
         // person.postMessage("Hello there"); 
         // console.log("send message"); 
      person.startMedia(); 

     }); 
    }); 

답변

1

클라이언트는 단일 파일 경로 또는 경로의 배열을 설정할 수있는 setRingtone 기능을 가지고, MP3 및 OGG 파일 형식의 말한다. 문서에서 이 삭제되었습니다. 클라이언트를 만든 후에 벨소리를 설정할 수 있습니다. 다음 빌드에서 문서를 내보낼 것인지 확인합니다.

/** 
    * Set the sound to be played as the ringtone for calls. The parameter takes an 
    * array of paths, so that you can pass in different file formats like 
    * ogg and mp3 for cross browser support. 
    * @param {!string|!Array.<!string>} audioFilePath path to audio file(s). 
    */ 
    setRingtone(<audioPath(s)>) 
+0

감사합니다. 그것은 작동합니다! – whitebear