2017-06-21 79 views
-2

我开发使用剑锋媒体服务器与角2的API。为什么我的按钮自动和手动不启动?

我有一个问题,启动按钮,一旦我跑剑锋它手动自动启动按钮没有。

这是我使用的功能:

// Use a button to start the demo 
$('#start').click(function() { 
    if (started) 
    return; 
    started = true; 
    $(this).attr('disabled', 'true').unbind('click'); 
    // Make sure the browser supports WebRTC 
    // if(!Janus.isWebrtcSupported()) { 
    // Janus.log("No WebRTC support... "); 
    return; 
    // } 
}); 
+0

虽然我编辑标题以匹配您的问题在体内仍然是很不清楚你问的东西。 – Nope

回答

0

这里是没有jQuery的代码(我以为这是你问什么?)。

// Use a button to start the demo 
    let start = document.getElementById('#start') 
    start.onclick = function() { 
     if(started) 
      return; 
     started = true; 

     start.onclick = '' 
     start.disabled = true 
     // Make sure the browser supports WebRTC 
     // if(!Janus.isWebrtcSupported()) { 
      // Janus.log("No WebRTC support... "); 
     return; 
      // } 
    }; 
相关问题