2017-05-31 72 views
2

我是node.js初學者,嘗試使用Agora WebRTC SDK閱讀本文檔。如何啓動此Agora WebRTC示例node.js服務器?

https://docs.agora.io/en/user_guide/communication/webrtc_user_guide_communication.html#qs-communication-webrtc

關於這個文件, 服務器話題起初,我用「故宮安裝」命令,使nodo_modules。 接下來,我檢查了./server/nodejs/DemoServer.js中的APP_ID和APP_CERTIFICATE。 但我找不到它們。我應該在哪裏填寫DemoServer.js中APP_ID和APP_CERTIFICATE的值? VENDER_KEY?

的WebRTC示例代碼位於此下載鏈接。(無插件) https://www.agora.io/en/blog/download/

請幫我推出這個樣品。

回答

0

您不需要視頻通話示例的應用證書,只需要appID即可。

應用程序ID(鍵)通過HTML頁面上的用戶輸入進行檢索。

Key: <input id="key" type="text" value="" size="36"></input>

console.log("Init AgoraRTC client with vendor key: " + key.value); 
client = AgoraRTC.createClient({mode: 'interop'}); 
client.init(key.value, function() { 
    console.log("AgoraRTC client initialized");