@tsparticles/plugin-export-video 4.0.0-beta.0 → 4.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/231.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_plugin_export_video=this.webpackChunk_tsparticles_plugin_export_video||[]).push([[231],{231(e,t,p){p.d(t,{ExportVideoPluginInstance:()=>a});var s=p(303);let o=["webm","ogg","mp4","x-matroska"],r=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","opus","pcm","aac","mpeg","mp4a"];class a{_container;_supportedTypes=[];constructor(e){this._container=e,this._supportedTypes=function(){let e=[];return o.forEach(t=>{let p=`video/${t}`;r.forEach(t=>{[`${p};codecs=${t}`,`${p};codecs=${t.toUpperCase()}`].forEach(t=>{MediaRecorder.isTypeSupported(t)&&e.push(t)})}),MediaRecorder.isTypeSupported(p)&&e.push(p)}),e}()}async export(e,t){let p={supported:!1};return"video"===e&&(p.supported=!0,p.blob=await this._exportVideo(t)),p}_exportVideo=async e=>{let t=this._container.canvas.element;if(t)return new Promise(p=>{let o=t.captureStream(e.fps??this._container.actualOptions.fpsLimit),r=e.mimeType??this._supportedTypes[0],a=new MediaRecorder(o,{mimeType:r}),i=[];a.addEventListener("dataavailable",e=>{i.push(e.data)}),a.addEventListener("stop",()=>{p(new Blob(i,{type:r}))}),a.start(),setTimeout(()=>{a.stop()},e.duration??5*s.millisecondsToSeconds)})}}}}]);
package/648.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_plugin_export_video=this.webpackChunk_tsparticles_plugin_export_video||[]).push([[648],{648(e,t,i){i.d(t,{ExportVideoPlugin:()=>n});class n{id="export-video";async getPlugin(e){let{ExportVideoPluginInstance:t}=await i.e(231).then(i.bind(i,231));return new t(e)}loadOptions(){}needsPlugin(){return!0}}}}]);
package/README.md CHANGED
@@ -8,6 +8,12 @@
8
8
 
9
9
  [tsParticles](https://github.com/tsparticles/tsparticles) plugin for adding the export video support.
10
10
 
11
+ ## Quick checklist
12
+
13
+ 1. Install `@tsparticles/engine` (or use the CDN bundle below)
14
+ 2. Call the package loader function(s) before `tsParticles.load(...)`
15
+ 3. Apply the package options in your `tsParticles.load(...)` config
16
+
11
17
  ## How to use it
12
18
 
13
19
  ### CDN / Vanilla JS / jQuery
@@ -72,3 +78,19 @@ import { loadExportVideoPlugin } from "@tsparticles/plugin-export-video";
72
78
  await loadExportVideoPlugin();
73
79
  })();
74
80
  ```
81
+
82
+ ## Option mapping
83
+
84
+ - This package primarily extends runtime behavior or rendering and may not expose a single dedicated root options key.
85
+ - Use the usage example in this README and combine with the nearest options section in the docs.
86
+
87
+ ## Common pitfalls
88
+
89
+ - Calling `tsParticles.load(...)` before `loadExportVideoPlugin(...)`
90
+ - Verify required peer packages before enabling advanced options
91
+ - Change one option group at a time to isolate regressions quickly
92
+
93
+ ## Related docs
94
+
95
+ - All packages catalog: <https://github.com/tsparticles/tsparticles>
96
+ - Main docs: <https://particles.js.org/docs/>
package/browser/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export async function loadExportVideoPlugin(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(async (e) => {
2
+ engine.checkVersion("4.0.0-beta.10");
3
+ await engine.pluginManager.register(async (e) => {
4
4
  const { ExportVideoPlugin } = await import("./ExportVideoPlugin.js");
5
- e.addPlugin(new ExportVideoPlugin());
5
+ e.pluginManager.addPlugin(new ExportVideoPlugin());
6
6
  });
7
7
  }
package/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export async function loadExportVideoPlugin(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(async (e) => {
2
+ engine.checkVersion("4.0.0-beta.10");
3
+ await engine.pluginManager.register(async (e) => {
4
4
  const { ExportVideoPlugin } = await import("./ExportVideoPlugin.js");
5
- e.addPlugin(new ExportVideoPlugin());
5
+ e.pluginManager.addPlugin(new ExportVideoPlugin());
6
6
  });
7
7
  }
@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v4.0.0-beta.0
7
+ * v4.0.0-beta.10
8
8
  */
9
9
  "use strict";
10
10
  /*
@@ -4,7 +4,7 @@
4
4
  * Demo / Generator : https://particles.js.org/
5
5
  * GitHub : https://www.github.com/matteobruni/tsparticles
6
6
  * How to use? : Check the GitHub README
7
- * v4.0.0-beta.0
7
+ * v4.0.0-beta.10
8
8
  */
9
9
  "use strict";
10
10
  /*
package/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export async function loadExportVideoPlugin(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(async (e) => {
2
+ engine.checkVersion("4.0.0-beta.10");
3
+ await engine.pluginManager.register(async (e) => {
4
4
  const { ExportVideoPlugin } = await import("./ExportVideoPlugin.js");
5
- e.addPlugin(new ExportVideoPlugin());
5
+ e.pluginManager.addPlugin(new ExportVideoPlugin());
6
6
  });
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsparticles/plugin-export-video",
3
- "version": "4.0.0-beta.0",
3
+ "version": "4.0.0-beta.10",
4
4
  "description": "tsParticles export video plugin",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -94,13 +94,12 @@
94
94
  "browser": "./browser/index.js",
95
95
  "import": "./esm/index.js",
96
96
  "require": "./cjs/index.js",
97
- "umd": "./umd/index.js",
98
- "default": "./cjs/index.js"
97
+ "default": "./esm/index.js"
99
98
  },
100
99
  "./package.json": "./package.json"
101
100
  },
102
- "dependencies": {
103
- "@tsparticles/engine": "4.0.0-beta.0"
101
+ "peerDependencies": {
102
+ "@tsparticles/engine": "4.0.0-beta.10"
104
103
  },
105
104
  "publishConfig": {
106
105
  "access": "public"