-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to do two way audio Communication? #2
Comments
Hi, I implemented this as a hidden feature before. Since I need to check and test it, I will respond you back by next weekend. |
Thank you. Awaiting your response.
…On 23 Sep 2017 10:13 p.m., "Kensaku KOMATSU" ***@***.***> wrote:
Hi, I implemented this as a hidden feature before.
Since I need to check and test it, I will response you back until next
weekend.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG71d9-SRZe0J7uOGaDdB7_y9aqFjJTdks5slTUfgaJpZM4PeBxP>
.
|
Sorry for late. I finished to check. You can send audio stream, by simply calling const client = new SiRuClient('testroom', {key: 'YOUR_SKYWAY_APIKEY_HERE'})
client.on('connect', () => {
client.on('device:connected', (uuid, profile) => {
// when device has connected, you can get peerid of it by calling getPeerid()
// then you can call startAudioStream()
const peerid = client.deviceManager.getPeerid(uuid)
startAudioStream(peerid)
})
})
function startAudioStream(peerid) {
navigator.mediaDevices.getUserMedia({ audio: true, video: false})
.then( stream => {
// skyway is still internal property, but you can use it for sending stream
const call = client.skyway.call(peerid, stream)
call.on('stream', stream => {
console.log(stream) // #=> nothing streamed from device, but you can detect sending stream started
})
})
} After that janus will send audio stream from browser to gst-launch-1.0 -v udpsrc port=25000 \
caps="application/x-rtp,media=(string)audio,clock-rate=(int)48000,encoding-name=(string)X-GST-OPUS-DRAFT-SPITTKA-00 " ! \
rtpopusdepay ! opusdec ! wavenc ! \
filesink location=recorded_audio.wav If you want to change destination address and port from the default setting, you can do it by updating |
Does this create a file? I need the stream to be played on the speaker of raspberry pi. |
Yes, above sample pipeline is to create wave file. In your case,
|
I tested. |
I am getting api key is invalid error.
|
What is this due to? |
|
the janus process is not recognising the browser connection |
Do you set And also, in most case, the permission Enabled API Key authentication should not be checked. |
yes I have set localhost in available domains. Most of times the janus process did not send the sstream. In the chromes developers console I could see that a media stream object is returend once. but client.on('stream') was never called. |
Hmmm, Could you send your |
How can I send audio stream from browser to the device?
The text was updated successfully, but these errors were encountered: