function enumerateDevicesThroughMediaStreamTrack (callback) {
    MediaStreamTrack.getSources(function (sources) {
        var devices = sources.map(function (source) {
            var kind = (source.kind || '').toLowerCase();
            return {
                facing: source.facing || null,
                label: source.label,
                kind: kind ? kind + 'input': null,
                deviceId: source.id,
                groupId: source.groupId || null
            };
        });

        //add auto devices
        devices.unshift(
            createAutoDeviceInfo('audioinput'),
            createAutoDeviceInfo('videoinput')
        );
        callback(devices);
    });
}
/**
 * Use old MediaStreamTrack to get devices list and
 * convert it to enumerateDevices format.
 * @param {Function} callback function to call when received devices list.
 */
Use old MediaStreamTrack to get devices list and
convert it to enumerateDevices format.
@param {Function} callback function to call when received devices list.
Use old MediaStreamTrack to get devices list and convert it to enumerateDevices format . @param { Function } callback function to call when received devices list .
function enumerateDevicesThroughMediaStreamTrack (callback) {
    MediaStreamTrack.getSources(function (sources) {
        var devices = sources.map(function (source) {
            var kind = (source.kind || '').toLowerCase();
            return {
                facing: source.facing || null,
                label: source.label,
                kind: kind ? kind + 'input': null,
                deviceId: source.id,
                groupId: source.groupId || null
            };
        });
        devices.unshift(
            createAutoDeviceInfo('audioinput'),
            createAutoDeviceInfo('videoinput')
        );
        callback(devices);
    });
}
function enumerateDevicesThroughMediaStreamTrack ( callback ) { MediaStreamTrack . getSources ( function ( sources ) { var devices = sources . map ( function ( source ) { var kind = ( source . kind || '' ) . toLowerCase ( ) ; return { facing : source . facing || null , label : source . label , kind : kind ? kind + 'input' : null , deviceId : source . id , groupId : source . groupId || null } ; } ) ; devices . unshift ( createAutoDeviceInfo ( 'audioinput' ) , createAutoDeviceInfo ( 'videoinput' ) ) ; callback ( devices ) ; } ) ; }
Use old MediaStreamTrack to get devices list and
 convert it to enumerateDevices format.
Use old MediaStreamTrack to get devices list and convert it to enumerateDevices format .
//add auto devices