openvidu-browser
Advanced tools
Comparing version 2.30.0 to 2.30.1
@@ -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'; |
@@ -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
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
1
0
1
1693839
324
30855