diff --git a/docs/assets/example/vast.js b/docs/assets/example/vast.js
new file mode 100644
index 000000000..a523125f1
--- /dev/null
+++ b/docs/assets/example/vast.js
@@ -0,0 +1,14 @@
+// npm i artplayer-plugin-vast
+// import ArtplayerPluginVast from 'artplayer-plugin-vast';
+
+var art = new Artplayer({
+ container: '.artplayer-app',
+ url: '/assets/sample/video.mp4',
+ fullscreen: true,
+ fullscreenWeb: true,
+ plugins: [
+ ArtplayerPluginVast({
+ url: '/assets/sample/vast.xml',
+ }),
+ ],
+});
\ No newline at end of file
diff --git a/docs/assets/js/common.js b/docs/assets/js/common.js
index 73d267637..cd62eecdf 100644
--- a/docs/assets/js/common.js
+++ b/docs/assets/js/common.js
@@ -78,10 +78,10 @@
automaticLayout: true,
quickSuggestions: { other: true, comments: true, strings: true },
model: monaco.editor.createModel(
- `var art = new Artplayer({
- container: '.artplayer-app',
- url: '/assets/sample/video.mp4',
- });`,
+`var art = new Artplayer({
+ container: '.artplayer-app',
+ url: '/assets/sample/video.mp4',
+});`,
$ts.checked ? 'typescript' : 'javascript'
),
});
diff --git a/docs/index.html b/docs/index.html
index 273d24507..fd520c6a1 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -61,6 +61,10 @@
artplayer-plugin-chromecast
+
+ artplayer-plugin-vast
+
- Library
diff --git a/docs/uncompiled/artplayer-plugin-test/index.js b/docs/uncompiled/artplayer-plugin-vast/index.js
similarity index 91%
rename from docs/uncompiled/artplayer-plugin-test/index.js
rename to docs/uncompiled/artplayer-plugin-vast/index.js
index 4415e7c0c..cb8fd7742 100644
--- a/docs/uncompiled/artplayer-plugin-test/index.js
+++ b/docs/uncompiled/artplayer-plugin-vast/index.js
@@ -142,21 +142,21 @@
this[globalName] = mainExports;
}
}
-})({"fryej":[function(require,module,exports) {
+})({"eSwxK":[function(require,module,exports) {
var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");
parcelHelpers.defineInteropFlag(exports);
-parcelHelpers.export(exports, "default", ()=>artplayerPluginTest);
+parcelHelpers.export(exports, "default", ()=>artplayerPluginVast);
var _styleLess = require("bundle-text:./style.less");
var _styleLessDefault = parcelHelpers.interopDefault(_styleLess);
-function artplayerPluginTest(option) {
+function artplayerPluginVast(option) {
return (art)=>{
return {
- name: "artplayerPluginTest"
+ name: "artplayerPluginVast"
};
};
}
if (typeof document !== "undefined") {
- const id = "artplayer-plugin-test";
+ const id = "artplayer-plugin-vast";
const $style = document.getElementById(id);
if ($style) $style.textContent = (0, _styleLessDefault.default);
else {
@@ -166,9 +166,9 @@ if (typeof document !== "undefined") {
document.head.appendChild($style);
}
}
-if (typeof window !== "undefined") window["artplayerPluginTest"] = artplayerPluginTest;
+if (typeof window !== "undefined") window["ArtplayerPluginVast"] = artplayerPluginVast;
-},{"bundle-text:./style.less":"hbz6Y","@parcel/transformer-js/src/esmodule-helpers.js":"5dUr6"}],"hbz6Y":[function(require,module,exports) {
+},{"bundle-text:./style.less":"8l0EI","@parcel/transformer-js/src/esmodule-helpers.js":"5dUr6"}],"8l0EI":[function(require,module,exports) {
module.exports = "\n";
},{}],"5dUr6":[function(require,module,exports) {
@@ -201,6 +201,6 @@ exports.export = function(dest, destName, get) {
});
};
-},{}]},["fryej"], "fryej", "parcelRequire4dc0")
+},{}]},["eSwxK"], "eSwxK", "parcelRequire4dc0")
//# sourceMappingURL=index.js.map
diff --git a/docs/uncompiled/artplayer-plugin-test/index.js.map b/docs/uncompiled/artplayer-plugin-vast/index.js.map
similarity index 83%
rename from docs/uncompiled/artplayer-plugin-test/index.js.map
rename to docs/uncompiled/artplayer-plugin-vast/index.js.map
index e846db381..210225d2d 100644
--- a/docs/uncompiled/artplayer-plugin-test/index.js.map
+++ b/docs/uncompiled/artplayer-plugin-vast/index.js.map
@@ -1 +1 @@
-{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ules/@parcel/runtime-js/lib/bundles/runtime-e68a27fd2c174153.js","node_modules/@parcel/transformer-js/src/esmodule-helpers.js"],"sourcesContent":["import style from 'bundle-text:./style.less';\n\nexport default function artplayerPluginTest(option) {\n return (art) => {\n return {\n name: 'artplayerPluginTest',\n };\n };\n}\n\nif (typeof document !== 'undefined') {\n const id = 'artplayer-plugin-test';\n const $style = document.getElementById(id);\n if ($style) {\n $style.textContent = style;\n } else {\n const $style = document.createElement('style');\n $style.id = id;\n $style.textContent = style;\n document.head.appendChild($style);\n }\n}\n\nif (typeof window !== 'undefined') {\n window['artplayerPluginTest'] = artplayerPluginTest;\n}\n","module.exports = \"91206404fcaa1496\";","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":"../../../"}
\ No newline at end of file
+{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6CAEwB;AAFxB;;AAEe,SAAS,oBAAoB,MAAM;IAC9C,OAAO,CAAC;QACJ,OAAO;YACH,MAAM;QACV;IACJ;AACJ;AAEA,IAAI,OAAO,aAAa,aAAa;IACjC,MAAM,KAAK;IACX,MAAM,SAAS,SAAS,cAAc,CAAC;IACvC,IAAI,QACA,OAAO,WAAW,GAAG,CAAA,GAAA,yBAAK,AAAD;SACtB;QACH,MAAM,SAAS,SAAS,aAAa,CAAC;QACtC,OAAO,EAAE,GAAG;QACZ,OAAO,WAAW,GAAG,CAAA,GAAA,yBAAK,AAAD;QACzB,SAAS,IAAI,CAAC,WAAW,CAAC;IAC9B;AACJ;AAEA,IAAI,OAAO,WAAW,aAClB,MAAM,CAAC,sBAAsB,GAAG;;;ACxBpC,OAAO,OAAO,GAAG;;;ACAjB,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-vast/src/index.js","node_modules/@parcel/runtime-js/lib/bundles/runtime-51ac63d836a077a2.js","node_modules/@parcel/transformer-js/src/esmodule-helpers.js"],"sourcesContent":["import style from 'bundle-text:./style.less';\n\nexport default function artplayerPluginVast(option) {\n return (art) => {\n return {\n name: 'artplayerPluginVast',\n };\n };\n}\n\nif (typeof document !== 'undefined') {\n const id = 'artplayer-plugin-vast';\n const $style = document.getElementById(id);\n if ($style) {\n $style.textContent = style;\n } else {\n const $style = document.createElement('style');\n $style.id = id;\n $style.textContent = style;\n document.head.appendChild($style);\n }\n}\n\nif (typeof window !== 'undefined') {\n window['ArtplayerPluginVast'] = artplayerPluginVast;\n}\n","module.exports = \"91964bfa4021818a\";","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":"../../../"}
\ No newline at end of file
diff --git a/packages/artplayer-plugin-vast/src/index.js b/packages/artplayer-plugin-vast/src/index.js
index da82bbfb1..a77b11e89 100644
--- a/packages/artplayer-plugin-vast/src/index.js
+++ b/packages/artplayer-plugin-vast/src/index.js
@@ -22,5 +22,5 @@ if (typeof document !== 'undefined') {
}
if (typeof window !== 'undefined') {
- window['artplayerPluginVast'] = artplayerPluginVast;
+ window['ArtplayerPluginVast'] = artplayerPluginVast;
}
diff --git a/packages/artplayer-vitepress/docs/.vitepress/config.js b/packages/artplayer-vitepress/docs/.vitepress/config.js
index 3a9f0418d..b236487b0 100644
--- a/packages/artplayer-vitepress/docs/.vitepress/config.js
+++ b/packages/artplayer-vitepress/docs/.vitepress/config.js
@@ -74,6 +74,7 @@ const config = {
{ text: '多重字幕', link: 'https://artplayer.org/?libs=./uncompiled/artplayer-plugin-multiple-subtitles/index.js&example=multiple.subtitles'},
{ text: 'Ass 字幕', link: 'https://artplayer.org/?libs=./uncompiled/artplayer-plugin-libass/index.js&example=libass'},
{ text: 'Chromecast', link: 'https://artplayer.org/?libs=./uncompiled/artplayer-plugin-chromecast/index.js&example=chromecast'},
+ { text: 'Vast', link: 'https://artplayer.org/?libs=./uncompiled/artplayer-plugin-vast/index.js&example=vast'},
]
},
{
@@ -132,6 +133,7 @@ const config = {
{ text: 'Multiple Subtitles', link: 'https://artplayer.org/?libs=./uncompiled/artplayer-plugin-multiple-subtitles/index.js&example=multiple.subtitles'},
{ text: 'Ass Subtitle', link: 'https://artplayer.org/?libs=./uncompiled/artplayer-plugin-libass/index.js&example=libass'},
{ text: 'Chromecast', link: 'https://artplayer.org/?libs=./uncompiled/artplayer-plugin-chromecast/index.js&example=chromecast'},
+ { text: 'Vast', link: 'https://artplayer.org/?libs=./uncompiled/artplayer-plugin-vast/index.js&example=vast'},
]
},
{