Default audio device

640 views
Skip to first unread message

vigneshwaran s

unread,
Oct 6, 2015, 8:45:36 AM10/6/15
to discuss-webrtc
I ve my native application for audio & video steaming between peers.

In my application the audio is not played via default device(Machine's default audio device)  rather  it is played through some other device from the device list.

Is there any native API to find the default selected audio device in a machine .

gui...@webrtc.org

unread,
Oct 6, 2015, 10:04:46 AM10/6/15
to discuss-webrtc
If you use Chromium, the default audio output device is the first audio output device listed by MediaDevices.enumerateDevices().
Since M47, the id of this device is "default". If you want an <audio> or <video> element to play audio through a nondefault device, you can use the setSinkId() method, but this requires enabling the  "experimental web platform features" flag (chrome://flags/#enable-experimental-web-platform-features).

vigneshwaran s

unread,
Oct 6, 2015, 10:55:49 AM10/6/15
to discuss-webrtc

I m working of native app in windows..I m looking for an API to choose or set the default audio device in  native app 

Henrik Andreasson

unread,
Oct 6, 2015, 11:01:06 AM10/6/15
to discuss...@googlegroups.com
Check out the VoEHardware::SetPlayoutDevice API.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/33ab5db5-f566-401b-b432-7904dfa71adf%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

vigneshwaran s

unread,
Oct 6, 2015, 11:22:10 AM10/6/15
to discuss-webrtc
Henrik,

Even then If I specify / select the audio playback device , how can I include the audio from the specified playback device into the audiosource since I can't specify the capturer while creating audiosource as like creating videosource.
What exactly I m looking for is 
I need to find the default device in a machine and set the audiosource for that device.How can I do this??

-Vignesh

vigneshwaran s

unread,
Oct 7, 2015, 8:35:12 AM10/7/15
to discuss-webrtc
I found in the peer_connection native app example ( in Win 7 OS)

As soon as the peers are connected , the audio is not played though default or standard Microphone.It is enabled only through external Micrphone. Even if the external Micrphone is not connected , the default or standard micrphone is not enabled.Why is it so ??

-Vignesh

vigneshwaran s

unread,
Oct 7, 2015, 8:39:59 AM10/7/15
to discuss-webrtc
Also it looks like it is by fefault choosing the defaultCommunication device.But I want the application to select the defaultdevice.How can I do that

Christoffer Jansson

unread,
Oct 21, 2015, 3:36:29 AM10/21/15
to discuss-webrtc
Hi,

Could you file a bug here with a step by step repro case (including all the modifications to the code) and the expected outcome? It will be easier assign to the appropriate devs and for others to track.

Thanks!
/Chris
Reply all
Reply to author
Forward
0 new messages