New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openvidu-browser

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openvidu-browser - npm Package Compare versions

Comparing version 2.28.0 to 2.29.0-beta1

8

lib/OpenVidu/OpenVidu.js

@@ -539,3 +539,3 @@ "use strict";

_c.trys.push([4, 9, , 10]);
return [4 /*yield*/, navigator.mediaDevices['getDisplayMedia']({ video: true })];
return [4 /*yield*/, navigator.mediaDevices['getDisplayMedia']({ video: true, audio: options.audioSource === 'screen' })];
case 5:

@@ -941,3 +941,3 @@ mediaStream = _c.sent();

var videoSource = publisherProperties.videoSource;
if (typeof audioSource === 'string') {
if (typeof audioSource === 'string' && audioSource !== 'screen') {
myConstraints.constraints.audio = { deviceId: { exact: audioSource } };

@@ -948,2 +948,6 @@ }

this.setVideoSource(myConstraints, videoSource);
if (audioSource === 'screen') {
logger.warn('Parameter "audioSource" is set to "screen", which means rquesting audio from screen sharing source. But "videoSource" is not set to "screen". No audio source will be requested');
myConstraints.constraints.audio = false;
}
}

@@ -950,0 +954,0 @@ else {

@@ -536,3 +536,3 @@ "use strict";

this.clearPermissionDialogTimer(startTime, timeForDialogEvent);
if (!(this.stream.isSendScreen() && this.stream.isSendAudio())) return [3 /*break*/, 5];
if (!(this.stream.isSendScreen() && this.properties.audioSource !== 'screen' && this.stream.isSendAudio())) return [3 /*break*/, 5];
// When getting desktop as user media audio constraint must be false. Now we can ask for it if required

@@ -705,3 +705,3 @@ constraintsAux.audio = definedAudioConstraint;

if (!(this.stream.isSendScreen() && navigator.mediaDevices['getDisplayMedia'] && !platform.isElectron())) return [3 /*break*/, 7];
return [4 /*yield*/, navigator.mediaDevices['getDisplayMedia']({ video: true })];
return [4 /*yield*/, navigator.mediaDevices['getDisplayMedia']({ video: true, audio: this.properties.audioSource === 'screen' })];
case 5:

@@ -708,0 +708,0 @@ mediaStream = _c.sent();

@@ -31,3 +31,3 @@ /**

* This policy is technically enough to recover any broken media connection after a network drop, but in practice it has been proven that OpenVidu Browser may think a media connection has properly recovered when in fact it has not.
* This is not a common case, and it only affects Publisher streams, but it may occur. This property allows **forcing OpenVidu Browser to reconnect all of its outgoing media streams** after a network drop regardless of their supposed status.
* This is not a common case, but it may occur. This property allows **forcing OpenVidu Browser to reconnect all of its outgoing and incoming media streams** after a network drop regardless of their supposed status.
*

@@ -34,0 +34,0 @@ * Default to `false`.

@@ -10,2 +10,3 @@ import { Filter } from '../../../OpenVidu/Filter';

* - Property `deviceId` of a {@link Device}
* - `"screen"` to share the screen audio when {@link videoSource} is set to `"screen"`. If {@link videoSource} is not set to `"screen"` this will result in no audio source and a video-only publisher.
* - A MediaStreamTrack obtained from a MediaStream object with {@link OpenVidu.getUserMedia}

@@ -12,0 +13,0 @@ * - `false` or null to have a video-only publisher

@@ -80,3 +80,3 @@ 'use strict';

registerMessageHandler();
if (config.onreconnected()) {
if (config.onreconnected) {
config.onreconnected();

@@ -83,0 +83,0 @@ }

@@ -79,3 +79,9 @@ "use strict";

var _this = this;
var webrtcObj = localStorage.getItem(this.STATS_ITEM_NAME);
var webrtcObj;
// When cross-site (aka third-party) cookies are blocked by the browser,
// accessing localStorage in a third-party iframe throws a DOMException.
try {
webrtcObj = localStorage.getItem(this.STATS_ITEM_NAME);
}
catch (e) { }
if (!!webrtcObj) {

@@ -82,0 +88,0 @@ this.webRtcStatsEnabled = true;

@@ -56,3 +56,3 @@ {

},
"version": "2.28.0"
"version": "2.29.0-beta1"
}

@@ -570,3 +570,3 @@ /*

try {
const mediaStream = await navigator.mediaDevices['getDisplayMedia']({ video: true });
const mediaStream = await navigator.mediaDevices['getDisplayMedia']({ video: true, audio: options.audioSource === 'screen' });
this.addAlreadyProvidedTracks(myConstraints, mediaStream);

@@ -1021,3 +1021,3 @@ if (mustAskForAudioTrackLater) {

const videoSource = publisherProperties.videoSource;
if (typeof audioSource === 'string') {
if (typeof audioSource === 'string' && audioSource !== 'screen') {
myConstraints.constraints!.audio = { deviceId: { exact: audioSource } };

@@ -1029,2 +1029,6 @@ }

this.setVideoSource(myConstraints, videoSource);
if (audioSource === 'screen') {
logger.warn('Parameter "audioSource" is set to "screen", which means rquesting audio from screen sharing source. But "videoSource" is not set to "screen". No audio source will be requested');
myConstraints.constraints!.audio = false;
}
} else {

@@ -1031,0 +1035,0 @@ // Screen sharing

@@ -507,3 +507,3 @@ /*

this.clearPermissionDialogTimer(startTime, timeForDialogEvent);
if (this.stream.isSendScreen() && this.stream.isSendAudio()) {
if (this.stream.isSendScreen() && this.properties.audioSource !== 'screen' && this.stream.isSendAudio()) {
// When getting desktop as user media audio constraint must be false. Now we can ask for it if required

@@ -648,3 +648,3 @@ constraintsAux.audio = definedAudioConstraint;

if (this.stream.isSendScreen() && navigator.mediaDevices['getDisplayMedia'] && !platform.isElectron()) {
const mediaStream = await navigator.mediaDevices['getDisplayMedia']({ video: true });
const mediaStream = await navigator.mediaDevices['getDisplayMedia']({ video: true, audio: this.properties.audioSource === 'screen' });
this.openvidu.addAlreadyProvidedTracks(myConstraints, mediaStream);

@@ -651,0 +651,0 @@ await getMediaSuccess(mediaStream, definedAudioConstraint);

@@ -51,3 +51,3 @@ /*

* This policy is technically enough to recover any broken media connection after a network drop, but in practice it has been proven that OpenVidu Browser may think a media connection has properly recovered when in fact it has not.
* This is not a common case, and it only affects Publisher streams, but it may occur. This property allows **forcing OpenVidu Browser to reconnect all of its outgoing media streams** after a network drop regardless of their supposed status.
* This is not a common case, but it may occur. This property allows **forcing OpenVidu Browser to reconnect all of its outgoing and incoming media streams** after a network drop regardless of their supposed status.
*

@@ -54,0 +54,0 @@ * Default to `false`.

@@ -28,2 +28,3 @@ /*

* - Property `deviceId` of a {@link Device}
* - `"screen"` to share the screen audio when {@link videoSource} is set to `"screen"`. If {@link videoSource} is not set to `"screen"` this will result in no audio source and a video-only publisher.
* - A MediaStreamTrack obtained from a MediaStream object with {@link OpenVidu.getUserMedia}

@@ -30,0 +31,0 @@ * - `false` or null to have a video-only publisher

@@ -115,3 +115,3 @@ /*

registerMessageHandler();
if (config.onreconnected()) {
if (config.onreconnected) {
config.onreconnected();

@@ -118,0 +118,0 @@ }

@@ -124,3 +124,9 @@ /*

public initWebRtcStats(): void {
const webrtcObj = localStorage.getItem(this.STATS_ITEM_NAME);
let webrtcObj;
// When cross-site (aka third-party) cookies are blocked by the browser,
// accessing localStorage in a third-party iframe throws a DOMException.
try {
webrtcObj = localStorage.getItem(this.STATS_ITEM_NAME);
}
catch(e){}

@@ -127,0 +133,0 @@ if (!!webrtcObj) {

@@ -31,3 +31,3 @@ /**

* This policy is technically enough to recover any broken media connection after a network drop, but in practice it has been proven that OpenVidu Browser may think a media connection has properly recovered when in fact it has not.
* This is not a common case, and it only affects Publisher streams, but it may occur. This property allows **forcing OpenVidu Browser to reconnect all of its outgoing media streams** after a network drop regardless of their supposed status.
* This is not a common case, but it may occur. This property allows **forcing OpenVidu Browser to reconnect all of its outgoing and incoming media streams** after a network drop regardless of their supposed status.
*

@@ -34,0 +34,0 @@ * Default to `false`.

@@ -10,2 +10,3 @@ import { Filter } from '../../../OpenVidu/Filter';

* - Property `deviceId` of a {@link Device}
* - `"screen"` to share the screen audio when {@link videoSource} is set to `"screen"`. If {@link videoSource} is not set to `"screen"` this will result in no audio source and a video-only publisher.
* - A MediaStreamTrack obtained from a MediaStream object with {@link OpenVidu.getUserMedia}

@@ -12,0 +13,0 @@ * - `false` or null to have a video-only publisher

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 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 too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc