diff --git a/src/plugins/cloudinary/models/video-source/video-source.js b/src/plugins/cloudinary/models/video-source/video-source.js index b4bb10cb..a77ad099 100644 --- a/src/plugins/cloudinary/models/video-source/video-source.js +++ b/src/plugins/cloudinary/models/video-source/video-source.js @@ -72,6 +72,7 @@ class VideoSource extends BaseSource { this._chapters = null; this._type = SOURCE_TYPE.VIDEO; this.isRawUrl = _isRawUrl; + this.isLiveStream = options.type === 'live'; this._rawTransformation = options.raw_transformation; this.withCredentials = !!withCredentials; this.getInitOptions = () => initOptions; @@ -172,6 +173,10 @@ class VideoSource extends BaseSource { return null; } + if (this.isLiveStream) { + return null; + } + if (!publicId) { publicId = this.publicId(); options = Object.assign({}, options, DEFAULT_POSTER_PARAMS); @@ -222,7 +227,8 @@ class VideoSource extends BaseSource { if (isAdaptive) { // Search for streaming_profile anywhere in the transformation - if (!JSON.stringify(opts.transformation || {}).includes('"streaming_profile":')) { + const hasStreamingProfile = JSON.stringify(opts.transformation || {}).includes('"streaming_profile":'); + if (!hasStreamingProfile && !this.isLiveStream) { opts.transformation = mergeTransformations(opts.transformation, { streaming_profile: 'auto' }); diff --git a/src/video-player.js b/src/video-player.js index f6db0345..539bf06d 100644 --- a/src/video-player.js +++ b/src/video-player.js @@ -245,6 +245,7 @@ class VideoPlayer extends Utils.mixin(Eventable) { if ( !source || source.getType() === SOURCE_TYPE.AUDIO || // Is Audio + source.resourceConfig().type === 'live' || // Is live stream isRawUrl(source.publicId()) || // Is a raw url (this.videojs.activePlugins_ && this.videojs.activePlugins_.vr) // It's a VR (i.e. 360) ) {