update docs

This commit is contained in:
Harvey Zack committed 2022-11-05 09:31:23 +08:00
1 parent e0b351831e
commit 824baca8b4
48 files changed
+165 -165

No files matched your search

@@ -63,13 +63,6 @@ var art = new Artplayer({
hls.destroy();
}
// When the player is destroyed, the decoder instance must also be destroyed
art.on('destroy', () => {
if (hls) {
hls.destroy();
}
});
hls = new Hls();
hls.loadSource(url);
hls.attachMedia(video);
@@ -77,6 +70,13 @@ var art = new Artplayer({
},
});
// When the player is destroyed, the decoder instance must also be destroyed
art.on('destroy', () => {
if (hls) {
hls.destroy();
}
});
// Switch to a new video address
art.url = '/assets/sample/video-new.m3u8';
```
@@ -61,13 +61,6 @@ var art = new Artplayer({
hls.destroy();
}
// 播放器销毁时,也要销毁解码器实例
art.on('destroy', () => {
if (hls) {
hls.destroy();
}
});
hls = new Hls();
hls.loadSource(url);
hls.attachMedia(video);
@@ -75,6 +68,13 @@ var art = new Artplayer({
},
});
// 播放器销毁时,也要销毁解码器实例
art.on('destroy', () => {
if (hls) {
hls.destroy();
}
});
// 切换新的视频地址
art.url = '/assets/sample/video-new.m3u8';
```