@tsparticles/plugin-export-video 4.0.0-alpha.2 → 4.0.0-alpha.4
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/46.min.js +2 -0
- package/46.min.js.LICENSE.txt +1 -0
- package/77.min.js +2 -0
- package/77.min.js.LICENSE.txt +1 -0
- package/browser/ExportVideoPlugin.js +3 -3
- package/{esm/ExportVideoInstance.js → browser/ExportVideoPluginInstance.js} +1 -1
- package/browser/index.js +1 -1
- package/cjs/ExportVideoPlugin.js +3 -3
- package/{browser/ExportVideoInstance.js → cjs/ExportVideoPluginInstance.js} +1 -1
- package/cjs/index.js +1 -1
- package/dist_browser_ExportVideoPluginInstance_js.js +30 -0
- package/dist_browser_ExportVideoPlugin_js.js +2 -12
- package/esm/ExportVideoPlugin.js +3 -3
- package/{cjs/ExportVideoInstance.js → esm/ExportVideoPluginInstance.js} +1 -1
- package/esm/index.js +1 -1
- package/package.json +2 -2
- package/report.html +1 -1
- package/tsparticles.plugin.export.video.js +4 -16
- package/tsparticles.plugin.export.video.min.js +1 -1
- package/tsparticles.plugin.export.video.min.js.LICENSE.txt +1 -1
- package/types/ExportVideoPlugin.d.ts +2 -3
- package/types/{ExportVideoInstance.d.ts → ExportVideoPluginInstance.d.ts} +1 -1
- package/umd/ExportVideoPlugin.js +38 -4
- package/umd/{ExportVideoInstance.js → ExportVideoPluginInstance.js} +3 -3
- package/umd/index.js +1 -1
- package/973.min.js +0 -2
- package/973.min.js.LICENSE.txt +0 -1
package/46.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 46.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_plugin_export_video=this.webpackChunk_tsparticles_plugin_export_video||[]).push([[46],{46(e,t,s){s.d(t,{ExportVideoPluginInstance:()=>a});var o=s(303);const p=["webm","ogg","mp4","x-matroska"],i=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","opus","pcm","aac","mpeg","mp4a"];class a{constructor(e){this._supportedTypes=[],this._exportVideo=async e=>{const t=this._container.canvas.element;if(t)return new Promise((s=>{const p=t.captureStream(e.fps??this._container.actualOptions.fpsLimit),i=e.mimeType??this._supportedTypes[0],a=new MediaRecorder(p,{mimeType:i}),r=[];a.addEventListener("dataavailable",(e=>{r.push(e.data)})),a.addEventListener("stop",(()=>{s(new Blob(r,{type:i}))})),a.start(),setTimeout((()=>{a.stop()}),e.duration??5*o.millisecondsToSeconds)}))},this._container=e,this._supportedTypes=function(){const e=e=>MediaRecorder.isTypeSupported(e),t=[];return p.forEach((s=>{const o=`video/${s}`;i.forEach((s=>{[`${o};codecs=${s}`,`${o};codecs=${s.toUpperCase()}`].forEach((s=>{e(s)&&t.push(s)}))})),e(o)&&t.push(o)})),t}()}async export(e,t){const s={supported:!1};if("video"===e)s.supported=!0,s.blob=await this._exportVideo(t);return s}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Export Video Plugin v4.0.0-alpha.4 by Matteo Bruni */
|
package/77.min.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 77.min.js.LICENSE.txt */
|
|
2
|
+
(this.webpackChunk_tsparticles_plugin_export_video=this.webpackChunk_tsparticles_plugin_export_video||[]).push([[77],{77(t,e,i){i.d(e,{ExportVideoPlugin:()=>n});class n{constructor(){this.id="export-video"}async getPlugin(t){const{ExportVideoPluginInstance:e}=await i.e(46).then(i.bind(i,46));return new e(t)}loadOptions(){}needsPlugin(){return!0}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tsParticles Export Video Plugin v4.0.0-alpha.4 by Matteo Bruni */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ExportVideoInstance } from "./ExportVideoInstance.js";
|
|
2
1
|
export class ExportVideoPlugin {
|
|
3
2
|
constructor() {
|
|
4
3
|
this.id = "export-video";
|
|
5
4
|
}
|
|
6
|
-
getPlugin(container) {
|
|
7
|
-
|
|
5
|
+
async getPlugin(container) {
|
|
6
|
+
const { ExportVideoPluginInstance } = await import("./ExportVideoPluginInstance.js");
|
|
7
|
+
return new ExportVideoPluginInstance(container);
|
|
8
8
|
}
|
|
9
9
|
loadOptions() {
|
|
10
10
|
}
|
package/browser/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function loadExportVideoPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-alpha.
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.4");
|
|
3
3
|
engine.register(async (e) => {
|
|
4
4
|
const { ExportVideoPlugin } = await import("./ExportVideoPlugin.js");
|
|
5
5
|
e.addPlugin(new ExportVideoPlugin());
|
package/cjs/ExportVideoPlugin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ExportVideoInstance } from "./ExportVideoInstance.js";
|
|
2
1
|
export class ExportVideoPlugin {
|
|
3
2
|
constructor() {
|
|
4
3
|
this.id = "export-video";
|
|
5
4
|
}
|
|
6
|
-
getPlugin(container) {
|
|
7
|
-
|
|
5
|
+
async getPlugin(container) {
|
|
6
|
+
const { ExportVideoPluginInstance } = await import("./ExportVideoPluginInstance.js");
|
|
7
|
+
return new ExportVideoPluginInstance(container);
|
|
8
8
|
}
|
|
9
9
|
loadOptions() {
|
|
10
10
|
}
|
package/cjs/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function loadExportVideoPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-alpha.
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.4");
|
|
3
3
|
engine.register(async (e) => {
|
|
4
4
|
const { ExportVideoPlugin } = await import("./ExportVideoPlugin.js");
|
|
5
5
|
e.addPlugin(new ExportVideoPlugin());
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v4.0.0-alpha.4
|
|
8
|
+
*/
|
|
9
|
+
"use strict";
|
|
10
|
+
/*
|
|
11
|
+
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
12
|
+
* This devtool is neither made for production nor for readable output files.
|
|
13
|
+
* It uses "eval()" calls to create a separate source file in the browser devtools.
|
|
14
|
+
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
|
|
15
|
+
* or disable the default devtool with "devtool: false".
|
|
16
|
+
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
|
|
17
|
+
*/
|
|
18
|
+
(this["webpackChunk_tsparticles_plugin_export_video"] = this["webpackChunk_tsparticles_plugin_export_video"] || []).push([["dist_browser_ExportVideoPluginInstance_js"],{
|
|
19
|
+
|
|
20
|
+
/***/ "./dist/browser/ExportVideoPluginInstance.js"
|
|
21
|
+
/*!***************************************************!*\
|
|
22
|
+
!*** ./dist/browser/ExportVideoPluginInstance.js ***!
|
|
23
|
+
\***************************************************/
|
|
24
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
|
+
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ExportVideoPluginInstance: () => (/* binding */ ExportVideoPluginInstance)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nconst videoTypes = [\"webm\", \"ogg\", \"mp4\", \"x-matroska\"],\n codecs = [\"vp9\", \"vp9.0\", \"vp8\", \"vp8.0\", \"avc1\", \"av1\", \"h265\", \"h.265\", \"h264\", \"h.264\", \"opus\", \"pcm\", \"aac\", \"mpeg\", \"mp4a\"];\nfunction getVideoSupportedMimeTypes() {\n const isSupported = type => MediaRecorder.isTypeSupported(type),\n supported = [];\n videoTypes.forEach(type => {\n const mimeType = `video/${type}`;\n codecs.forEach(codec => {\n [`${mimeType};codecs=${codec}`, `${mimeType};codecs=${codec.toUpperCase()}`].forEach(variation => {\n if (isSupported(variation)) {\n supported.push(variation);\n }\n });\n });\n if (isSupported(mimeType)) {\n supported.push(mimeType);\n }\n });\n return supported;\n}\nclass ExportVideoPluginInstance {\n constructor(container) {\n this._supportedTypes = [];\n this._exportVideo = async data => {\n const element = this._container.canvas.element;\n if (!element) {\n return;\n }\n return new Promise(resolve => {\n const stream = element.captureStream(data.fps ?? this._container.actualOptions.fpsLimit),\n firstIndex = 0,\n mimeType = data.mimeType ?? this._supportedTypes[firstIndex],\n recorder = new MediaRecorder(stream, {\n mimeType\n }),\n chunks = [],\n defaultDuration = 5;\n recorder.addEventListener(\"dataavailable\", event => {\n chunks.push(event.data);\n });\n recorder.addEventListener(\"stop\", () => {\n resolve(new Blob(chunks, {\n type: mimeType\n }));\n });\n recorder.start();\n setTimeout(() => {\n recorder.stop();\n }, data.duration ?? defaultDuration * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds);\n });\n };\n this._container = container;\n this._supportedTypes = getVideoSupportedMimeTypes();\n }\n async export(type, data) {\n const res = {\n supported: false\n };\n switch (type) {\n case \"video\":\n res.supported = true;\n res.blob = await this._exportVideo(data);\n break;\n }\n return res;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-export-video/./dist/browser/ExportVideoPluginInstance.js?\n}");
|
|
27
|
+
|
|
28
|
+
/***/ }
|
|
29
|
+
|
|
30
|
+
}]);
|
|
@@ -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-alpha.
|
|
7
|
+
* v4.0.0-alpha.4
|
|
8
8
|
*/
|
|
9
9
|
"use strict";
|
|
10
10
|
/*
|
|
@@ -17,23 +17,13 @@
|
|
|
17
17
|
*/
|
|
18
18
|
(this["webpackChunk_tsparticles_plugin_export_video"] = this["webpackChunk_tsparticles_plugin_export_video"] || []).push([["dist_browser_ExportVideoPlugin_js"],{
|
|
19
19
|
|
|
20
|
-
/***/ "./dist/browser/ExportVideoInstance.js"
|
|
21
|
-
/*!*********************************************!*\
|
|
22
|
-
!*** ./dist/browser/ExportVideoInstance.js ***!
|
|
23
|
-
\*********************************************/
|
|
24
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25
|
-
|
|
26
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ExportVideoInstance: () => (/* binding */ ExportVideoInstance)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n\nconst videoTypes = [\"webm\", \"ogg\", \"mp4\", \"x-matroska\"],\n codecs = [\"vp9\", \"vp9.0\", \"vp8\", \"vp8.0\", \"avc1\", \"av1\", \"h265\", \"h.265\", \"h264\", \"h.264\", \"opus\", \"pcm\", \"aac\", \"mpeg\", \"mp4a\"];\nfunction getVideoSupportedMimeTypes() {\n const isSupported = type => MediaRecorder.isTypeSupported(type),\n supported = [];\n videoTypes.forEach(type => {\n const mimeType = `video/${type}`;\n codecs.forEach(codec => {\n [`${mimeType};codecs=${codec}`, `${mimeType};codecs=${codec.toUpperCase()}`].forEach(variation => {\n if (isSupported(variation)) {\n supported.push(variation);\n }\n });\n });\n if (isSupported(mimeType)) {\n supported.push(mimeType);\n }\n });\n return supported;\n}\nclass ExportVideoInstance {\n constructor(container) {\n this._supportedTypes = [];\n this._exportVideo = async data => {\n const element = this._container.canvas.element;\n if (!element) {\n return;\n }\n return new Promise(resolve => {\n const stream = element.captureStream(data.fps ?? this._container.actualOptions.fpsLimit),\n firstIndex = 0,\n mimeType = data.mimeType ?? this._supportedTypes[firstIndex],\n recorder = new MediaRecorder(stream, {\n mimeType\n }),\n chunks = [],\n defaultDuration = 5;\n recorder.addEventListener(\"dataavailable\", event => {\n chunks.push(event.data);\n });\n recorder.addEventListener(\"stop\", () => {\n resolve(new Blob(chunks, {\n type: mimeType\n }));\n });\n recorder.start();\n setTimeout(() => {\n recorder.stop();\n }, data.duration ?? defaultDuration * _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.millisecondsToSeconds);\n });\n };\n this._container = container;\n this._supportedTypes = getVideoSupportedMimeTypes();\n }\n async export(type, data) {\n const res = {\n supported: false\n };\n switch (type) {\n case \"video\":\n res.supported = true;\n res.blob = await this._exportVideo(data);\n break;\n }\n return res;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-export-video/./dist/browser/ExportVideoInstance.js?\n}");
|
|
27
|
-
|
|
28
|
-
/***/ },
|
|
29
|
-
|
|
30
20
|
/***/ "./dist/browser/ExportVideoPlugin.js"
|
|
31
21
|
/*!*******************************************!*\
|
|
32
22
|
!*** ./dist/browser/ExportVideoPlugin.js ***!
|
|
33
23
|
\*******************************************/
|
|
34
24
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
35
25
|
|
|
36
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ExportVideoPlugin: () => (/* binding */ ExportVideoPlugin)\n/* harmony export */ });\
|
|
26
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ExportVideoPlugin: () => (/* binding */ ExportVideoPlugin)\n/* harmony export */ });\nclass ExportVideoPlugin {\n constructor() {\n this.id = \"export-video\";\n }\n async getPlugin(container) {\n const {\n ExportVideoPluginInstance\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_ExportVideoPluginInstance_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ExportVideoPluginInstance.js */ \"./dist/browser/ExportVideoPluginInstance.js\"));\n return new ExportVideoPluginInstance(container);\n }\n loadOptions() {}\n needsPlugin() {\n return true;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-export-video/./dist/browser/ExportVideoPlugin.js?\n}");
|
|
37
27
|
|
|
38
28
|
/***/ }
|
|
39
29
|
|
package/esm/ExportVideoPlugin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ExportVideoInstance } from "./ExportVideoInstance.js";
|
|
2
1
|
export class ExportVideoPlugin {
|
|
3
2
|
constructor() {
|
|
4
3
|
this.id = "export-video";
|
|
5
4
|
}
|
|
6
|
-
getPlugin(container) {
|
|
7
|
-
|
|
5
|
+
async getPlugin(container) {
|
|
6
|
+
const { ExportVideoPluginInstance } = await import("./ExportVideoPluginInstance.js");
|
|
7
|
+
return new ExportVideoPluginInstance(container);
|
|
8
8
|
}
|
|
9
9
|
loadOptions() {
|
|
10
10
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function loadExportVideoPlugin(engine) {
|
|
2
|
-
engine.checkVersion("4.0.0-alpha.
|
|
2
|
+
engine.checkVersion("4.0.0-alpha.4");
|
|
3
3
|
engine.register(async (e) => {
|
|
4
4
|
const { ExportVideoPlugin } = await import("./ExportVideoPlugin.js");
|
|
5
5
|
e.addPlugin(new ExportVideoPlugin());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/plugin-export-video",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.4",
|
|
4
4
|
"description": "tsParticles export video plugin",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"./package.json": "./package.json"
|
|
101
101
|
},
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@tsparticles/engine": "4.0.0-alpha.
|
|
103
|
+
"@tsparticles/engine": "4.0.0-alpha.4"
|
|
104
104
|
},
|
|
105
105
|
"publishConfig": {
|
|
106
106
|
"access": "public"
|
package/report.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8"/>
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
6
|
-
<title>@tsparticles/plugin-export-video [
|
|
6
|
+
<title>@tsparticles/plugin-export-video [21 Jan 2026 at 14:33]</title>
|
|
7
7
|
<link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
|
|
8
8
|
|
|
9
9
|
<script>
|
|
@@ -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-alpha.
|
|
7
|
+
* v4.0.0-alpha.4
|
|
8
8
|
*/
|
|
9
9
|
/*
|
|
10
10
|
* ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
|
|
@@ -34,7 +34,7 @@ return /******/ (() => { // webpackBootstrap
|
|
|
34
34
|
\*******************************/
|
|
35
35
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
36
36
|
|
|
37
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadExportVideoPlugin: () => (/* binding */ loadExportVideoPlugin)\n/* harmony export */ });\nfunction loadExportVideoPlugin(engine) {\n engine.checkVersion(\"4.0.0-alpha.
|
|
37
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadExportVideoPlugin: () => (/* binding */ loadExportVideoPlugin)\n/* harmony export */ });\nfunction loadExportVideoPlugin(engine) {\n engine.checkVersion(\"4.0.0-alpha.4\");\n engine.register(async e => {\n const {\n ExportVideoPlugin\n } = await __webpack_require__.e(/*! import() */ \"dist_browser_ExportVideoPlugin_js\").then(__webpack_require__.bind(__webpack_require__, /*! ./ExportVideoPlugin.js */ \"./dist/browser/ExportVideoPlugin.js\"));\n e.addPlugin(new ExportVideoPlugin());\n });\n}\n\n//# sourceURL=webpack://@tsparticles/plugin-export-video/./dist/browser/index.js?\n}");
|
|
38
38
|
|
|
39
39
|
/***/ },
|
|
40
40
|
|
|
@@ -118,18 +118,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
118
118
|
/******/ };
|
|
119
119
|
/******/ })();
|
|
120
120
|
/******/
|
|
121
|
-
/******/ /* webpack/runtime/global */
|
|
122
|
-
/******/ (() => {
|
|
123
|
-
/******/ __webpack_require__.g = (function() {
|
|
124
|
-
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
125
|
-
/******/ try {
|
|
126
|
-
/******/ return this || new Function('return this')();
|
|
127
|
-
/******/ } catch (e) {
|
|
128
|
-
/******/ if (typeof window === 'object') return window;
|
|
129
|
-
/******/ }
|
|
130
|
-
/******/ })();
|
|
131
|
-
/******/ })();
|
|
132
|
-
/******/
|
|
133
121
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
134
122
|
/******/ (() => {
|
|
135
123
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
@@ -194,8 +182,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__tsparticles_engine__;
|
|
|
194
182
|
/******/ /* webpack/runtime/publicPath */
|
|
195
183
|
/******/ (() => {
|
|
196
184
|
/******/ var scriptUrl;
|
|
197
|
-
/******/ if (
|
|
198
|
-
/******/ var document =
|
|
185
|
+
/******/ if (globalThis.importScripts) scriptUrl = globalThis.location + "";
|
|
186
|
+
/******/ var document = globalThis.document;
|
|
199
187
|
/******/ if (!scriptUrl && document) {
|
|
200
188
|
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
|
201
189
|
/******/ scriptUrl = document.currentScript.src;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.plugin.export.video.min.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(e=>(()=>{var t,r,o={303(t){t.exports=e}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e](r,r.exports,n),r.exports}n.m=o,n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>e+".min.js",n.
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var r="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var o in r)("object"==typeof exports?exports:e)[o]=r[o]}}(this,(e=>(()=>{var t,r,o={303(t){t.exports=e}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e](r,r.exports,n),r.exports}n.m=o,n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,r)=>(n.f[r](e,t),t)),[])),n.u=e=>e+".min.js",n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},r="@tsparticles/plugin-export-video:",n.l=(e,o,i,a)=>{if(t[e])t[e].push(o);else{var l,s;if(void 0!==i)for(var p=document.getElementsByTagName("script"),c=0;c<p.length;c++){var u=p[c];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==r+i){l=u;break}}l||(s=!0,(l=document.createElement("script")).charset="utf-8",n.nc&&l.setAttribute("nonce",n.nc),l.setAttribute("data-webpack",r+i),l.src=e),t[e]=[o];var d=(r,o)=>{l.onerror=l.onload=null,clearTimeout(f);var i=t[e];if(delete t[e],l.parentNode&&l.parentNode.removeChild(l),i&&i.forEach((e=>e(o))),r)return r(o)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=d.bind(null,l.onerror),l.onload=d.bind(null,l.onload),s&&document.head.appendChild(l)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var o=r.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=r[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={297:0};n.f.j=(t,r)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise(((r,i)=>o=e[t]=[r,i]));r.push(o[2]=i);var a=n.p+n.u(t),l=new Error;n.l(a,(r=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;l.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",l.name="ChunkLoadError",l.type=i,l.request=a,o[1](l)}}),"chunk-"+t,t)}};var t=(t,r)=>{var o,i,[a,l,s]=r,p=0;if(a.some((t=>0!==e[t]))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(s)s(n)}for(t&&t(r);p<a.length;p++)i=a[p],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=this.webpackChunk_tsparticles_plugin_export_video=this.webpackChunk_tsparticles_plugin_export_video||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var a={};function l(e){e.checkVersion("4.0.0-alpha.4"),e.register((async e=>{const{ExportVideoPlugin:t}=await n.e(77).then(n.bind(n,77));e.addPlugin(new t)}))}return n.r(a),n.d(a,{loadExportVideoPlugin:()=>l}),a})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Export Video Plugin v4.0.0-alpha.
|
|
1
|
+
/*! tsParticles Export Video Plugin v4.0.0-alpha.4 by Matteo Bruni */
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { Container, IPlugin } from "@tsparticles/engine";
|
|
2
|
-
import { ExportVideoInstance } from "./ExportVideoInstance.js";
|
|
1
|
+
import type { Container, IContainerPlugin, IPlugin } from "@tsparticles/engine";
|
|
3
2
|
export declare class ExportVideoPlugin implements IPlugin {
|
|
4
3
|
readonly id: string;
|
|
5
4
|
constructor();
|
|
6
|
-
getPlugin(container: Container): Promise<
|
|
5
|
+
getPlugin(container: Container): Promise<IContainerPlugin>;
|
|
7
6
|
loadOptions(): void;
|
|
8
7
|
needsPlugin(): boolean;
|
|
9
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Container, type ExportResult, type IContainerPlugin } from "@tsparticles/engine";
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class ExportVideoPluginInstance implements IContainerPlugin {
|
|
3
3
|
private readonly _container;
|
|
4
4
|
private readonly _supportedTypes;
|
|
5
5
|
constructor(container: Container);
|
package/umd/ExportVideoPlugin.js
CHANGED
|
@@ -1,22 +1,56 @@
|
|
|
1
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
+
if (k2 === undefined) k2 = k;
|
|
3
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
+
}
|
|
7
|
+
Object.defineProperty(o, k2, desc);
|
|
8
|
+
}) : (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
o[k2] = m[k];
|
|
11
|
+
}));
|
|
12
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
+
}) : function(o, v) {
|
|
15
|
+
o["default"] = v;
|
|
16
|
+
});
|
|
17
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
18
|
+
var ownKeys = function(o) {
|
|
19
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
20
|
+
var ar = [];
|
|
21
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
22
|
+
return ar;
|
|
23
|
+
};
|
|
24
|
+
return ownKeys(o);
|
|
25
|
+
};
|
|
26
|
+
return function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
})();
|
|
1
34
|
(function (factory) {
|
|
2
35
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
36
|
var v = factory(require, exports);
|
|
4
37
|
if (v !== undefined) module.exports = v;
|
|
5
38
|
}
|
|
6
39
|
else if (typeof define === "function" && define.amd) {
|
|
7
|
-
define(["require", "exports"
|
|
40
|
+
define(["require", "exports"], factory);
|
|
8
41
|
}
|
|
9
42
|
})(function (require, exports) {
|
|
10
43
|
"use strict";
|
|
44
|
+
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
|
|
11
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
46
|
exports.ExportVideoPlugin = void 0;
|
|
13
|
-
const ExportVideoInstance_js_1 = require("./ExportVideoInstance.js");
|
|
14
47
|
class ExportVideoPlugin {
|
|
15
48
|
constructor() {
|
|
16
49
|
this.id = "export-video";
|
|
17
50
|
}
|
|
18
|
-
getPlugin(container) {
|
|
19
|
-
|
|
51
|
+
async getPlugin(container) {
|
|
52
|
+
const { ExportVideoPluginInstance } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./ExportVideoPluginInstance.js"))) : new Promise((resolve_1, reject_1) => { require(["./ExportVideoPluginInstance.js"], resolve_1, reject_1); }).then(__importStar));
|
|
53
|
+
return new ExportVideoPluginInstance(container);
|
|
20
54
|
}
|
|
21
55
|
loadOptions() {
|
|
22
56
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
})(function (require, exports) {
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.ExportVideoPluginInstance = void 0;
|
|
13
13
|
const engine_1 = require("@tsparticles/engine");
|
|
14
14
|
const videoTypes = ["webm", "ogg", "mp4", "x-matroska"], codecs = [
|
|
15
15
|
"vp9",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
});
|
|
49
49
|
return supported;
|
|
50
50
|
}
|
|
51
|
-
class
|
|
51
|
+
class ExportVideoPluginInstance {
|
|
52
52
|
constructor(container) {
|
|
53
53
|
this._supportedTypes = [];
|
|
54
54
|
this._exportVideo = async (data) => {
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
return res;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
exports.
|
|
91
|
+
exports.ExportVideoPluginInstance = ExportVideoPluginInstance;
|
|
92
92
|
});
|
package/umd/index.js
CHANGED
|
@@ -45,7 +45,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
46
|
exports.loadExportVideoPlugin = loadExportVideoPlugin;
|
|
47
47
|
function loadExportVideoPlugin(engine) {
|
|
48
|
-
engine.checkVersion("4.0.0-alpha.
|
|
48
|
+
engine.checkVersion("4.0.0-alpha.4");
|
|
49
49
|
engine.register(async (e) => {
|
|
50
50
|
const { ExportVideoPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("./ExportVideoPlugin.js"))) : new Promise((resolve_1, reject_1) => { require(["./ExportVideoPlugin.js"], resolve_1, reject_1); }).then(__importStar));
|
|
51
51
|
e.addPlugin(new ExportVideoPlugin());
|
package/973.min.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 973.min.js.LICENSE.txt */
|
|
2
|
-
(this.webpackChunk_tsparticles_plugin_export_video=this.webpackChunk_tsparticles_plugin_export_video||[]).push([[973],{973(e,t,s){s.d(t,{ExportVideoPlugin:()=>n});var o=s(303);const p=["webm","ogg","mp4","x-matroska"],i=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","opus","pcm","aac","mpeg","mp4a"];class r{constructor(e){this._supportedTypes=[],this._exportVideo=async e=>{const t=this._container.canvas.element;if(t)return new Promise((s=>{const p=t.captureStream(e.fps??this._container.actualOptions.fpsLimit),i=e.mimeType??this._supportedTypes[0],r=new MediaRecorder(p,{mimeType:i}),n=[];r.addEventListener("dataavailable",(e=>{n.push(e.data)})),r.addEventListener("stop",(()=>{s(new Blob(n,{type:i}))})),r.start(),setTimeout((()=>{r.stop()}),e.duration??5*o.millisecondsToSeconds)}))},this._container=e,this._supportedTypes=function(){const e=e=>MediaRecorder.isTypeSupported(e),t=[];return p.forEach((s=>{const o=`video/${s}`;i.forEach((s=>{[`${o};codecs=${s}`,`${o};codecs=${s.toUpperCase()}`].forEach((s=>{e(s)&&t.push(s)}))})),e(o)&&t.push(o)})),t}()}async export(e,t){const s={supported:!1};if("video"===e)s.supported=!0,s.blob=await this._exportVideo(t);return s}}class n{constructor(){this.id="export-video"}getPlugin(e){return Promise.resolve(new r(e))}loadOptions(){}needsPlugin(){return!0}}}}]);
|
package/973.min.js.LICENSE.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tsParticles Export Video Plugin v4.0.0-alpha.2 by Matteo Bruni */
|