Fix force codec H264 not working using openvidu-node-client

pull/656/head
cruizba 2021-09-24 19:58:56 +02:00
parent 5ee08a2d62
commit 0079231967
3 changed files with 18 additions and 14 deletions

View File

@ -120,7 +120,8 @@ public class SessionProperties {
* the specified codec and {@link #allowTranscoding(Boolean)} is * the specified codec and {@link #allowTranscoding(Boolean)} is
* <code>false</code> and exception will occur. If forcedVideoCodec is set to * <code>false</code> and exception will occur. If forcedVideoCodec is set to
* NONE, no codec will be forced.<br> * NONE, no codec will be forced.<br>
* Default value is {@link VideoCodec#VP8} * If defined here, this parameter has prevalence over OPENVIDU_STREAMS_FORCED_VIDEO_CODEC.
* OPENVIDU_STREAMS_FORCED_VIDEO_CODEC default is {@link VideoCodec#VP8}
*/ */
public SessionProperties.Builder forcedVideoCodec(VideoCodec forcedVideoCodec) { public SessionProperties.Builder forcedVideoCodec(VideoCodec forcedVideoCodec) {
this.forcedVideoCodec = forcedVideoCodec; this.forcedVideoCodec = forcedVideoCodec;
@ -131,7 +132,8 @@ public class SessionProperties {
* Call this method to define if you want to allow transcoding in the media * Call this method to define if you want to allow transcoding in the media
* server or not when {@link #forcedVideoCodec(VideoCodec)} is not compatible * server or not when {@link #forcedVideoCodec(VideoCodec)} is not compatible
* with the browser/client.<br> * with the browser/client.<br>
* Default value is false * If defined here, this parameter has prevalence over OPENVIDU_STREAMS_ALLOW_TRANSCODING.
* OPENVIDU_STREAMS_ALLOW_TRANSCODING default is 'false'
*/ */
public SessionProperties.Builder allowTranscoding(Boolean allowTranscoding) { public SessionProperties.Builder allowTranscoding(Boolean allowTranscoding) {
this.allowTranscoding = allowTranscoding; this.allowTranscoding = allowTranscoding;

View File

@ -656,8 +656,8 @@ export class Session {
props.recordingMode = (props.recordingMode != null) ? props.recordingMode : RecordingMode.MANUAL; props.recordingMode = (props.recordingMode != null) ? props.recordingMode : RecordingMode.MANUAL;
props.customSessionId = (props.customSessionId != null) ? props.customSessionId : ''; props.customSessionId = (props.customSessionId != null) ? props.customSessionId : '';
props.mediaNode = (props.mediaNode != null) ? props.mediaNode : undefined; props.mediaNode = (props.mediaNode != null) ? props.mediaNode : undefined;
props.forcedVideoCodec = (props.forcedVideoCodec != null) ? props.forcedVideoCodec : VideoCodec.VP8; props.forcedVideoCodec = props.forcedVideoCodec;
props.allowTranscoding = (props.allowTranscoding != null) ? props.allowTranscoding : false; props.allowTranscoding = props.allowTranscoding;
if (!props.defaultRecordingProperties) { if (!props.defaultRecordingProperties) {
props.defaultRecordingProperties = {}; props.defaultRecordingProperties = {};

View File

@ -72,7 +72,8 @@ export interface SessionProperties {
* If the browser/client is not compatible with the specified codec and [[allowTranscoding]] is <code>false</code> * If the browser/client is not compatible with the specified codec and [[allowTranscoding]] is <code>false</code>
* and exception will occur. If forcedVideoCodec is set to [[VideoCodec.NONE]], no codec will be forced. * and exception will occur. If forcedVideoCodec is set to [[VideoCodec.NONE]], no codec will be forced.
* *
* Default to [[VideoCodec.VP8]] * If defined here, this parameter has prevalence over OPENVIDU_STREAMS_FORCED_VIDEO_CODEC.
* OPENVIDU_STREAMS_FORCED_VIDEO_CODEC default is [[VideoCodec.VP8]]
*/ */
forcedVideoCodec?: VideoCodec; forcedVideoCodec?: VideoCodec;
@ -80,7 +81,8 @@ export interface SessionProperties {
* It defines if you want to allow transcoding in the media server or not * It defines if you want to allow transcoding in the media server or not
* when [[forcedVideoCodec]] is not compatible with the browser/client. * when [[forcedVideoCodec]] is not compatible with the browser/client.
* *
* Default to false * If defined here, this parameter has prevalence over OPENVIDU_STREAMS_ALLOW_TRANSCODING.
* OPENVIDU_STREAMS_ALLOW_TRANSCODING default is 'false'
*/ */
allowTranscoding?: boolean; allowTranscoding?: boolean;