UNPKG

@cloudinary/url-gen

Version:

Cloudinary URL-Gen SDK ========================= [![Build Status](https://api.travis-ci.com/cloudinary/js-url-gen.svg?branch=master)](https://app.travis-ci.com/github/cloudinary/js-url-gen) ## About The Cloudinary URL-Gen SDK allows you to quickly and eas

45 lines (44 loc) 1.49 kB
import { CloudinaryTransformable } from "./CloudinaryTransformable.js"; import { Transformation } from "../transformation/Transformation.js"; import { cloneDeep } from '../internal/utils/cloneDeep.js'; /** * @desc Cloudinary media asset, with all possible transformations * @summary SDK * @memberOf SDK */ class CloudinaryMedia extends CloudinaryTransformable { constructor(publicID, cloudConfig, urlConfig) { /* istanbul ignore next */ super(publicID, cloudConfig, urlConfig, new Transformation()); } /** * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation * @param {Actions.Transcode} action * @return {this} */ transcode(action) { this.transformation.transcode(action); return this; } /** * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation * @param {Actions.VideoEdit} action * @return {this} */ videoEdit(action) { this.transformation.videoEdit(action); return this; } /** * @desc A proxy to {@link SDK.Transformation| Transformation} - Calls the same method contained in this.transformation * @return {this} */ underlay(underlayAction) { this.transformation.underlay(underlayAction); return this; } clone() { return cloneDeep(this); } } export { CloudinaryMedia };