mirror of https://github.com/OpenVidu/openvidu.git
Add WS config env variables (#7)
parent
0e670bd107
commit
a2c3f5323d
|
@ -522,7 +522,7 @@ var OpenVidu = /** @class */ (function () {
|
||||||
*/
|
*/
|
||||||
OpenVidu.prototype.startWs = function (onConnectSucces) {
|
OpenVidu.prototype.startWs = function (onConnectSucces) {
|
||||||
var config = {
|
var config = {
|
||||||
heartbeat: 5000,
|
heartbeat: process.env.OPENVIDU_BROWSER_PING_PERIOD || 5000,
|
||||||
sendCloseMessage: false,
|
sendCloseMessage: false,
|
||||||
ws: {
|
ws: {
|
||||||
uri: this.wsUri,
|
uri: this.wsUri,
|
||||||
|
@ -533,7 +533,7 @@ var OpenVidu = /** @class */ (function () {
|
||||||
onreconnected: this.reconnectedCallback.bind(this)
|
onreconnected: this.reconnectedCallback.bind(this)
|
||||||
},
|
},
|
||||||
rpc: {
|
rpc: {
|
||||||
requestTimeout: 10000,
|
requestTimeout: process.env.OPENVIDU_BROWSER_PING_TIMEOUT || 10000,
|
||||||
participantJoined: this.session.onParticipantJoined.bind(this.session),
|
participantJoined: this.session.onParticipantJoined.bind(this.session),
|
||||||
participantPublished: this.session.onParticipantPublished.bind(this.session),
|
participantPublished: this.session.onParticipantPublished.bind(this.session),
|
||||||
participantUnpublished: this.session.onParticipantUnpublished.bind(this.session),
|
participantUnpublished: this.session.onParticipantUnpublished.bind(this.session),
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -196,7 +196,7 @@ var WebRtcStats = /** @class */ (function () {
|
||||||
'exec': instrumentation.exec,
|
'exec': instrumentation.exec,
|
||||||
'component': instrumentation.component,
|
'component': instrumentation.component,
|
||||||
'stream': 'webRtc',
|
'stream': 'webRtc',
|
||||||
'type': metricId,
|
'et_type': metricId,
|
||||||
'stream_type': 'composed_metrics',
|
'stream_type': 'composed_metrics',
|
||||||
'units': units
|
'units': units
|
||||||
};
|
};
|
||||||
|
@ -229,7 +229,7 @@ var WebRtcStats = /** @class */ (function () {
|
||||||
'exec': instrumentation.exec,
|
'exec': instrumentation.exec,
|
||||||
'component': instrumentation.component,
|
'component': instrumentation.component,
|
||||||
'stream': 'webRtc',
|
'stream': 'webRtc',
|
||||||
'type': metricId,
|
'et_type': metricId,
|
||||||
'stream_type': 'composed_metrics',
|
'stream_type': 'composed_metrics',
|
||||||
'units': units
|
'units': units
|
||||||
};
|
};
|
||||||
|
@ -276,7 +276,7 @@ var WebRtcStats = /** @class */ (function () {
|
||||||
'exec': instrumentation.exec,
|
'exec': instrumentation.exec,
|
||||||
'component': instrumentation.component,
|
'component': instrumentation.component,
|
||||||
'stream': 'webRtc',
|
'stream': 'webRtc',
|
||||||
'type': metricId,
|
'et_type': metricId,
|
||||||
'stream_type': 'composed_metrics',
|
'stream_type': 'composed_metrics',
|
||||||
'units': units
|
'units': units
|
||||||
};
|
};
|
||||||
|
@ -306,7 +306,7 @@ var WebRtcStats = /** @class */ (function () {
|
||||||
'exec': instrumentation.exec,
|
'exec': instrumentation.exec,
|
||||||
'component': instrumentation.component,
|
'component': instrumentation.component,
|
||||||
'stream': 'webRtc',
|
'stream': 'webRtc',
|
||||||
'type': metricId,
|
'et_type': metricId,
|
||||||
'stream_type': 'composed_metrics',
|
'stream_type': 'composed_metrics',
|
||||||
'units': units
|
'units': units
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -609,7 +609,7 @@ export class OpenVidu {
|
||||||
*/
|
*/
|
||||||
startWs(onConnectSucces: (error: Error) => void): void {
|
startWs(onConnectSucces: (error: Error) => void): void {
|
||||||
const config = {
|
const config = {
|
||||||
heartbeat: 5000,
|
heartbeat: process.env.OPENVIDU_BROWSER_PING_PERIOD || 5000,
|
||||||
sendCloseMessage: false,
|
sendCloseMessage: false,
|
||||||
ws: {
|
ws: {
|
||||||
uri: this.wsUri,
|
uri: this.wsUri,
|
||||||
|
@ -620,7 +620,7 @@ export class OpenVidu {
|
||||||
onreconnected: this.reconnectedCallback.bind(this)
|
onreconnected: this.reconnectedCallback.bind(this)
|
||||||
},
|
},
|
||||||
rpc: {
|
rpc: {
|
||||||
requestTimeout: 10000,
|
requestTimeout: process.env.OPENVIDU_BROWSER_PING_TIMEOUT || 10000,
|
||||||
participantJoined: this.session.onParticipantJoined.bind(this.session),
|
participantJoined: this.session.onParticipantJoined.bind(this.session),
|
||||||
participantPublished: this.session.onParticipantPublished.bind(this.session),
|
participantPublished: this.session.onParticipantPublished.bind(this.session),
|
||||||
participantUnpublished: this.session.onParticipantUnpublished.bind(this.session),
|
participantUnpublished: this.session.onParticipantUnpublished.bind(this.session),
|
||||||
|
|
Loading…
Reference in New Issue