Class: Gif2VideoChain
Defined in: fluent/chains.ts:267
A chainable on-the-fly gif2video CDN url.
Extends
Chain<Gif2VideoState>
Accessors
href
Get Signature
get href(): string;Defined in: fluent/chains.ts:283
The serialized URL.
Returns
string
operations
Get Signature
get operations(): CdnOperation[];Defined in: fluent/chain-base.ts:164
The operations accumulated so far (defensive copy).
Returns
Inherited from
Chain.operations
Methods
base()
base(cdnBase): this;Defined in: fluent/chains.ts:278
Rebases the chain onto another cdnBase (trailing slash tolerated).
Parameters
| Parameter | Type |
|---|---|
cdnBase | string |
Returns
this
format()
format(value): this;Defined in: fluent/chains.ts:269
Appends format; mirrors the creator in the matching conversion entry.
Parameters
| Parameter | Type |
|---|---|
value | "mp4" | "webm" |
Returns
this
getAllOps()
getAllOps(ref): CdnOperation[];Defined in: fluent/chain-base.ts:129
Every matching operation, in chain order. Mirrors CdnUrl.getAll.
Parameters
| Parameter | Type |
|---|---|
ref | OperationRef |
Returns
Example
chain.getAllOps('overlay') // → [{ name: 'overlay', … }, …]Inherited from
Chain.getAllOps
getOp()
getOp(ref): CdnOperation | null;Defined in: fluent/chain-base.ts:117
First matching operation, or null. Mirrors CdnUrl.get.
Parameters
| Parameter | Type |
|---|---|
ref | OperationRef |
Returns
CdnOperation | null
Example
myCdn.file(uuid).quality('smart').getOp('quality')
// → { name: 'quality', params: ['smart'] }Inherited from
Chain.getOp
hasOp()
hasOp(ref): boolean;Defined in: fluent/chain-base.ts:104
Whether a matching operation is present. Mirrors CdnUrl.has; named with the Op suffix so it can never collide with a transformation method.
Parameters
| Parameter | Type |
|---|---|
ref | OperationRef |
Returns
boolean
Example
myCdn.file(uuid).quality('smart').hasOp(quality) // → trueInherited from
Chain.hasOp
op()
op(name, ...params): this;Defined in: fluent/chain-base.ts:58
Appends an arbitrary operation without validation (escape hatch).
Parameters
| Parameter | Type |
|---|---|
name | string |
...params | string[] |
Returns
this
Inherited from
Chain.op
quality()
quality(value): this;Defined in: fluent/chains.ts:273
Appends quality; mirrors the creator in the matching conversion entry.
Parameters
| Parameter | Type |
|---|---|
value | "normal" | "lighter" | "better" | "best" | "lightest" |
Returns
this
replaceAllOps()
replaceAllOps(operation): this;Defined in: fluent/chain-base.ts:157
Collapses every matching operation into one, kept at the position of the first match; appends when nothing matches. Mirrors CdnUrl.replaceAll.
Parameters
| Parameter | Type |
|---|---|
operation | CdnOperation |
Returns
this
Example
chain.replaceAllOps({ name: 'overlay', params: [uuid] }).operationsInherited from
Chain.replaceAllOps
replaceOp()
replaceOp(operation): this;Defined in: fluent/chain-base.ts:142
Replaces the first matching operation in place, or appends it. Mirrors CdnUrl.replace.
Parameters
| Parameter | Type |
|---|---|
operation | CdnOperation |
Returns
this
Example
myCdn.file(uuid).resize({ width: 300 }).replaceOp(resize({ width: 500 })).hrefInherited from
Chain.replaceOp
toString()
toString(): string;Defined in: fluent/chains.ts:293
Alias of the terminal getter for string coercion.
Returns
string
updateOperations()
updateOperations(update): this;Defined in: fluent/chain-base.ts:89
The primitive the other operation mutators are sugar over: rewrites the whole chain through a callback, preserving the chain subtype. Mirrors CdnUrl.updateOperations, and is the only way to edit by position — replacing the nth stackable operation, inserting at an index, or reordering. It is also the sole edit path for conversion chains (video/document/gif2video), which cannot be re-parsed from output.
The callback receives a defensive copy; whatever it returns becomes the new chain.
Parameters
| Parameter | Type |
|---|---|
update | (current) => readonly CdnOperation[] |
Returns
this
Example
cdn.video(uuid).size({ width: 720 }).thumbs(5)
.updateOperations((ops) =>
ops.map((op) => (op.name === 'size' ? size({ width: 480 }) : op))
).path // → /uuid/video/-/size/480x/-/thumbs~5/Inherited from
Chain.updateOperations
withoutOp()
withoutOp(ref): this;Defined in: fluent/chain-base.ts:66
Removes every occurrence of an operation. Accepts the operation name, an operation object, or the creator itself: chain.withoutOp(resize).
Parameters
| Parameter | Type |
|---|---|
ref | OperationRef |
Returns
this
Inherited from
Chain.withoutOp