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,14 +9,12 @@
```js{19-22,26}
function playFlv(video, url, art) {
if (flvjs.isSupported()) {
if (art.flv) art.flv.destroy();
const flv = flvjs.createPlayer({ type: 'flv', url });
flv.attachMediaElement(video);
flv.load();
// optional
art.flv = flv;
art.once('url', () => flv.destroy());
art.once('destroy', () => flv.destroy());
art.on('destroy', () => flv.destroy());
} else {
art.notice.show = 'Unsupported playback format: flv';
}