mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 10:31:20 -08:00
Update build:docs and trans:docs scripts
This commit is contained in:
1 parent
a2d3e20479
commit
a2b57495a2
20 files changed
+749
-775
No files matched your search
@@ -1,8 +1,8 @@
|
||||
# 编写插件
|
||||
# Writing Plugins
|
||||
|
||||
但你已经知道播放器的`属性`, `方法`和`事件`后,再编写插件是非常简单的事
|
||||
Once you know the player's `properties`, `methods`, and `events`, writing plugins is very simple.
|
||||
|
||||
可以在实例化的时候加载插件的函数
|
||||
You can load the plugin functions when instantiated.
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -28,8 +28,9 @@ art.on('ready', () => {
|
||||
console.info(art.plugins.myPlugin);
|
||||
});
|
||||
```
|
||||
Here's the translation of the provided text into English while preserving the Markdown formatting:
|
||||
|
||||
可以在实例化之后再加载插件的函数
|
||||
A function that allows loading plugins after instantiation
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
@@ -57,10 +58,7 @@ art.on('ready', () => {
|
||||
});
|
||||
```
|
||||
|
||||
例如我想写一个在视频暂停后,显示一个图片广告的插件
|
||||
|
||||
<div className="run-code">▶ Run Code</div>
|
||||
|
||||
For example, I want to write a plugin that displays an image advertisement after the video is paused.
|
||||
```js
|
||||
function adsPlugin(option) {
|
||||
return (art) => {
|
||||
|
||||
Reference in new issue
Block a user