function getVideoSources(callback) {
  var videoSources = [];
  callback = callback || function(){};

  MediaStreamTrack.getSources(function(sources){
    sources.forEach(function(source,index){
      if(source.kind === 'video') {
        // we only need to enlist video sources
        videoSources.push({
          id: source.id,
          label: source.label || 'Camera '+(videoSources.length+1)
        });  
      }
    });

    callback(videoSources);
  });
}
This retrieves video sources and passes them to callback parameter