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

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/461.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_plugin_export_video=this.webpackChunk_tsparticles_plugin_export_video||[]).push([[461],{461(e,t,i){i.d(t,{ExportVideoPlugin:()=>n});class n{id="export-video";async getPlugin(e){let{ExportVideoPluginInstance:t}=await i.e(478).then(i.bind(i,478));return new t(e)}loadOptions(){}needsPlugin(){return!0}}}}]);
package/478.min.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(this.webpackChunk_tsparticles_plugin_export_video=this.webpackChunk_tsparticles_plugin_export_video||[]).push([[478],{478(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/browser/index.js CHANGED
@@ -1,7 +1,8 @@
1
+ import {} from "@tsparticles/engine";
1
2
  export async function loadExportVideoPlugin(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(async (e) => {
3
+ engine.checkVersion("4.0.0-beta.2");
4
+ await engine.pluginManager.register(async (e) => {
4
5
  const { ExportVideoPlugin } = await import("./ExportVideoPlugin.js");
5
- e.addPlugin(new ExportVideoPlugin());
6
+ e.pluginManager.addPlugin(new ExportVideoPlugin());
6
7
  });
7
8
  }
package/cjs/index.js CHANGED
@@ -1,7 +1,8 @@
1
+ import {} from "@tsparticles/engine";
1
2
  export async function loadExportVideoPlugin(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(async (e) => {
3
+ engine.checkVersion("4.0.0-beta.2");
4
+ await engine.pluginManager.register(async (e) => {
4
5
  const { ExportVideoPlugin } = await import("./ExportVideoPlugin.js");
5
- e.addPlugin(new ExportVideoPlugin());
6
+ e.pluginManager.addPlugin(new ExportVideoPlugin());
6
7
  });
7
8
  }
@@ -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.2
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.2
8
8
  */
9
9
  "use strict";
10
10
  /*
package/esm/index.js CHANGED
@@ -1,7 +1,8 @@
1
+ import {} from "@tsparticles/engine";
1
2
  export async function loadExportVideoPlugin(engine) {
2
- engine.checkVersion("4.0.0-beta.0");
3
- await engine.register(async (e) => {
3
+ engine.checkVersion("4.0.0-beta.2");
4
+ await engine.pluginManager.register(async (e) => {
4
5
  const { ExportVideoPlugin } = await import("./ExportVideoPlugin.js");
5
- e.addPlugin(new ExportVideoPlugin());
6
+ e.pluginManager.addPlugin(new ExportVideoPlugin());
6
7
  });
7
8
  }
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.2",
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.1"
104
103
  },
105
104
  "publishConfig": {
106
105
  "access": "public"