mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-30 20:21:20 -08:00
update docs
This commit is contained in:
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';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user