Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openvidu-browser

Package Overview
Dependencies
Maintainers
1
Versions
70
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.30.0 to 2.30.1

8

lib/OpenViduInternal/Interfaces/Public/OpenViduAdvancedConfiguration.d.ts

@@ -6,7 +6,13 @@ /**

/**
* Array of [RTCIceServer](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer) to be used by OpenVidu Browser. By default OpenVidu will generate the required credentials to use the COTURN server hosted along OpenVidu Server
* Array of [RTCIceServer](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer) to be used by OpenVidu Browser. By default OpenVidu will generate the required credentials to use the COTURN server hosted along OpenVidu Server.
* You can also set this property to string 'freeice' to force the use of free STUN servers instead (got thanks to [freeice](https://github.com/DamonOehlman/freeice) library).
*
* > **WARNING**: this value has priority over the standard `iceServers` property of {@link rtcConfiguration}. It will override any value in `OpenViduAdvancedConfiguration.rtcConfiguration.iceServers`
*/
iceServers?: RTCIceServer[] | string;
/**
* Custom configuration for all [RTCPeerConnection](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#parameters) objects. This object will be passed as is to all RTCPeerConnection constructor (all Publishers and Subscribers).
*/
rtcConfiguration?: RTCConfiguration;
/**
* URL to a custom screen share extension for Chrome (always based on ours: [openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension)) to be used instead of the default one.

@@ -13,0 +19,0 @@ * Must be something like this: `https://chrome.google.com/webstore/detail/YOUR_WEBSTORE_EXTENSION_NAME/YOUR_EXTENSION_ID`

@@ -13,2 +13,3 @@ import { TypeOfVideo } from '../Enums/TypeOfVideo';

iceServers?: RTCIceServer[];
rtcConfiguration?: RTCConfiguration;
mediaStream?: MediaStream | null;

@@ -15,0 +16,0 @@ mode?: 'sendonly' | 'recvonly' | 'sendrecv';

10

lib/OpenViduInternal/WebRtcPeer/WebRtcPeer.js

@@ -102,6 +102,12 @@ "use strict";

platform = Platform_1.PlatformUtils.getInstance();
this.configuration = __assign(__assign({}, configuration), { iceServers: !!configuration.iceServers && configuration.iceServers.length > 0 ? configuration.iceServers : freeice(), mediaStream: configuration.mediaStream !== undefined ? configuration.mediaStream : null, mode: !!configuration.mode ? configuration.mode : 'sendrecv', id: !!configuration.id ? configuration.id : this.generateUniqueId() });
this.configuration = __assign(__assign({}, configuration), { iceServers: !!configuration.iceServers && configuration.iceServers.length > 0 ? configuration.iceServers : freeice(), rtcConfiguration: configuration.rtcConfiguration !== undefined ? configuration.rtcConfiguration : {}, mediaStream: configuration.mediaStream !== undefined ? configuration.mediaStream : null, mode: !!configuration.mode ? configuration.mode : 'sendrecv', id: !!configuration.id ? configuration.id : this.generateUniqueId() });
// prettier-ignore
logger.debug("[WebRtcPeer] configuration:\n".concat(JSON.stringify(this.configuration, null, 2)));
this.pc = new RTCPeerConnection({ iceServers: this.configuration.iceServers });
var rtcConfiguration = this.configuration.rtcConfiguration
? this.configuration.rtcConfiguration
: { iceServers: this.configuration.iceServers };
if (!rtcConfiguration.iceServers && this.configuration.iceServers) {
rtcConfiguration.iceServers = this.configuration.iceServers;
}
this.pc = new RTCPeerConnection(rtcConfiguration);
this.pc.addEventListener('icecandidate', function (event) {

@@ -108,0 +114,0 @@ if (event.candidate !== null) {

@@ -47,3 +47,3 @@ {

},
"version": "2.30.0"
"version": "2.30.1"
}

@@ -23,4 +23,6 @@ /*

/**
* Array of [RTCIceServer](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer) to be used by OpenVidu Browser. By default OpenVidu will generate the required credentials to use the COTURN server hosted along OpenVidu Server
* Array of [RTCIceServer](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer) to be used by OpenVidu Browser. By default OpenVidu will generate the required credentials to use the COTURN server hosted along OpenVidu Server.
* You can also set this property to string 'freeice' to force the use of free STUN servers instead (got thanks to [freeice](https://github.com/DamonOehlman/freeice) library).
*
* > **WARNING**: this value has priority over the standard `iceServers` property of {@link rtcConfiguration}. It will override any value in `OpenViduAdvancedConfiguration.rtcConfiguration.iceServers`
*/

