mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 01:21:20 -08:00
update docs
This commit is contained in:
1 parent
3e0a35e080
commit
bd7585bcb4
1 file changed
+6
-6
@@ -108,7 +108,7 @@ https://unpkg.com/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## 实例接口
|
## `index.html` 接口
|
||||||
|
|
||||||
### `commit`
|
### `commit`
|
||||||
|
|
||||||
@@ -154,23 +154,23 @@ iframe.message((event) => {
|
|||||||
|
|
||||||
### `destroy`
|
### `destroy`
|
||||||
|
|
||||||
销毁实例,销毁后 `index.html` 无法与 `iframe.html` 通信
|
销毁后 `index.html` 无法与 `iframe.html` 通信
|
||||||
|
|
||||||
```js
|
```js
|
||||||
iframe.destroy();
|
iframe.destroy();
|
||||||
```
|
```
|
||||||
|
|
||||||
## `Iframe` 接口
|
## `iframe.html` 接口
|
||||||
|
|
||||||
:::warning 提示
|
:::warning 提示
|
||||||
|
|
||||||
`Iframe` 接口 只能运行在 `iframe.html` 里
|
`iframe.html` 接口 只能运行在 `iframe.html` 里
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### `inject`
|
### `inject`
|
||||||
|
|
||||||
注入脚本,接收来自实例的消息
|
注入脚本,接收来自 `index.html` 的消息
|
||||||
|
|
||||||
```js
|
```js
|
||||||
ArtplayerPluginIframe.inject();
|
ArtplayerPluginIframe.inject();
|
||||||
@@ -178,7 +178,7 @@ ArtplayerPluginIframe.inject();
|
|||||||
|
|
||||||
### `postMessage`
|
### `postMessage`
|
||||||
|
|
||||||
将消息推送到实例
|
将消息推送到 `index.html`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
iframe.message((event) => {
|
iframe.message((event) => {
|
||||||
|
|||||||
Reference in new issue
Block a user