Skip to content

replaceVideoBlockByUrl

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-13-upload/video-directive.ts

videoOnly regen: replace an already-rewritten :::video{…} block (identified by the OLD src url it contains) with a freshly-built directive. Used to patch the ACTIVE version in place when a re-narration/re-assembly produced a new blob url (cache-bust) and/or new chapters — mirrors the asset-update old→new swap but for the whole directive so chapters stay in sync. Returns content unchanged when the old url isn't present.

Signature

ts
function replaceVideoBlockByUrl(content: string, oldUrl: string, directive: string): string

Parameters

NameType
contentstring
oldUrlstring
directivestring

Returns: string

Was this page helpful?

Download as PDF