update docs

This commit is contained in:
Harvey Zack committed 2023-04-23 00:21:38 +08:00
1 parent 7c8a3c2c7d
commit 3b57470957
14 files changed
+29 -46

No files matched your search

@@ -9,13 +9,11 @@
```js{18-21,25}
function playMpd(video, url, art) {
if (dashjs.supportsMediaSource()) {
if (art.dash) art.dash.destroy();
const dash = dashjs.MediaPlayer().create();
dash.initialize(video, url, art.option.autoplay);
// optional
art.dash = dash;
art.once('url', () => dash.destroy());
art.once('destroy', () => dash.destroy());
art.on('destroy', () => dash.destroy());
} else {
art.notice.show = 'Unsupported playback format: mpd';
}