diff --git a/docs/assets/example/test.js b/docs/assets/example/test.js new file mode 100644 index 000000000..c53700cc1 --- /dev/null +++ b/docs/assets/example/test.js @@ -0,0 +1,12 @@ +// npm i artplayer-plugin-test +// import artplayerPluginTest from 'artplayer-plugin-test'; + +var art = new Artplayer({ + container: '.artplayer-app', + url: '/assets/sample/video.mp4', + plugins: [ + artplayerPluginTest({ + // + }), + ], +}); \ No newline at end of file diff --git a/scripts/plugin/template/src/index.js b/scripts/plugin/template/src/index.js index d3933ae81..d98d25eec 100644 --- a/scripts/plugin/template/src/index.js +++ b/scripts/plugin/template/src/index.js @@ -27,5 +27,5 @@ if (typeof document !== 'undefined') { } if (typeof window !== 'undefined') { - window['{{export}}'] = {{export}}; + window.{{export}} = {{export}}; }