# navigator.getMediaDevices / navigator.enumerateDevices / MediaStreamTrack.getSources using RTCMultiConnection.js!

HOME © Muaz Khan . @WebRTCWeb . Github . Latest issues . What's New?

> This demo is out-dated i.e. deprecated (written in 2013).
> Please try other demos: https://github.com/muaz-khan/RTCMultiConnection

## Select Media Device

## How to get media devices?

    // get list of devices
    connection.getDevices(function(devices){
        for (var device in devices) {
            device = devices[device];

            // device.kind == 'audio' || 'video'
            console.log(device.id, device.label);
        }
    });

    // select any audio and/or video device
    connection.selectDevices(firstDeviceID, secondDeviceID);

## Reference Links

1. http://www.rtcmulticonnection.org/docs/getDevices/
2. http://www.rtcmulticonnection.org/docs/selectDevices/

## Feedback

Enter your email too; if you want "direct" reply!

## Latest Updates