mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
refactor: Update video element in Artplayer to support custom canvas or video
This commit is contained in:
1 parent
7fa69a7de8
commit
7f6c9c8ee1
27 files changed
+326
-287
No files matched your search
@@ -106,7 +106,6 @@ var art = new Artplayer({
|
||||
- [artplayer-plugin-chromecast](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-chromecast/index.js&example=chromecast)
|
||||
- [artplayer-plugin-vast](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-vast/index.js&example=vast) (WIP)
|
||||
- [artplayer-plugin-chapter](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-chapter/index.js&example=chapter)
|
||||
- [artplayer-plugin-canvas](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-canvas/index.js&example=canvas) (WIP)
|
||||
|
||||
## Library
|
||||
|
||||
@@ -116,6 +115,11 @@ var art = new Artplayer({
|
||||
- [mpegts.js](https://artplayer.org/?libs=https://cdn.jsdelivr.net/npm/mpegts.js@1.7.3/dist/mpegts.min.js&example=mpegts)
|
||||
- [webtorrent.js](https://artplayer.org/?libs=https://cdn.jsdelivr.net/npm/webtorrent@1/webtorrent.min.js&example=webtorrent)
|
||||
|
||||
## Proxys
|
||||
|
||||
- [WebAV](https://artplayer.org/?libs=./uncompiled/artplayer-proxy-webav/index.js&example=webav) (WIP)
|
||||
- [libmedia](https://artplayer.org/?libs=./uncompiled/artplayer-proxy-libmedia/index.js&example=libmedia) (WIP)
|
||||
|
||||
## Changelog
|
||||
|
||||
[CHANGELOG_CN.md](./CHANGELOG_CN.md)
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
// npm i artplayer-plugin-canvas
|
||||
// import ArtplayerPluginCanvas from 'artplayer-plugin-canvas';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
Canvas: ArtplayerPluginCanvas,
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
// npm i artplayer-proxy-libmedia
|
||||
// import artplayerProxyLibmedia from 'artplayer-proxy-libmedia';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
proxy: artplayerProxyLibmedia({
|
||||
//
|
||||
}),
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
// npm i artplayer-proxy-webav
|
||||
// import artplayerProxyWebAV from 'artplayer-proxy-webav';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
proxy: artplayerProxyWebAV({
|
||||
//
|
||||
}),
|
||||
});
|
||||
+8
-1
@@ -72,9 +72,16 @@
|
||||
<a
|
||||
href="/?libs=./uncompiled/artplayer-plugin-chapter/index.js&example=chapter">artplayer-plugin-chapter</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="title">Proxy</li>
|
||||
<li>
|
||||
<a
|
||||
href="/?libs=./uncompiled/artplayer-plugin-canvas/index.js&example=canvas">artplayer-plugin-canvas</a>
|
||||
href="/?libs=./uncompiled/artplayer-proxy-webav/index.js&example=webav">artplayer-proxy-webav</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="/?libs=./uncompiled/artplayer-proxy-libmedia/index.js&example=libmedia">artplayer-proxy-libmedia</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAe,MAAM,8BAA8B;IAC/C,YAAY,GAAG,CAAE;QACb,KAAK;QAEL,IAAI,CAAC,GAAG,GAAG;QACX,QAAQ,GAAG,CAAC;QAEZ,IAAI,CAAC,MAAM,G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GAAG,CAAC;QACZ,OAAO,IAAI,CAAC,aAAa;IAC7B;IAEA,IAAI,aAAa,IAAI,EAAE;QACnB,QAAQ,GAAG,CAAC;QACZ,IAAI,CAAC,aAAa,GAAG;IACzB;IAEA,MAAM,OAAO;QACT,QAAQ,GAAG,CAAC;QACZ,OAAO;IACX;IAEA,QAAQ;QACJ,QAAQ,GAAG,CAAC;IAChB;AACJ;kBAzFqB;AA2FrB,IAAI,OAAO,WAAW,aAAa;IAC/B,MAAM,CAAC,wBAAwB,GAAG;IAElC,IAAI,CAAC,eAAe,GAAG,CAAC,sBACpB,eAAe,MAAM,CAAC,qBAAqB,uBAAuB;QAAE,SAAS;IAAS;AAE9F;;;ACjGA,QAAQ,cAAc,GAAG,SAAU,CAAC;IAClC,OAAO,KAAK,EAAE,UAAU,GAAG,IAAI;QAAC,SAAS;IAAC;AAC5C;AAEA,QAAQ,iBAAiB,GAAG,SAAU,CAAC;IACrC,OAAO,cAAc,CAAC,GAAG,cAAc;QAAC,OAAO;IAAI;AACrD;AAEA,QAAQ,SAAS,GAAG,SAAU,MAAM,EAAE,IAAI;IACxC,OAAO,IAAI,CAAC,QAAQ,OAAO,CAAC,SAAU,GAAG;QACvC,IACE,QAAQ,aACR,QAAQ,gBACR,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,MAE3C;QAGF,OAAO,cAAc,CAAC,MAAM,KAAK;YAC/B,YAAY;YACZ,KAAK;gBACH,OAAO,MAAM,CAAC,IAAI;YACpB;QACF;IACF;IAEA,OAAO;AACT;AAEA,QAAQ,MAAM,GAAG,SAAU,IAAI,EAAE,QAAQ,EAAE,GAAG;IAC5C,OAAO,cAAc,CAAC,MAAM,UAAU;QACpC,YAAY;QACZ,KAAK;IACP;AACF","sources":["packages/artplayer-plugin-canvas/src/index.js","node_modules/@parcel/transformer-js/src/esmodule-helpers.js"],"sourcesContent":["export default class ArtplayerPluginCanvas extends HTMLCanvasElement {\n constructor(art) {\n super();\n\n this.art = art;\n console.log(art);\n\n this._muted = false;\n this._volume = 1;\n this._src = '';\n this._currentTime = 0;\n this._playbackRate = 1;\n\n this.loop = false;\n this.ended = false;\n this.paused = true;\n this.readyState = 0;\n this.videoWidth = 0;\n this.videoHeight = 0;\n this.autoplay = false;\n this.duration = NaN;\n\n this.buffered = {\n length: 0,\n start: () => 0,\n end: () => 0,\n };\n\n this.textTracks = [{ activeCues: [] }];\n }\n\n get muted() {\n console.log('get muted');\n return this._muted;\n }\n\n set muted(muted) {\n console.log('set muted');\n this._muted = muted;\n }\n\n get volume() {\n console.log('get volume');\n return this._volume;\n }\n\n set volume(percentage) {\n console.log('set volume');\n this._volume = percentage;\n }\n\n get src() {\n console.log('get src');\n return this._src;\n }\n\n set src(newSrc) {\n console.log('set src');\n this._src = newSrc;\n }\n\n get currentTime() {\n console.log('get currentTime');\n return this._currentTime;\n }\n\n set currentTime(time) {\n console.log('set currentTime');\n this._currentTime = time;\n }\n\n get playbackRate() {\n console.log('get playbackRate');\n return this._playbackRate;\n }\n\n set playbackRate(rate) {\n console.log('set playbackRate');\n this._playbackRate = rate;\n }\n\n async play() {\n console.log('play');\n return true;\n }\n\n pause() {\n console.log('pause');\n }\n}\n\nif (typeof window !== 'undefined') {\n window['ArtplayerPluginCanvas'] = ArtplayerPluginCanvas;\n\n if (!customElements.get('art-plugin-canvas')) {\n customElements.define('art-plugin-canvas', ArtplayerPluginCanvas, { extends: 'canvas' });\n }\n}\n","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n Object.keys(source).forEach(function (key) {\n if (\n key === 'default' ||\n key === '__esModule' ||\n Object.prototype.hasOwnProperty.call(dest, key)\n ) {\n return;\n }\Line truncated
|
||||
+8
-85
@@ -142,93 +142,16 @@
|
||||
this[globalName] = mainExports;
|
||||
}
|
||||
}
|
||||
})({"2pQPp":[function(require,module,exports) {
|
||||
})({"9cz2W":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
class ArtplayerPluginCanvas extends HTMLCanvasElement {
|
||||
constructor(art){
|
||||
super();
|
||||
this.art = art;
|
||||
console.log(art);
|
||||
this._muted = false;
|
||||
this._volume = 1;
|
||||
this._src = "";
|
||||
this._currentTime = 0;
|
||||
this._playbackRate = 1;
|
||||
this.loop = false;
|
||||
this.ended = false;
|
||||
this.paused = true;
|
||||
this.readyState = 0;
|
||||
this.videoWidth = 0;
|
||||
this.videoHeight = 0;
|
||||
this.autoplay = false;
|
||||
this.duration = NaN;
|
||||
this.buffered = {
|
||||
length: 0,
|
||||
start: ()=>0,
|
||||
end: ()=>0
|
||||
};
|
||||
this.textTracks = [
|
||||
{
|
||||
activeCues: []
|
||||
}
|
||||
];
|
||||
}
|
||||
get muted() {
|
||||
console.log("get muted");
|
||||
return this._muted;
|
||||
}
|
||||
set muted(muted) {
|
||||
console.log("set muted");
|
||||
this._muted = muted;
|
||||
}
|
||||
get volume() {
|
||||
console.log("get volume");
|
||||
return this._volume;
|
||||
}
|
||||
set volume(percentage) {
|
||||
console.log("set volume");
|
||||
this._volume = percentage;
|
||||
}
|
||||
get src() {
|
||||
console.log("get src");
|
||||
return this._src;
|
||||
}
|
||||
set src(newSrc) {
|
||||
console.log("set src");
|
||||
this._src = newSrc;
|
||||
}
|
||||
get currentTime() {
|
||||
console.log("get currentTime");
|
||||
return this._currentTime;
|
||||
}
|
||||
set currentTime(time) {
|
||||
console.log("set currentTime");
|
||||
this._currentTime = time;
|
||||
}
|
||||
get playbackRate() {
|
||||
console.log("get playbackRate");
|
||||
return this._playbackRate;
|
||||
}
|
||||
set playbackRate(rate) {
|
||||
console.log("set playbackRate");
|
||||
this._playbackRate = rate;
|
||||
}
|
||||
async play() {
|
||||
console.log("play");
|
||||
return true;
|
||||
}
|
||||
pause() {
|
||||
console.log("pause");
|
||||
}
|
||||
}
|
||||
exports.default = ArtplayerPluginCanvas;
|
||||
if (typeof window !== "undefined") {
|
||||
window["ArtplayerPluginCanvas"] = ArtplayerPluginCanvas;
|
||||
if (!customElements.get("art-plugin-canvas")) customElements.define("art-plugin-canvas", ArtplayerPluginCanvas, {
|
||||
extends: "canvas"
|
||||
});
|
||||
parcelHelpers.export(exports, "default", ()=>artplayerProxyLibmedia);
|
||||
function artplayerProxyLibmedia(option) {
|
||||
return (art)=>{
|
||||
return document.createElement("video");
|
||||
};
|
||||
}
|
||||
if (typeof window !== "undefined") window["artplayerProxyLibmedia"] = artplayerProxyLibmedia;
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"5dUr6"}],"5dUr6":[function(require,module,exports) {
|
||||
exports.interopDefault = function(a) {
|
||||
@@ -260,6 +183,6 @@ exports.export = function(dest, destName, get) {
|
||||
});
|
||||
};
|
||||
|
||||
},{}]},["2pQPp"], "2pQPp", "parcelRequire4dc0")
|
||||
},{}]},["9cz2W"], "9cz2W", "parcelRequire4dc0")
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAAwB;AAAT,SAAS,uBAAuB,MAAM;IACjD,OAAO,CAAC;QACJ,OAAO,SAAS,aAAa,CAAC;IAClC;AACJ;AAEA,IAAI,OAAO,WAAW,aAClB,MAAM,CAAC,yBAAyB,GAAG;;;ACPvC,QAAQ,cAAc,GAAG,SAAU,CAAC;IAClC,OAAO,KAAK,EAAE,UAAU,GAAG,IAAI;QAAC,SAAS;IAAC;AAC5C;AAEA,QAAQ,iBAAiB,GAAG,SAAU,CAAC;IACrC,OAAO,cAAc,CAAC,GAAG,cAAc;QAAC,OAAO;IAAI;AACrD;AAEA,QAAQ,SAAS,GAAG,SAAU,MAAM,EAAE,IAAI;IACxC,OAAO,IAAI,CAAC,QAAQ,OAAO,CAAC,SAAU,GAAG;QACvC,IACE,QAAQ,aACR,QAAQ,gBACR,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,MAE3C;QAGF,OAAO,cAAc,CAAC,MAAM,KAAK;YAC/B,YAAY;YACZ,KAAK;gBACH,OAAO,MAAM,CAAC,IAAI;YACpB;QACF;IACF;IAEA,OAAO;AACT;AAEA,QAAQ,MAAM,GAAG,SAAU,IAAI,EAAE,QAAQ,EAAE,GAAG;IAC5C,OAAO,cAAc,CAAC,MAAM,UAAU;QACpC,YAAY;QACZ,KAAK;IACP;AACF","sources":["packages/artplayer-proxy-libmedia/src/index.js","node_modules/@parcel/transformer-js/src/esmodule-helpers.js"],"sourcesContent":["export default function artplayerProxyLibmedia(option) {\n return (art) => {\n return document.createElement('video');\n };\n}\n\nif (typeof window !== 'undefined') {\n window['artplayerProxyLibmedia'] = artplayerProxyLibmedia;\n}\n","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n Object.keys(source).forEach(function (key) {\n if (\n key === 'default' ||\n key === '__esModule' ||\n Object.prototype.hasOwnProperty.call(dest, key)\n ) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function () {\n return source[key];\n },\n });\n });\n\n return dest;\n};\n\nexports.export = function (dest, destName, get) {\n Object.defineProperty(dest, destName, {\n enumerable: true,\n get: get,\n });\n};\n"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../../../"}
|
||||
@@ -0,0 +1,188 @@
|
||||
// modules are defined as an array
|
||||
// [ module function, map of requires ]
|
||||
//
|
||||
// map of requires is short require name -> numeric require
|
||||
//
|
||||
// anything defined in a previous bundle is accessed via the
|
||||
// orig method which is the require for previous bundles
|
||||
|
||||
(function (modules, entry, mainEntry, parcelRequireName, globalName) {
|
||||
/* eslint-disable no-undef */
|
||||
var globalObject =
|
||||
typeof globalThis !== 'undefined'
|
||||
? globalThis
|
||||
: typeof self !== 'undefined'
|
||||
? self
|
||||
: typeof window !== 'undefined'
|
||||
? window
|
||||
: typeof global !== 'undefined'
|
||||
? global
|
||||
: {};
|
||||
/* eslint-enable no-undef */
|
||||
|
||||
// Save the require from previous bundle to this closure if any
|
||||
var previousRequire =
|
||||
typeof globalObject[parcelRequireName] === 'function' &&
|
||||
globalObject[parcelRequireName];
|
||||
|
||||
var cache = previousRequire.cache || {};
|
||||
// Do not use `require` to prevent Webpack from trying to bundle this call
|
||||
var nodeRequire =
|
||||
typeof module !== 'undefined' &&
|
||||
typeof module.require === 'function' &&
|
||||
module.require.bind(module);
|
||||
|
||||
function newRequire(name, jumped) {
|
||||
if (!cache[name]) {
|
||||
if (!modules[name]) {
|
||||
// if we cannot find the module within our internal map or
|
||||
// cache jump to the current global require ie. the last bundle
|
||||
// that was added to the page.
|
||||
var currentRequire =
|
||||
typeof globalObject[parcelRequireName] === 'function' &&
|
||||
globalObject[parcelRequireName];
|
||||
if (!jumped && currentRequire) {
|
||||
return currentRequire(name, true);
|
||||
}
|
||||
|
||||
// If there are other bundles on this page the require from the
|
||||
// previous one is saved to 'previousRequire'. Repeat this as
|
||||
// many times as there are bundles until the module is found or
|
||||
// we exhaust the require chain.
|
||||
if (previousRequire) {
|
||||
return previousRequire(name, true);
|
||||
}
|
||||
|
||||
// Try the node require function if it exists.
|
||||
if (nodeRequire && typeof name === 'string') {
|
||||
return nodeRequire(name);
|
||||
}
|
||||
|
||||
var err = new Error("Cannot find module '" + name + "'");
|
||||
err.code = 'MODULE_NOT_FOUND';
|
||||
throw err;
|
||||
}
|
||||
|
||||
localRequire.resolve = resolve;
|
||||
localRequire.cache = {};
|
||||
|
||||
var module = (cache[name] = new newRequire.Module(name));
|
||||
|
||||
modules[name][0].call(
|
||||
module.exports,
|
||||
localRequire,
|
||||
module,
|
||||
module.exports,
|
||||
this
|
||||
);
|
||||
}
|
||||
|
||||
return cache[name].exports;
|
||||
|
||||
function localRequire(x) {
|
||||
var res = localRequire.resolve(x);
|
||||
return res === false ? {} : newRequire(res);
|
||||
}
|
||||
|
||||
function resolve(x) {
|
||||
var id = modules[name][1][x];
|
||||
return id != null ? id : x;
|
||||
}
|
||||
}
|
||||
|
||||
function Module(moduleName) {
|
||||
this.id = moduleName;
|
||||
this.bundle = newRequire;
|
||||
this.exports = {};
|
||||
}
|
||||
|
||||
newRequire.isParcelRequire = true;
|
||||
newRequire.Module = Module;
|
||||
newRequire.modules = modules;
|
||||
newRequire.cache = cache;
|
||||
newRequire.parent = previousRequire;
|
||||
newRequire.register = function (id, exports) {
|
||||
modules[id] = [
|
||||
function (require, module) {
|
||||
module.exports = exports;
|
||||
},
|
||||
{},
|
||||
];
|
||||
};
|
||||
|
||||
Object.defineProperty(newRequire, 'root', {
|
||||
get: function () {
|
||||
return globalObject[parcelRequireName];
|
||||
},
|
||||
});
|
||||
|
||||
globalObject[parcelRequireName] = newRequire;
|
||||
|
||||
for (var i = 0; i < entry.length; i++) {
|
||||
newRequire(entry[i]);
|
||||
}
|
||||
|
||||
if (mainEntry) {
|
||||
// Expose entry point to Node, AMD or browser globals
|
||||
// Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
|
||||
var mainExports = newRequire(mainEntry);
|
||||
|
||||
// CommonJS
|
||||
if (typeof exports === 'object' && typeof module !== 'undefined') {
|
||||
module.exports = mainExports;
|
||||
|
||||
// RequireJS
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(function () {
|
||||
return mainExports;
|
||||
});
|
||||
|
||||
// <script>
|
||||
} else if (globalName) {
|
||||
this[globalName] = mainExports;
|
||||
}
|
||||
}
|
||||
})({"dz77T":[function(require,module,exports) {
|
||||
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
|
||||
parcelHelpers.defineInteropFlag(exports);
|
||||
parcelHelpers.export(exports, "default", ()=>artplayerProxyWebAV);
|
||||
function artplayerProxyWebAV(option) {
|
||||
return (art)=>{
|
||||
return document.createElement("video");
|
||||
};
|
||||
}
|
||||
if (typeof window !== "undefined") window["artplayerProxyWebAV"] = artplayerProxyWebAV;
|
||||
|
||||
},{"@parcel/transformer-js/src/esmodule-helpers.js":"5dUr6"}],"5dUr6":[function(require,module,exports) {
|
||||
exports.interopDefault = function(a) {
|
||||
return a && a.__esModule ? a : {
|
||||
default: a
|
||||
};
|
||||
};
|
||||
exports.defineInteropFlag = function(a) {
|
||||
Object.defineProperty(a, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
};
|
||||
exports.exportAll = function(source, dest) {
|
||||
Object.keys(source).forEach(function(key) {
|
||||
if (key === "default" || key === "__esModule" || Object.prototype.hasOwnProperty.call(dest, key)) return;
|
||||
Object.defineProperty(dest, key, {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return source[key];
|
||||
}
|
||||
});
|
||||
});
|
||||
return dest;
|
||||
};
|
||||
exports.export = function(dest, destName, get) {
|
||||
Object.defineProperty(dest, destName, {
|
||||
enumerable: true,
|
||||
get: get
|
||||
});
|
||||
};
|
||||
|
||||
},{}]},["dz77T"], "dz77T", "parcelRequire4dc0")
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAAwB;AAAT,SAAS,oBAAoB,MAAM;IAC9C,OAAO,CAAC;QACJ,OAAO,SAAS,aAAa,CAAC;IAClC;AACJ;AAEA,IAAI,OAAO,WAAW,aAClB,MAAM,CAAC,sBAAsB,GAAG;;;ACPpC,QAAQ,cAAc,GAAG,SAAU,CAAC;IAClC,OAAO,KAAK,EAAE,UAAU,GAAG,IAAI;QAAC,SAAS;IAAC;AAC5C;AAEA,QAAQ,iBAAiB,GAAG,SAAU,CAAC;IACrC,OAAO,cAAc,CAAC,GAAG,cAAc;QAAC,OAAO;IAAI;AACrD;AAEA,QAAQ,SAAS,GAAG,SAAU,MAAM,EAAE,IAAI;IACxC,OAAO,IAAI,CAAC,QAAQ,OAAO,CAAC,SAAU,GAAG;QACvC,IACE,QAAQ,aACR,QAAQ,gBACR,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,MAE3C;QAGF,OAAO,cAAc,CAAC,MAAM,KAAK;YAC/B,YAAY;YACZ,KAAK;gBACH,OAAO,MAAM,CAAC,IAAI;YACpB;QACF;IACF;IAEA,OAAO;AACT;AAEA,QAAQ,MAAM,GAAG,SAAU,IAAI,EAAE,QAAQ,EAAE,GAAG;IAC5C,OAAO,cAAc,CAAC,MAAM,UAAU;QACpC,YAAY;QACZ,KAAK;IACP;AACF","sources":["packages/artplayer-proxy-webav/src/index.js","node_modules/@parcel/transformer-js/src/esmodule-helpers.js"],"sourcesContent":["export default function artplayerProxyWebAV(option) {\n return (art) => {\n return document.createElement('video');\n };\n}\n\nif (typeof window !== 'undefined') {\n window['artplayerProxyWebAV'] = artplayerProxyWebAV;\n}\n","exports.interopDefault = function (a) {\n return a && a.__esModule ? a : {default: a};\n};\n\nexports.defineInteropFlag = function (a) {\n Object.defineProperty(a, '__esModule', {value: true});\n};\n\nexports.exportAll = function (source, dest) {\n Object.keys(source).forEach(function (key) {\n if (\n key === 'default' ||\n key === '__esModule' ||\n Object.prototype.hasOwnProperty.call(dest, key)\n ) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function () {\n return source[key];\n },\n });\n });\n\n return dest;\n};\n\nexports.export = function (dest, destName, get) {\n Object.defineProperty(dest, destName, {\n enumerable: true,\n get: get,\n });\n};\n"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../../../"}
|
||||
@@ -300,7 +300,7 @@ class Artplayer extends (0, _emitterDefault.default) {
|
||||
autoPlayback: false,
|
||||
autoOrientation: false,
|
||||
airplay: false,
|
||||
proxy: null,
|
||||
proxy: undefined,
|
||||
layers: [],
|
||||
contextmenu: [],
|
||||
controls: [],
|
||||
@@ -1056,7 +1056,7 @@ exports.default = {
|
||||
autoPlayback: b,
|
||||
autoOrientation: b,
|
||||
airplay: b,
|
||||
proxy: f,
|
||||
proxy: `?${f}`,
|
||||
plugins: [
|
||||
f
|
||||
],
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAI,KAAK;AACT,MAAM,YAAY,EAAE;AACL,MAAM,kBAAkB,CAAA,GAAA,uBAAO,AAAD;IACzC,YAAY,MAAM,EAAE,aAAa,CAAE;QAC/B,KAAK;QAEL,IAAI,CAAC,EAAE,GAAG,EAAE;QAEZ,MAAM,cAAc,OAAM,SAAS,CAAC,UAAU,MAAM,EAAE;QACtD,YAAY,SAAS,GAAG,OAAO,SAAS;QAExC,IAAI,CAAC,MAAM,GAAG,CAAA,GAAA,+BAAS,AAAD,EAAE,aAAa,CAAA,GAAA,sBAAM,AAAD;QAE1C,IAAI,CAAC,MAAM,GAAG;QACd,IAAI,CAAC,OAAO,GAAG;QACf,IAAI,CAAC,OAAO,GAAG;QACf,IAAI,CAAC,OAAO,GAAG;QACf,IAAI,CAAC,QAAQ,GAAG;QAChB,IAAI,CAAC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AU,WAAW,GAAG;AACxB,UAAU,WAAW,GAAG;AACxB,UAAU,UAAU,GAAG;AACvB,UAAU,iBAAiB,GAAG;AAC9B,UAAU,iBAAiB,GAAG;AAC9B,UAAU,qBAAqB,GAAG;AAClC,UAAU,kBAAkB,GAAG;AAC/B,UAAU,oBAAoB,GAAG;AACjC,UAAU,iBAAiB,GAAG;AAC9B,UAAU,YAAY,GAAG;AACzB,UAAU,kBAAkB,GAAG;AAC/B,UAAU,mBAAmB,GAAG;AAChC,UAAU,iBAAiB,GAAG;AAC9B,UAAU,qBAAqB,GAAG;AAClC,UAAU,cAAc,GAAG;AAC3B,UAAU,kBAAkB,GAAG;AAC/B,UAAU,iBAAiB,GAAG;AAC9B,UAAU,gBAAgB,GAAG;AAC7B,UAAU,WAAW,GAAG;AACxB,UAAU,SAAS,GAAG;AACtB,UAAU,aAAa,GAAG;IAAC;IAAK;IAAM;IAAG;IAAM;IAAK;CAAE;AACtD,UAAU,YAAY,GAAG;IAAC;IAAW;IAAO;CAAO;AACnD,UAAU,IAAI,GAAG;IAAC;IAAU;IAAc;CAAW;AACrD,UAAU,sBAAsB,GAAG;AACnC,UAAU,WAAW,GAAG;AACxB,UAAU,OAAO,GAAG;AAEpB,IAAI,OAAM,SAAS,EAAE;IACjB,MAAM,CAAC,YAAY,GAAG;IAEtB,OAAM,YAAY,CAAC,mBAAmB,CAAA,GAAA,yBAAK,AAAD;IAE1C,WAAW;QACP,IAAI,UAAU,WAAW,EACrB,QAAQ,GAAG,CACP,CAAC,gBAAgB,EAAE,UAAU,OAAO,CAAC,yBAAyB,CAAC,EAC/D,oCACA,oCACA;IAGZ,GAAG;AACP;;;ACxQA,Line truncated
|
||||
@@ -1,65 +0,0 @@
|
||||
export default class Extension {
|
||||
constructor(canvas) {
|
||||
this.canvas = canvas;
|
||||
this.methods = {};
|
||||
this.listeners = {};
|
||||
this.properties = {};
|
||||
|
||||
const handler = {
|
||||
get: (target, prop) => {
|
||||
if (prop in target.properties) {
|
||||
return target.properties[prop];
|
||||
}
|
||||
if (prop in target.methods) {
|
||||
return target.methods[prop];
|
||||
}
|
||||
if (prop === 'addEventListener') {
|
||||
return target.addEventListener.bind(target);
|
||||
}
|
||||
if (prop === 'removeEventListener') {
|
||||
return target.removeEventListener.bind(target);
|
||||
}
|
||||
if (prop === 'getOriginalCanvas') {
|
||||
return () => target.canvas;
|
||||
}
|
||||
return target.canvas[prop];
|
||||
},
|
||||
set: (target, prop, value) => {
|
||||
if (prop in target.canvas) {
|
||||
target.canvas[prop] = value;
|
||||
} else {
|
||||
target.properties[prop] = value;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
};
|
||||
|
||||
handler[Symbol.hasInstance] = (instance) => {
|
||||
return instance instanceof HTMLCanvasElement || instance === this.proxy;
|
||||
};
|
||||
|
||||
this.proxy = new Proxy(this, handler);
|
||||
|
||||
return this.proxy;
|
||||
}
|
||||
|
||||
addEventListener(type, listener, options) {
|
||||
if (!this.listeners[type]) {
|
||||
this.listeners[type] = [];
|
||||
this.canvas.addEventListener(
|
||||
type,
|
||||
(event) => {
|
||||
this.listeners[type].forEach((l) => l(event));
|
||||
},
|
||||
options,
|
||||
);
|
||||
}
|
||||
this.listeners[type].push(listener);
|
||||
}
|
||||
|
||||
removeEventListener(type, listener) {
|
||||
if (this.listeners[type]) {
|
||||
this.listeners[type] = this.listeners[type].filter((l) => l !== listener);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
export default class ArtplayerPluginCanvas extends HTMLCanvasElement {
|
||||
constructor(art) {
|
||||
super();
|
||||
|
||||
this.art = art;
|
||||
console.log(art);
|
||||
|
||||
this._muted = false;
|
||||
this._volume = 1;
|
||||
this._src = '';
|
||||
this._currentTime = 0;
|
||||
this._playbackRate = 1;
|
||||
|
||||
this.loop = false;
|
||||
this.ended = false;
|
||||
this.paused = true;
|
||||
this.readyState = 0;
|
||||
this.videoWidth = 0;
|
||||
this.videoHeight = 0;
|
||||
this.autoplay = false;
|
||||
this.duration = NaN;
|
||||
|
||||
this.buffered = {
|
||||
length: 0,
|
||||
start: () => 0,
|
||||
end: () => 0,
|
||||
};
|
||||
|
||||
this.textTracks = [{ activeCues: [] }];
|
||||
}
|
||||
|
||||
get muted() {
|
||||
console.log('get muted');
|
||||
return this._muted;
|
||||
}
|
||||
|
||||
set muted(muted) {
|
||||
console.log('set muted');
|
||||
this._muted = muted;
|
||||
}
|
||||
|
||||
get volume() {
|
||||
console.log('get volume');
|
||||
return this._volume;
|
||||
}
|
||||
|
||||
set volume(percentage) {
|
||||
console.log('set volume');
|
||||
this._volume = percentage;
|
||||
}
|
||||
|
||||
get src() {
|
||||
console.log('get src');
|
||||
return this._src;
|
||||
}
|
||||
|
||||
set src(newSrc) {
|
||||
console.log('set src');
|
||||
this._src = newSrc;
|
||||
}
|
||||
|
||||
get currentTime() {
|
||||
console.log('get currentTime');
|
||||
return this._currentTime;
|
||||
}
|
||||
|
||||
set currentTime(time) {
|
||||
console.log('set currentTime');
|
||||
this._currentTime = time;
|
||||
}
|
||||
|
||||
get playbackRate() {
|
||||
console.log('get playbackRate');
|
||||
return this._playbackRate;
|
||||
}
|
||||
|
||||
set playbackRate(rate) {
|
||||
console.log('set playbackRate');
|
||||
this._playbackRate = rate;
|
||||
}
|
||||
|
||||
async play() {
|
||||
console.log('play');
|
||||
return true;
|
||||
}
|
||||
|
||||
pause() {
|
||||
console.log('pause');
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['ArtplayerPluginCanvas'] = ArtplayerPluginCanvas;
|
||||
|
||||
if (!customElements.get('art-plugin-canvas')) {
|
||||
customElements.define('art-plugin-canvas', ArtplayerPluginCanvas, { extends: 'canvas' });
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -1,14 +0,0 @@
|
||||
import type Artplayer from 'artplayer';
|
||||
|
||||
export = ArtplayerPluginCanvas;
|
||||
export as namespace ArtplayerPluginCanvas;
|
||||
|
||||
type Option = {
|
||||
//
|
||||
};
|
||||
|
||||
type Result = {
|
||||
name: 'ArtplayerPluginCanvas';
|
||||
};
|
||||
|
||||
declare const ArtplayerPluginCanvas: (option: Option) => (art: Artplayer) => Result;
|
||||
@@ -22,5 +22,5 @@ if (typeof document !== 'undefined') {
|
||||
}
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['ArtplayerPluginVast'] = artplayerPluginVast;
|
||||
window['artplayerPluginVast'] = artplayerPluginVast;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
# artplayer-proxy-libmedia
|
||||
|
||||
libmedia proxy for ArtPlayer
|
||||
|
||||
## Demo
|
||||
|
||||
[https://artplayer.org](https://artplayer.org/?libs=./uncompiled/artplayer-proxy-libmedia/index.js&example=libmedia)
|
||||
|
||||
## License
|
||||
|
||||
MIT © Harvey Zack
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"license": "MIT",
|
||||
"version": "1.0.0",
|
||||
"name": "artplayer-proxy-libmedia",
|
||||
"types": "types/artplayer-proxy-libmedia.d.ts",
|
||||
"description": "libmedia proxy for ArtPlayer",
|
||||
"main": "dist/artplayer-proxy-libmedia.js",
|
||||
"legacy": "dist/artplayer-proxy-libmedia.legacy.js",
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"browserslist": "last 1 Chrome version",
|
||||
"homepage": "https://artplayer.org",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"html5",
|
||||
"video",
|
||||
"player"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
export default function artplayerProxyLibmedia(option) {
|
||||
return (art) => {
|
||||
return document.createElement('video');
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayerProxyLibmedia'] = artplayerProxyLibmedia;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import type Artplayer from 'artplayer';
|
||||
|
||||
export = artplayerProxyLibmedia;
|
||||
export as namespace artplayerProxyLibmedia;
|
||||
|
||||
type Option = {
|
||||
//
|
||||
};
|
||||
|
||||
type Result = {
|
||||
name: 'artplayerProxyLibmedia';
|
||||
};
|
||||
|
||||
declare const artplayerProxyLibmedia: (option: Option) => (art: Artplayer) => Result;
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
# artplayer-plugin-canvas
|
||||
# artplayer-proxy-webav
|
||||
|
||||
canvas plugin for ArtPlayer
|
||||
webav proxy for ArtPlayer
|
||||
|
||||
## Demo
|
||||
|
||||
[https://artplayer.org](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-canvas/index.js&example=canvas)
|
||||
[https://artplayer.org](https://artplayer.org/?libs=./uncompiled/artplayer-proxy-webav/index.js&example=webav)
|
||||
|
||||
## License
|
||||
|
||||
+5
-5
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"license": "MIT",
|
||||
"version": "1.0.0",
|
||||
"name": "artplayer-plugin-canvas",
|
||||
"types": "types/artplayer-plugin-canvas.d.ts",
|
||||
"description": "Canvas plugin for ArtPlayer",
|
||||
"main": "dist/artplayer-plugin-canvas.js",
|
||||
"legacy": "dist/artplayer-plugin-canvas.legacy.js",
|
||||
"name": "artplayer-proxy-webav",
|
||||
"types": "types/artplayer-proxy-webav.d.ts",
|
||||
"description": "webav proxy for ArtPlayer",
|
||||
"main": "dist/artplayer-proxy-webav.js",
|
||||
"legacy": "dist/artplayer-proxy-webav.legacy.js",
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"browserslist": "last 1 Chrome version",
|
||||
"homepage": "https://artplayer.org",
|
||||
@@ -0,0 +1,9 @@
|
||||
export default function artplayerProxyWebAV(option) {
|
||||
return (art) => {
|
||||
return document.createElement('video');
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window['artplayerProxyWebAV'] = artplayerProxyWebAV;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import type Artplayer from 'artplayer';
|
||||
|
||||
export = artplayerProxyWebAV;
|
||||
export as namespace artplayerProxyWebAV;
|
||||
|
||||
type Option = {
|
||||
//
|
||||
};
|
||||
|
||||
type Result = {
|
||||
name: 'artplayerProxyWebAV';
|
||||
};
|
||||
|
||||
declare const artplayerProxyWebAV: (option: Option) => (art: Artplayer) => Result;
|
||||
@@ -156,7 +156,7 @@ export default class Artplayer extends Emitter {
|
||||
autoPlayback: false,
|
||||
autoOrientation: false,
|
||||
airplay: false,
|
||||
proxy: null,
|
||||
proxy: undefined,
|
||||
layers: [],
|
||||
contextmenu: [],
|
||||
controls: [],
|
||||
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
autoPlayback: b,
|
||||
autoOrientation: b,
|
||||
airplay: b,
|
||||
proxy: f,
|
||||
proxy: `?${f}`,
|
||||
plugins: [f],
|
||||
layers: [ComponentOption],
|
||||
contextmenu: [ComponentOption],
|
||||
|
||||
Reference in new issue
Block a user