Each conversation use its own stream to media and audio stream

This commit is contained in:
Pierre HUBERT 2019-01-25 19:03:23 +01:00
parent 154f1b98ef
commit 99fffb839f

View File

@ -6,23 +6,12 @@
ComunicWeb.components.calls.userMedia = { ComunicWeb.components.calls.userMedia = {
/**
* Pointer on current user media
*/
_currMedia: undefined,
/** /**
* Get user media * Get user media
* *
* @return {Promise} A promise to get user media * @return {Promise} A promise to get user media
*/ */
get: function(){ get: function(){
//Check if we have already got user media
if(this._currMedia != undefined && this._currMedia.active)
return new Promise(function(resolve, error){
resolve(ComunicWeb.components.calls.userMedia._currMedia);
});
//Use latest API //Use latest API
return navigator.mediaDevices return navigator.mediaDevices