mirror of https://github.com/OpenVidu/openvidu.git
openvidu-node-client: send ConnectionProperties values on Session#createConnection
parent
9b5fffe30e
commit
0f781f44fd
|
@ -145,10 +145,15 @@ export class Session {
|
||||||
public createConnection(connectionProperties?: ConnectionProperties): Promise<Connection> {
|
public createConnection(connectionProperties?: ConnectionProperties): Promise<Connection> {
|
||||||
return new Promise<Connection>((resolve, reject) => {
|
return new Promise<Connection>((resolve, reject) => {
|
||||||
const data = JSON.stringify({
|
const data = JSON.stringify({
|
||||||
role: (!!connectionProperties && !!connectionProperties.role) ? connectionProperties.role : null,
|
type: (!!connectionProperties && !!connectionProperties.type) ? connectionProperties.type : null,
|
||||||
data: (!!connectionProperties && !!connectionProperties.data) ? connectionProperties.data : null,
|
data: (!!connectionProperties && !!connectionProperties.data) ? connectionProperties.data : null,
|
||||||
record: !!connectionProperties ? connectionProperties.record : null,
|
record: !!connectionProperties ? connectionProperties.record : null,
|
||||||
kurentoOptions: (!!connectionProperties && !!connectionProperties.kurentoOptions) ? connectionProperties.kurentoOptions : null
|
role: (!!connectionProperties && !!connectionProperties.role) ? connectionProperties.role : null,
|
||||||
|
kurentoOptions: (!!connectionProperties && !!connectionProperties.kurentoOptions) ? connectionProperties.kurentoOptions : null,
|
||||||
|
rtspUri: (!!connectionProperties && !!connectionProperties.rtspUri) ? connectionProperties.rtspUri : null,
|
||||||
|
adaptativeBitrate: !!connectionProperties ? connectionProperties.adaptativeBitrate : null,
|
||||||
|
onlyPlayWithSubscribers: !!connectionProperties ? connectionProperties.onlyPlayWithSubscribers : null,
|
||||||
|
networkCache: (!!connectionProperties && (connectionProperties.networkCache != null)) ? connectionProperties.networkCache : null
|
||||||
});
|
});
|
||||||
axios.post(
|
axios.post(
|
||||||
this.ov.host + OpenVidu.API_SESSIONS + '/' + this.sessionId + '/connection',
|
this.ov.host + OpenVidu.API_SESSIONS + '/' + this.sessionId + '/connection',
|
||||||
|
@ -471,8 +476,10 @@ export class Session {
|
||||||
const forcedVideoCodec = !!this.properties.forcedVideoCodec ? this.properties.forcedVideoCodec : undefined;
|
const forcedVideoCodec = !!this.properties.forcedVideoCodec ? this.properties.forcedVideoCodec : undefined;
|
||||||
const allowTranscoding = this.properties.allowTranscoding != null ? this.properties.allowTranscoding : undefined;
|
const allowTranscoding = this.properties.allowTranscoding != null ? this.properties.allowTranscoding : undefined;
|
||||||
|
|
||||||
const data = JSON.stringify({mediaMode, recordingMode, defaultOutputMode, defaultRecordingLayout, defaultCustomLayout,
|
const data = JSON.stringify({
|
||||||
customSessionId, mediaNode, forcedVideoCodec, allowTranscoding});
|
mediaMode, recordingMode, defaultOutputMode, defaultRecordingLayout, defaultCustomLayout,
|
||||||
|
customSessionId, mediaNode, forcedVideoCodec, allowTranscoding
|
||||||
|
});
|
||||||
|
|
||||||
axios.post(
|
axios.post(
|
||||||
this.ov.host + OpenVidu.API_SESSIONS,
|
this.ov.host + OpenVidu.API_SESSIONS,
|
||||||
|
|
Loading…
Reference in New Issue