mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 11:11:20 -08:00
Refactor code structure for improved readability and maintainability
This commit is contained in:
1 parent
48b3f76151
commit
e27581b800
6 files changed
+212
-72
No files matched your search
@@ -15,5 +15,11 @@ const art = new Artplayer({
|
|||||||
miniProgressBar: true,
|
miniProgressBar: true,
|
||||||
autoPlayback: true,
|
autoPlayback: true,
|
||||||
autoOrientation: true,
|
autoOrientation: true,
|
||||||
|
thumbnails: {
|
||||||
|
url: '/assets/sample/frag_bunny.png',
|
||||||
|
number: 60,
|
||||||
|
column: 10,
|
||||||
|
scale: 0.85,
|
||||||
|
},
|
||||||
proxy: artplayerProxyMediabunny(),
|
proxy: artplayerProxyMediabunny(),
|
||||||
})
|
})
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
if (window.lastThumbnail) {
|
||||||
|
window.lastThumbnail.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
var $popups = document.querySelector('.popups');
|
||||||
|
var $popinner = document.querySelector('.popinner');
|
||||||
|
var $artplayer = document.querySelector('.artplayer-app');
|
||||||
|
|
||||||
|
$artplayer.innerHTML = 'Drop video file here or click to upload.';
|
||||||
|
var thumbnail = new ArtplayerToolThumbnail({
|
||||||
|
fileInput: $artplayer,
|
||||||
|
number: 60, // 数量
|
||||||
|
width: 160, // 宽度
|
||||||
|
column: 10, // 列数
|
||||||
|
begin: 0, // 开始
|
||||||
|
end: NaN, // 结束
|
||||||
|
});
|
||||||
|
|
||||||
|
window.lastThumbnail = thumbnail;
|
||||||
|
|
||||||
|
thumbnail.on('file', function (file) {
|
||||||
|
console.log('Read video successfully: ' + file.name);
|
||||||
|
});
|
||||||
|
|
||||||
|
thumbnail.on('video', function (video) {
|
||||||
|
console.log('Video size: ' + video.videoWidth + ' x ' + video.videoHeight);
|
||||||
|
console.log('Video duration: ' + video.duration + 's');
|
||||||
|
thumbnail.start();
|
||||||
|
});
|
||||||
|
|
||||||
|
thumbnail.on('canvas', function (canvas) {
|
||||||
|
console.log('Build canvas successfully');
|
||||||
|
console.log('Canvas size: ' + canvas.width + ' x ' + canvas.height);
|
||||||
|
console.log('Preview density: ' + thumbnail.density + ' p/s');
|
||||||
|
});
|
||||||
|
|
||||||
|
thumbnail.on('update', function (url, percentage) {
|
||||||
|
console.log('Processing: ' + Math.floor(percentage.toFixed(2) * 100) + '%');
|
||||||
|
$popups.style.display = 'flex';
|
||||||
|
$popinner.style.backgroundImage = 'url(' + url + ')';
|
||||||
|
});
|
||||||
|
|
||||||
|
thumbnail.on('download', function (name) {
|
||||||
|
console.log('Start download preview: ' + name);
|
||||||
|
});
|
||||||
|
|
||||||
|
thumbnail.on('done', function () {
|
||||||
|
$popups.style.display = 'none';
|
||||||
|
thumbnail.download();
|
||||||
|
console.log('Build preview image complete');
|
||||||
|
|
||||||
|
[...Artplayer.instances].forEach(function (art) {
|
||||||
|
art.destroy(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
new Artplayer({
|
||||||
|
container: $artplayer,
|
||||||
|
url: thumbnail.videoUrl,
|
||||||
|
autoSize: true,
|
||||||
|
poster: thumbnail.thumbnailUrl,
|
||||||
|
thumbnails: {
|
||||||
|
url: thumbnail.thumbnailUrl,
|
||||||
|
number: thumbnail.option.number,
|
||||||
|
column: thumbnail.option.column,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('Build player complete');
|
||||||
|
});
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
+1
-1
@@ -131,7 +131,7 @@
|
|||||||
<li class="title">Tools</li>
|
<li class="title">Tools</li>
|
||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="/?libs=./uncompiled/artplayer-tool-thumbnail/index.js&example=thumbnail">artplayer-tool-thumbnail</a>
|
href="/?libs=./uncompiled/artplayer-tool-thumbnail/index.js&example=tool.thumbnail">artplayer-tool-thumbnail</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,16 @@
|
|||||||
// anything defined in a previous bundle is accessed via the
|
// anything defined in a previous bundle is accessed via the
|
||||||
// orig method which is the require for previous bundles
|
// orig method which is the require for previous bundles
|
||||||
|
|
||||||
(function (modules, entry, mainEntry, parcelRequireName, globalName) {
|
(function (
|
||||||
|
modules,
|
||||||
|
entry,
|
||||||
|
mainEntry,
|
||||||
|
parcelRequireName,
|
||||||
|
externals,
|
||||||
|
distDir,
|
||||||
|
publicUrl,
|
||||||
|
devServer
|
||||||
|
) {
|
||||||
/* eslint-disable no-undef */
|
/* eslint-disable no-undef */
|
||||||
var globalObject =
|
var globalObject =
|
||||||
typeof globalThis !== 'undefined'
|
typeof globalThis !== 'undefined'
|
||||||
@@ -25,6 +34,7 @@
|
|||||||
typeof globalObject[parcelRequireName] === 'function' &&
|
typeof globalObject[parcelRequireName] === 'function' &&
|
||||||
globalObject[parcelRequireName];
|
globalObject[parcelRequireName];
|
||||||
|
|
||||||
|
var importMap = previousRequire.i || {};
|
||||||
var cache = previousRequire.cache || {};
|
var cache = previousRequire.cache || {};
|
||||||
// Do not use `require` to prevent Webpack from trying to bundle this call
|
// Do not use `require` to prevent Webpack from trying to bundle this call
|
||||||
var nodeRequire =
|
var nodeRequire =
|
||||||
@@ -35,6 +45,9 @@
|
|||||||
function newRequire(name, jumped) {
|
function newRequire(name, jumped) {
|
||||||
if (!cache[name]) {
|
if (!cache[name]) {
|
||||||
if (!modules[name]) {
|
if (!modules[name]) {
|
||||||
|
if (externals[name]) {
|
||||||
|
return externals[name];
|
||||||
|
}
|
||||||
// if we cannot find the module within our internal map or
|
// if we cannot find the module within our internal map or
|
||||||
// cache jump to the current global require ie. the last bundle
|
// cache jump to the current global require ie. the last bundle
|
||||||
// that was added to the page.
|
// that was added to the page.
|
||||||
@@ -73,7 +86,7 @@
|
|||||||
localRequire,
|
localRequire,
|
||||||
module,
|
module,
|
||||||
module.exports,
|
module.exports,
|
||||||
this
|
globalObject
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,7 +94,54 @@
|
|||||||
|
|
||||||
function localRequire(x) {
|
function localRequire(x) {
|
||||||
var res = localRequire.resolve(x);
|
var res = localRequire.resolve(x);
|
||||||
return res === false ? {} : newRequire(res);
|
if (res === false) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
// Synthesize a module to follow re-exports.
|
||||||
|
if (Array.isArray(res)) {
|
||||||
|
var m = {__esModule: true};
|
||||||
|
res.forEach(function (v) {
|
||||||
|
var key = v[0];
|
||||||
|
var id = v[1];
|
||||||
|
var exp = v[2] || v[0];
|
||||||
|
var x = newRequire(id);
|
||||||
|
if (key === '*') {
|
||||||
|
Object.keys(x).forEach(function (key) {
|
||||||
|
if (
|
||||||
|
key === 'default' ||
|
||||||
|
key === '__esModule' ||
|
||||||
|
Object.prototype.hasOwnProperty.call(m, key)
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.defineProperty(m, key, {
|
||||||
|
enumerable: true,
|
||||||
|
get: function () {
|
||||||
|
return x[key];
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else if (exp === '*') {
|
||||||
|
Object.defineProperty(m, key, {
|
||||||
|
enumerable: true,
|
||||||
|
value: x,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Object.defineProperty(m, key, {
|
||||||
|
enumerable: true,
|
||||||
|
get: function () {
|
||||||
|
if (exp === 'default') {
|
||||||
|
return x.__esModule ? x.default : x;
|
||||||
|
}
|
||||||
|
return x[exp];
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
return newRequire(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolve(x) {
|
function resolve(x) {
|
||||||
@@ -93,6 +153,7 @@
|
|||||||
function Module(moduleName) {
|
function Module(moduleName) {
|
||||||
this.id = moduleName;
|
this.id = moduleName;
|
||||||
this.bundle = newRequire;
|
this.bundle = newRequire;
|
||||||
|
this.require = nodeRequire;
|
||||||
this.exports = {};
|
this.exports = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,6 +162,10 @@
|
|||||||
newRequire.modules = modules;
|
newRequire.modules = modules;
|
||||||
newRequire.cache = cache;
|
newRequire.cache = cache;
|
||||||
newRequire.parent = previousRequire;
|
newRequire.parent = previousRequire;
|
||||||
|
newRequire.distDir = distDir;
|
||||||
|
newRequire.publicUrl = publicUrl;
|
||||||
|
newRequire.devServer = devServer;
|
||||||
|
newRequire.i = importMap;
|
||||||
newRequire.register = function (id, exports) {
|
newRequire.register = function (id, exports) {
|
||||||
modules[id] = [
|
modules[id] = [
|
||||||
function (require, module) {
|
function (require, module) {
|
||||||
@@ -110,6 +175,10 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Only insert newRequire.load when it is actually used.
|
||||||
|
// The code in this file is linted against ES5, so dynamic import is not allowed.
|
||||||
|
// INSERT_LOAD_HERE
|
||||||
|
|
||||||
Object.defineProperty(newRequire, 'root', {
|
Object.defineProperty(newRequire, 'root', {
|
||||||
get: function () {
|
get: function () {
|
||||||
return globalObject[parcelRequireName];
|
return globalObject[parcelRequireName];
|
||||||
@@ -136,13 +205,9 @@
|
|||||||
define(function () {
|
define(function () {
|
||||||
return mainExports;
|
return mainExports;
|
||||||
});
|
});
|
||||||
|
|
||||||
// <script>
|
|
||||||
} else if (globalName) {
|
|
||||||
this[globalName] = mainExports;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})({"1uFaH":[function(require,module,exports) {
|
})({"e0Gq7":[function(require,module,exports,__globalThis) {
|
||||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||||
parcelHelpers.defineInteropFlag(exports);
|
parcelHelpers.defineInteropFlag(exports);
|
||||||
var _emitter = require("./emitter");
|
var _emitter = require("./emitter");
|
||||||
@@ -158,9 +223,9 @@ class ArtplayerToolThumbnail extends (0, _emitterDefault.default) {
|
|||||||
this.duration = 0;
|
this.duration = 0;
|
||||||
this.inputChange = this.inputChange.bind(this);
|
this.inputChange = this.inputChange.bind(this);
|
||||||
this.ondrop = this.ondrop.bind(this);
|
this.ondrop = this.ondrop.bind(this);
|
||||||
this.option.fileInput.addEventListener("change", this.inputChange);
|
this.option.fileInput.addEventListener('change', this.inputChange);
|
||||||
this.option.fileInput.addEventListener("dragover", ArtplayerToolThumbnail.ondragover);
|
this.option.fileInput.addEventListener('dragover', ArtplayerToolThumbnail.ondragover);
|
||||||
this.option.fileInput.addEventListener("drop", ArtplayerToolThumbnail.ondrop);
|
this.option.fileInput.addEventListener('drop', ArtplayerToolThumbnail.ondrop);
|
||||||
}
|
}
|
||||||
static get DEFAULTS() {
|
static get DEFAULTS() {
|
||||||
return {
|
return {
|
||||||
@@ -169,7 +234,7 @@ class ArtplayerToolThumbnail extends (0, _emitterDefault.default) {
|
|||||||
height: 90,
|
height: 90,
|
||||||
column: 10,
|
column: 10,
|
||||||
begin: 0,
|
begin: 0,
|
||||||
end: NaN
|
end: Number.NaN
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
static ondragover(event) {
|
static ondragover(event) {
|
||||||
@@ -183,30 +248,30 @@ class ArtplayerToolThumbnail extends (0, _emitterDefault.default) {
|
|||||||
setup(option = {}) {
|
setup(option = {}) {
|
||||||
this.option = Object.assign({}, this.option, option);
|
this.option = Object.assign({}, this.option, option);
|
||||||
const { fileInput, number, width, column } = this.option;
|
const { fileInput, number, width, column } = this.option;
|
||||||
this.errorHandle(fileInput instanceof Element, "The 'fileInput' is not a Element");
|
this.errorHandle(fileInput instanceof Element, 'The \'fileInput\' is not a Element');
|
||||||
if (!(fileInput.tagName === "INPUT" && fileInput.type === "file")) {
|
if (!(fileInput.tagName === 'INPUT' && fileInput.type === 'file')) {
|
||||||
fileInput.style.position = "relative";
|
fileInput.style.position = 'relative';
|
||||||
const newFileInput = document.createElement("input");
|
const newFileInput = document.createElement('input');
|
||||||
newFileInput.type = "file";
|
newFileInput.type = 'file';
|
||||||
newFileInput.style.position = "absolute";
|
newFileInput.style.position = 'absolute';
|
||||||
newFileInput.style.width = "100%";
|
newFileInput.style.width = '100%';
|
||||||
newFileInput.style.height = "100%";
|
newFileInput.style.height = '100%';
|
||||||
newFileInput.style.left = "0";
|
newFileInput.style.left = '0';
|
||||||
newFileInput.style.top = "0";
|
newFileInput.style.top = '0';
|
||||||
newFileInput.style.right = "0";
|
newFileInput.style.right = '0';
|
||||||
newFileInput.style.bottom = "0";
|
newFileInput.style.bottom = '0';
|
||||||
newFileInput.style.opacity = "0";
|
newFileInput.style.opacity = '0';
|
||||||
fileInput.appendChild(newFileInput);
|
fileInput.appendChild(newFileInput);
|
||||||
this.option.fileInput = newFileInput;
|
this.option.fileInput = newFileInput;
|
||||||
}
|
}
|
||||||
[
|
[
|
||||||
"number",
|
'number',
|
||||||
"width",
|
'width',
|
||||||
"column",
|
'column',
|
||||||
"begin",
|
'begin',
|
||||||
"end"
|
'end'
|
||||||
].forEach((item)=>{
|
].forEach((item)=>{
|
||||||
this.errorHandle(typeof this.option[item] === "number", `The '${item}' is not a number`);
|
this.errorHandle(typeof this.option[item] === 'number', `The '${item}' is not a number`);
|
||||||
});
|
});
|
||||||
this.option.number = (0, _utils.clamp)(number, 10, 1000);
|
this.option.number = (0, _utils.clamp)(number, 10, 1000);
|
||||||
this.option.width = (0, _utils.clamp)(width, 10, 1000);
|
this.option.width = (0, _utils.clamp)(width, 10, 1000);
|
||||||
@@ -214,10 +279,10 @@ class ArtplayerToolThumbnail extends (0, _emitterDefault.default) {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
static creatVideo() {
|
static creatVideo() {
|
||||||
const video = document.createElement("video");
|
const video = document.createElement('video');
|
||||||
video.style.position = "absolute";
|
video.style.position = 'absolute';
|
||||||
video.style.top = "-9999px";
|
video.style.top = '-9999px';
|
||||||
video.style.left = "-9999px";
|
video.style.left = '-9999px';
|
||||||
video.muted = true;
|
video.muted = true;
|
||||||
video.controls = true;
|
video.controls = true;
|
||||||
document.body.appendChild(video);
|
document.body.appendChild(video);
|
||||||
@@ -226,18 +291,18 @@ class ArtplayerToolThumbnail extends (0, _emitterDefault.default) {
|
|||||||
inputChange(event) {
|
inputChange(event) {
|
||||||
const file = this.option.fileInput.files[0];
|
const file = this.option.fileInput.files[0];
|
||||||
this.loadVideo(file);
|
this.loadVideo(file);
|
||||||
event.target.value = "";
|
event.target.value = '';
|
||||||
}
|
}
|
||||||
loadVideo(file) {
|
loadVideo(file) {
|
||||||
if (file) {
|
if (file) {
|
||||||
const canPlayType = this.video.canPlayType(file.type);
|
const canPlayType = this.video.canPlayType(file.type);
|
||||||
this.errorHandle(canPlayType === "maybe" || canPlayType === "probably", `Playback of this file format is not supported: ${file.type}`);
|
this.errorHandle(canPlayType === 'maybe' || canPlayType === 'probably', `Playback of this file format is not supported: ${file.type}`);
|
||||||
const videoUrl = URL.createObjectURL(file);
|
const videoUrl = URL.createObjectURL(file);
|
||||||
this.videoUrl = videoUrl;
|
this.videoUrl = videoUrl;
|
||||||
this.file = file;
|
this.file = file;
|
||||||
this.emit("file", this.file);
|
this.emit('file', this.file);
|
||||||
this.video.src = videoUrl;
|
this.video.src = videoUrl;
|
||||||
this.emit("video", this.video);
|
this.emit('video', this.video);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
start() {
|
start() {
|
||||||
@@ -250,13 +315,13 @@ class ArtplayerToolThumbnail extends (0, _emitterDefault.default) {
|
|||||||
this.errorHandle(this.option.end > this.option.begin, `End time must be greater than the start time`);
|
this.errorHandle(this.option.end > this.option.begin, `End time must be greater than the start time`);
|
||||||
this.duration = this.option.end - this.option.begin;
|
this.duration = this.option.end - this.option.begin;
|
||||||
this.density = number / this.duration;
|
this.density = number / this.duration;
|
||||||
this.errorHandle(this.file && this.video, "Please select the video file first");
|
this.errorHandle(this.file && this.video, 'Please select the video file first');
|
||||||
this.errorHandle(!this.processing, "There is currently a task in progress, please wait a moment...");
|
this.errorHandle(!this.processing, 'There is currently a task in progress, please wait a moment...');
|
||||||
this.errorHandle(this.density <= 1, `The preview density cannot be greater than 1, but got ${this.density}`);
|
this.errorHandle(this.density <= 1, `The preview density cannot be greater than 1, but got ${this.density}`);
|
||||||
const screenshotDate = this.creatScreenshotDate();
|
const screenshotDate = this.creatScreenshotDate();
|
||||||
const canvas = this.creatCanvas();
|
const canvas = this.creatCanvas();
|
||||||
const context2D = canvas.getContext("2d");
|
const context2D = canvas.getContext('2d');
|
||||||
this.emit("canvas", canvas);
|
this.emit('canvas', canvas);
|
||||||
const promiseList = screenshotDate.map((item, index)=>()=>{
|
const promiseList = screenshotDate.map((item, index)=>()=>{
|
||||||
return new Promise((resolve)=>{
|
return new Promise((resolve)=>{
|
||||||
this.video.oncanplay = ()=>{
|
this.video.oncanplay = ()=>{
|
||||||
@@ -264,7 +329,7 @@ class ArtplayerToolThumbnail extends (0, _emitterDefault.default) {
|
|||||||
canvas.toBlob((blob)=>{
|
canvas.toBlob((blob)=>{
|
||||||
if (this.thumbnailUrl) URL.revokeObjectURL(this.thumbnailUrl);
|
if (this.thumbnailUrl) URL.revokeObjectURL(this.thumbnailUrl);
|
||||||
this.thumbnailUrl = URL.createObjectURL(blob);
|
this.thumbnailUrl = URL.createObjectURL(blob);
|
||||||
this.emit("update", this.thumbnailUrl, (index + 1) / number);
|
this.emit('update', this.thumbnailUrl, (index + 1) / number);
|
||||||
this.video.oncanplay = null;
|
this.video.oncanplay = null;
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
@@ -275,10 +340,10 @@ class ArtplayerToolThumbnail extends (0, _emitterDefault.default) {
|
|||||||
this.processing = true;
|
this.processing = true;
|
||||||
return (0, _utils.runPromisesInSeries)(promiseList).then(()=>{
|
return (0, _utils.runPromisesInSeries)(promiseList).then(()=>{
|
||||||
this.processing = false;
|
this.processing = false;
|
||||||
this.emit("done");
|
this.emit('done');
|
||||||
}).catch((err)=>{
|
}).catch((err)=>{
|
||||||
this.processing = false;
|
this.processing = false;
|
||||||
this.emit("error", err.message);
|
this.emit('error', err.message);
|
||||||
throw err;
|
throw err;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -300,50 +365,50 @@ class ArtplayerToolThumbnail extends (0, _emitterDefault.default) {
|
|||||||
}
|
}
|
||||||
creatCanvas() {
|
creatCanvas() {
|
||||||
const { number, width, height, column } = this.option;
|
const { number, width, height, column } = this.option;
|
||||||
const canvas = document.createElement("canvas");
|
const canvas = document.createElement('canvas');
|
||||||
const context2D = canvas.getContext("2d");
|
const context2D = canvas.getContext('2d');
|
||||||
canvas.width = width * column;
|
canvas.width = width * column;
|
||||||
canvas.height = Math.ceil(number / column) * height + 30;
|
canvas.height = Math.ceil(number / column) * height + 30;
|
||||||
context2D.fillStyle = "black";
|
context2D.fillStyle = 'black';
|
||||||
context2D.fillRect(0, 0, canvas.width, canvas.height);
|
context2D.fillRect(0, 0, canvas.width, canvas.height);
|
||||||
context2D.font = "14px Georgia";
|
context2D.font = '14px Georgia';
|
||||||
context2D.fillStyle = "#fff";
|
context2D.fillStyle = '#fff';
|
||||||
context2D.fillText(`From: https://artplayer.org/, Number: ${number}, Width: ${width}, Height: ${height}, Column: ${column}`, 10, canvas.height - 11);
|
context2D.fillText(`From: https://artplayer.org/, Number: ${number}, Width: ${width}, Height: ${height}, Column: ${column}`, 10, canvas.height - 11);
|
||||||
return canvas;
|
return canvas;
|
||||||
}
|
}
|
||||||
download() {
|
download() {
|
||||||
this.errorHandle(this.file && this.thumbnailUrl, "Download does not seem to be ready, please create preview first");
|
this.errorHandle(this.file && this.thumbnailUrl, 'Download does not seem to be ready, please create preview first');
|
||||||
this.errorHandle(!this.processing, "There is currently a task in progress, please wait a moment...");
|
this.errorHandle(!this.processing, 'There is currently a task in progress, please wait a moment...');
|
||||||
const elink = document.createElement("a");
|
const elink = document.createElement('a');
|
||||||
const name = `${(0, _utils.getFileName)(this.file.name)}.png`;
|
const name = `${(0, _utils.getFileName)(this.file.name)}.png`;
|
||||||
elink.download = name;
|
elink.download = name;
|
||||||
elink.href = this.thumbnailUrl;
|
elink.href = this.thumbnailUrl;
|
||||||
document.body.appendChild(elink);
|
document.body.appendChild(elink);
|
||||||
elink.click();
|
elink.click();
|
||||||
document.body.removeChild(elink);
|
document.body.removeChild(elink);
|
||||||
this.emit("download", name);
|
this.emit('download', name);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
errorHandle(condition, msg) {
|
errorHandle(condition, msg) {
|
||||||
if (!condition) {
|
if (!condition) {
|
||||||
this.emit("error", msg);
|
this.emit('error', msg);
|
||||||
throw new Error(msg);
|
throw new Error(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
destroy() {
|
destroy() {
|
||||||
this.option.fileInput.removeEventListener("change", this.inputChange);
|
this.option.fileInput.removeEventListener('change', this.inputChange);
|
||||||
this.option.fileInput.removeEventListener("dragover", ArtplayerToolThumbnail.ondragover);
|
this.option.fileInput.removeEventListener('dragover', ArtplayerToolThumbnail.ondragover);
|
||||||
this.option.fileInput.removeEventListener("drop", ArtplayerToolThumbnail.ondrop);
|
this.option.fileInput.removeEventListener('drop', ArtplayerToolThumbnail.ondrop);
|
||||||
document.body.removeChild(this.video);
|
document.body.removeChild(this.video);
|
||||||
if (this.videoUrl) URL.revokeObjectURL(this.videoUrl);
|
if (this.videoUrl) URL.revokeObjectURL(this.videoUrl);
|
||||||
if (this.thumbnailUrl) URL.revokeObjectURL(this.thumbnailUrl);
|
if (this.thumbnailUrl) URL.revokeObjectURL(this.thumbnailUrl);
|
||||||
this.emit("destroy");
|
this.emit('destroy');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.default = ArtplayerToolThumbnail;
|
exports.default = ArtplayerToolThumbnail;
|
||||||
window["ArtplayerToolThumbnail"] = ArtplayerToolThumbnail;
|
window.ArtplayerToolThumbnail = ArtplayerToolThumbnail;
|
||||||
|
|
||||||
},{"./emitter":"lQHUa","./utils":"kMfwO","@parcel/transformer-js/src/esmodule-helpers.js":"kBreb"}],"lQHUa":[function(require,module,exports) {
|
},{"./emitter":"7Kk4W","./utils":"kMCcV","@parcel/transformer-js/src/esmodule-helpers.js":"8oCsH"}],"7Kk4W":[function(require,module,exports,__globalThis) {
|
||||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||||
parcelHelpers.defineInteropFlag(exports);
|
parcelHelpers.defineInteropFlag(exports);
|
||||||
class Emitter {
|
class Emitter {
|
||||||
@@ -383,20 +448,20 @@ class Emitter {
|
|||||||
}
|
}
|
||||||
exports.default = Emitter;
|
exports.default = Emitter;
|
||||||
|
|
||||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"kBreb"}],"kBreb":[function(require,module,exports) {
|
},{"@parcel/transformer-js/src/esmodule-helpers.js":"8oCsH"}],"8oCsH":[function(require,module,exports,__globalThis) {
|
||||||
exports.interopDefault = function(a) {
|
exports.interopDefault = function(a) {
|
||||||
return a && a.__esModule ? a : {
|
return a && a.__esModule ? a : {
|
||||||
default: a
|
default: a
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
exports.defineInteropFlag = function(a) {
|
exports.defineInteropFlag = function(a) {
|
||||||
Object.defineProperty(a, "__esModule", {
|
Object.defineProperty(a, '__esModule', {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
exports.exportAll = function(source, dest) {
|
exports.exportAll = function(source, dest) {
|
||||||
Object.keys(source).forEach(function(key) {
|
Object.keys(source).forEach(function(key) {
|
||||||
if (key === "default" || key === "__esModule" || Object.prototype.hasOwnProperty.call(dest, key)) return;
|
if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) return;
|
||||||
Object.defineProperty(dest, key, {
|
Object.defineProperty(dest, key, {
|
||||||
enumerable: true,
|
enumerable: true,
|
||||||
get: function() {
|
get: function() {
|
||||||
@@ -413,7 +478,7 @@ exports.export = function(dest, destName, get) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
},{}],"kMfwO":[function(require,module,exports) {
|
},{}],"kMCcV":[function(require,module,exports,__globalThis) {
|
||||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||||
parcelHelpers.defineInteropFlag(exports);
|
parcelHelpers.defineInteropFlag(exports);
|
||||||
parcelHelpers.export(exports, "sleep", ()=>sleep);
|
parcelHelpers.export(exports, "sleep", ()=>sleep);
|
||||||
@@ -427,14 +492,14 @@ function runPromisesInSeries(ps) {
|
|||||||
return ps.reduce((p, next)=>p.then(next), Promise.resolve());
|
return ps.reduce((p, next)=>p.then(next), Promise.resolve());
|
||||||
}
|
}
|
||||||
function getFileName(name) {
|
function getFileName(name) {
|
||||||
const nameArray = name.split(".");
|
const nameArray = name.split('.');
|
||||||
nameArray.pop();
|
nameArray.pop();
|
||||||
return nameArray.join(".");
|
return nameArray.join('.');
|
||||||
}
|
}
|
||||||
function clamp(num, a, b) {
|
function clamp(num, a, b) {
|
||||||
return Math.max(Math.min(num, Math.max(a, b)), Math.min(a, b));
|
return Math.max(Math.min(num, Math.max(a, b)), Math.min(a, b));
|
||||||
}
|
}
|
||||||
|
|
||||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"kBreb"}]},["1uFaH"], "1uFaH", "parcelRequire94c2")
|
},{"@parcel/transformer-js/src/esmodule-helpers.js":"8oCsH"}]},["e0Gq7"], "e0Gq7", "parcelRequire4dc0", {})
|
||||||
|
|
||||||
//# sourceMappingURL=index.js.map
|
//# sourceMappingURL=index.js.map
|
||||||
@@ -1 +1 @@
|
|||||||
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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