Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
default: () => Cloudinary.DEFAULT_VIDEO_PARAMS.source_types.reduce((currSrc, type) => ({ ...currSrc, [type]: {} }), {})
}
render() {
let {publicId, poster, sourceTypes, fallback, sourceTransformation: sourceTransformations, innerRef, ...options} = Object.assign({},
this.getContext(),
this.props);
sourceTransformations = sourceTransformations || {};
sourceTypes = sourceTypes || Cloudinary.DEFAULT_VIDEO_PARAMS.source_types;
options = CloudinaryComponent.normalizeOptions(options, {});
let cld = Cloudinary.new(Util.withSnakeCaseKeys(options));
let sources = [];
let tagAttributes = Transformation.new(options).toHtmlAttributes();
let childTransformations = this.getTransformation(options);
if (Util.isPlainObject(poster)) {
let defaults = poster.publicId !== undefined && poster.publicId !== null ? Cloudinary.DEFAULT_IMAGE_PARAMS : DEFAULT_POSTER_OPTIONS;
poster = cld.url(poster.publicId || publicId, Util.defaults({}, Util.withSnakeCaseKeys(poster), defaults));
}
if (!Util.isEmpty(poster)) {
tagAttributes.poster = poster;
}
if (!Util.isEmpty(this.state.poster)) {
tagAttributes.poster = this.state.poster;
}