首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在vline上没有铃声。

在vline上没有铃声。
EN

Stack Overflow用户
提问于 2013-08-10 21:14:54
回答 1查看 138关注 0票数 0

我正在vLine上申请

我用声音做视频聊天。

但是,它不响铃声。

有什么特别的事情要打铃声吗?

这个解释看上去没有什么特殊的铃声设置。

代码语言:javascript
复制
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();

      });
    });
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-08-22 23:44:24

客户端有一个setRingtone函数,允许您设置单个文件路径或路径数组,比如mp3和ogg文件格式。它是从医生那里掉下来的。您可以在创建客户端后设置铃声。我们将确保在下一个构建中导出这些文档。

代码语言:javascript
复制
    /**
     * 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)>)
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18166410

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档