mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-31 04:31: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,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';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user