@huddle01/web-core
Advanced tools
Comparing version 0.0.15-beta.1 to 0.0.15-beta.2
@@ -1257,10 +1257,18 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6;// src/client/HuddleWebClient.ts | ||
try { | ||
const stream = await navigator.mediaDevices.getUserMedia({ | ||
audio: { | ||
this._audioStream = await navigator.mediaDevices.getUserMedia({ | ||
audio: deviceId ? { | ||
deviceId: { | ||
ideal: deviceId | ||
} | ||
} | ||
} : true | ||
}); | ||
return stream; | ||
if (this._audioProducer) { | ||
console.log("Replacing video track..."); | ||
this._audioProducer.replaceTrack({ | ||
track: this._audioStream.getAudioTracks()[0] | ||
}); | ||
} | ||
this.emit("app:mic-on", this._audioStream); | ||
this.logger.info("app:cam-on", this._audioStream); | ||
return this._audioStream; | ||
} catch (error) { | ||
@@ -1332,12 +1340,18 @@ console.error("Audio Request Error; Reason:", error); | ||
try { | ||
const stream = await navigator.mediaDevices.getUserMedia({ | ||
video: { | ||
this._videoStream = await navigator.mediaDevices.getUserMedia({ | ||
video: deviceId ? { | ||
deviceId: { | ||
ideal: deviceId | ||
} | ||
} | ||
} : true | ||
}); | ||
this.emit("app:cam-on", stream); | ||
this.logger.info("app:cam-on", stream); | ||
return stream; | ||
if (this._videoProducer) { | ||
console.log("Replacing video track..."); | ||
this._videoProducer.replaceTrack({ | ||
track: this._videoStream.getVideoTracks()[0] | ||
}); | ||
} | ||
this.emit("app:cam-on", this._videoStream); | ||
this.logger.info("app:cam-on", this._videoStream); | ||
return this._videoStream; | ||
} catch (error) { | ||
@@ -1344,0 +1358,0 @@ console.error("Video Request Error; Reason:", error); |
{ | ||
"name": "@huddle01/web-core", | ||
"version": "0.0.15-beta.1", | ||
"version": "0.0.15-beta.2", | ||
"description": "Huddle01 Web Core Library - The Communication Toolkit", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3971835
42791