@@ -30,2 +32,7 @@ iceServers?: RTCIceServer[] | string;

/**
* Custom configuration for all [RTCPeerConnection](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#parameters) objects. This object will be passed as is to all RTCPeerConnection constructor (all Publishers and Subscribers).
*/
rtcConfiguration?: RTCConfiguration;
/**
* URL to a custom screen share extension for Chrome (always based on ours: [openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension)) to be used instead of the default one.

@@ -32,0 +39,0 @@ * Must be something like this: `https://chrome.google.com/webstore/detail/YOUR_WEBSTORE_EXTENSION_NAME/YOUR_EXTENSION_ID`

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

iceServers?: RTCIceServer[];
rtcConfiguration?: RTCConfiguration;
mediaStream?: MediaStream | null;

@@ -67,2 +68,3 @@ mode?: 'sendonly' | 'recvonly' | 'sendrecv';

iceServers: !!configuration.iceServers && configuration.iceServers.length > 0 ? configuration.iceServers : freeice(),
rtcConfiguration: configuration.rtcConfiguration !== undefined ? configuration.rtcConfiguration : {},
mediaStream: configuration.mediaStream !== undefined ? configuration.mediaStream : null,

@@ -75,3 +77,9 @@ mode: !!configuration.mode ? configuration.mode : 'sendrecv',

this.pc = new RTCPeerConnection({ iceServers: this.configuration.iceServers });
let rtcConfiguration: RTCConfiguration = this.configuration.rtcConfiguration
? this.configuration.rtcConfiguration
: { iceServers: this.configuration.iceServers };
if (!rtcConfiguration.iceServers && this.configuration.iceServers) {
rtcConfiguration.iceServers = this.configuration.iceServers;
}
this.pc = new RTCPeerConnection(rtcConfiguration);

@@ -78,0 +86,0 @@ this.pc.addEventListener('icecandidate', (event: RTCPeerConnectionIceEvent) => {

@@ -6,7 +6,13 @@ /**

/**
* Array of [RTCIceServer](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer) to be used by OpenVidu Browser. By default OpenVidu will generate the required credentials to use the COTURN server hosted along OpenVidu Server
* Array of [RTCIceServer](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer) to be used by OpenVidu Browser. By default OpenVidu will generate the required credentials to use the COTURN server hosted along OpenVidu Server.
* You can also set this property to string 'freeice' to force the use of free STUN servers instead (got thanks to [freeice](https://github.com/DamonOehlman/freeice) library).
*
* > **WARNING**: this value has priority over the standard `iceServers` property of {@link rtcConfiguration}. It will override any value in `OpenViduAdvancedConfiguration.rtcConfiguration.iceServers`
*/
iceServers?: RTCIceServer[] | string;
/**
* Custom configuration for all [RTCPeerConnection](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#parameters) objects. This object will be passed as is to all RTCPeerConnection constructor (all Publishers and Subscribers).
*/
rtcConfiguration?: RTCConfiguration;
/**
* URL to a custom screen share extension for Chrome (always based on ours: [openvidu-screen-sharing-chrome-extension](https://github.com/OpenVidu/openvidu-screen-sharing-chrome-extension)) to be used instead of the default one.

@@ -13,0 +19,0 @@ * Must be something like this: `https://chrome.google.com/webstore/detail/YOUR_WEBSTORE_EXTENSION_NAME/YOUR_EXTENSION_ID`

@@ -13,2 +13,3 @@ import { TypeOfVideo } from '../Enums/TypeOfVideo';

iceServers?: RTCIceServer[];
rtcConfiguration?: RTCConfiguration;
mediaStream?: MediaStream | null;

@@ -15,0 +16,0 @@ mode?: 'sendonly' | 'recvonly' | 'sendrecv';

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