mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Each conversation use its own stream to media and audio stream
This commit is contained in:
parent
154f1b98ef
commit
99fffb839f
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user