在 Nodejs 中使用 Kurento 複合媒體元素進行音頻會議需要幫助 (Need help for audio conference using Kurento composite media element in Nodejs)


問題描述

在 Nodejs 中使用 Kurento 複合媒體元素進行音頻會議需要幫助 (Need help for audio conference using Kurento composite media element in Nodejs)

我正在裁判 GitHub 中的代碼,用於使用 Kurento 複合媒體元素進行音頻和視頻會議,它通過 WebRTC 進行音頻和視頻流工作很好。

但我只需要使用 WebRTC 進行音頻會議,我在上面的 GitHub 代碼中添加了更改,新代碼已上傳到 GitHub 存儲庫。我在 static/js/index.js 文件中添加了以下更改

var constraints = {
    audio: true, video: false
};

var options = {
    localVideo: undefined,
    remoteVideo: video,
    onicecandidate : onIceCandidate,
    mediaConstraints: constraints
}
webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function(error) {

當我運行此代碼時,節點服務器和 chrome 控制台都沒有錯誤。但是音頻流沒有開始。它只顯示微調器很長一段時間。Chrome 控制台日誌是 here

根據我之前的回复 堆棧溢出問題,我們需要指定 MediaType.AUDIO 在 java 代碼中,如下所示

   webrtc.connect(hubport, MediaType.AUDIO);
   hubport.connect(webrtc, MediaType.AUDIO);

但我想使用 kurento‑client.js 在 Nodejs 中實現它,我在 Nodeja API 中設置 MediaType.AUDIO 以與 hubPortwebRtcEndpoint 連接沒有得到任何參考。 p>


參考解法

方法 1:

This should do

function connectOnlyAudio(source, sink, callback) {
    source.connect(sink, "AUDIO" , function(error) {
       if (error) {
           return callback(error);
       }
       return callback(null);
    });
}

We are in the process of improving the documentation of the project. I hope that this will all be made more clear in the new docs.


EDIT 1

It is important to make sure that you are indeed sending something, and that the connection between your client and the media server is negotiated correctly. Going through your bower.json, I've found that you are setting the adapter dependency as whatever, so to speak. In the latest releases, they've done some refactoring that makes the kurento‑utils‑js library fail. We haven't yet adapted to the new changes, so you need to fix the dependency of adapter.js like so

"adapter.js": "v0.2.9"

(by Nilesh Waghigracia)

參考文件

  1. Need help for audio conference using Kurento composite media element in Nodejs (CC BY‑SA 2.5/3.0/4.0)

#audio-streaming #webrtc #node.js #kurento






相關問題

在 windows phone 7 應用程序中流式傳輸音頻 (Streaming audio in windows phone 7 app)

從 FFMPEG for android 的命令行版本訪問網絡攝像頭麥克風 (Accessing webcam mic from command line version of FFMPEG for android)

Siaran Langsung Node.js: Hindari buffering (Node.js Live Streaming: Avoid buffering)

Icecast 流媒體無法播放 (Icecast streamming not playing)

如何使用 NAudio 在 C# 中解碼 mp3 文件 (how to decode mp3 file in c# using NAudio)

在 Nodejs 中使用 Kurento 複合媒體元素進行音頻會議需要幫助 (Need help for audio conference using Kurento composite media element in Nodejs)

iPhone - 在顯示圖像時使用 UIWebView 流式傳輸音頻 (iPhone - streaming audio using UIWebView while displaying an image)

jQuery:跨瀏覽器問題——調試 Internet Explorer (jQuery: Cross-browser problem -- Debugging Internet Explorer)

在 xuggler 中轉發和倒帶音頻 (forwarding and rewinding audio in xuggler)

網站上的實時音頻流 (Live audio streaming on a website)

如何通過 NAT 流式傳輸 WebRTC 音頻? (How to stream WebRTC audio through a NAT?)

從 WebAPI 在瀏覽器中播放 WAV 文件 (Play WAV file in Browser from WebAPI)







留言討論