Skip to content

Commit bf0789a

Browse files
Disable video cache by default as of v1.4
1 parent d9fe993 commit bf0789a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@creatomate/preview",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"description": "Render video and image previews in your web app prior to creating a final MP4, GIF, JPEG or PNG through the API.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/Preview.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export class Preview {
130130
iframe.setAttribute('height', '100%');
131131
iframe.setAttribute('scrolling', 'no');
132132
iframe.setAttribute('allow', 'autoplay');
133-
iframe.setAttribute('src', `https://creatomate.com/embed?version=1.3.0&token=${publicToken}`);
133+
iframe.setAttribute('src', `https://creatomate.com/embed?version=1.4.0&token=${publicToken}`);
134134
iframe.style.border = 'none';
135135
iframe.style.display = 'none';
136136

@@ -431,7 +431,6 @@ export class Preview {
431431

432432
/**
433433
* Sets the zoom state in interactive mode.
434-
* NOTE: This is an experimental setting and is likely to change in the near future.
435434
*
436435
* Zoom mode can be any of these values:
437436
* - 'free': Allows the user to freely pan and zoom the canvas. The default option.
@@ -468,7 +467,9 @@ export class Preview {
468467
* Sets a list of RegExp rules used to determine whether a video asset should be fully cached on the client's device.
469468
* This is especially useful for large video files that take a long time to download.
470469
* These rules do not apply to files hosted by the Creatomate CDN, because those are always cached.
471-
* NOTE: This is an experimental setting and is likely to change in the near future.
470+
*
471+
* The cache is disabled by default for video assets not hosted by Creatomate's CDN since @creatomate/preview version 1.4.
472+
* You can still cache the assets with a custom RegExp list passed to this function.
472473
*
473474
* @param rules A list of regular expressions matched against every video URL.
474475
* @example

0 commit comments

Comments
 (0)