Update README.md

This commit is contained in:
Harvey Zack committed 2019-08-01 15:08:32 +08:00
1 parent 1a5cf941a1
commit 2764cb6d51
1 file changed
+21 -1
+21 -1
View File
@@ -1255,6 +1255,10 @@ var art = new Artplayer({
}, },
}, },
}); });
art.on('video:canplay', function() {
art.player.play = true;
});
``` ```
## hls.js ## hls.js
@@ -1266,7 +1270,7 @@ var art = new Artplayer({
```js ```js
var art = new Artplayer({ var art = new Artplayer({
container: '.artplayer-app', container: '.artplayer-app',
url: 'https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8', url: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
customType: { customType: {
m3u8: function(video, url) { m3u8: function(video, url) {
var hls = new Hls(); var hls = new Hls();
@@ -1275,6 +1279,10 @@ var art = new Artplayer({
}, },
}, },
}); });
art.on('video:canplay', function() {
art.player.play = true;
});
``` ```
## dash.js ## dash.js
@@ -1294,6 +1302,10 @@ var art = new Artplayer({
}, },
}, },
}); });
art.on('video:canplay', function() {
art.player.play = true;
});
``` ```
## shaka-player ## shaka-player
@@ -1314,6 +1326,10 @@ var art = new Artplayer({
}, },
}, },
}); });
art.on('video:canplay', function() {
art.player.play = true;
});
``` ```
## webtorrent ## webtorrent
@@ -1341,4 +1357,8 @@ var art = new Artplayer({
}, },
}, },
}); });
art.on('video:canplay', function() {
art.player.play = true;
});
``` ```