diff --git a/docs/document/README.md b/docs/document/README.md index f2153395d..617417e5b 100644 --- a/docs/document/README.md +++ b/docs/document/README.md @@ -1255,6 +1255,10 @@ var art = new Artplayer({ }, }, }); + +art.on('video:canplay', function() { + art.player.play = true; +}); ``` ## hls.js @@ -1266,7 +1270,7 @@ var art = new Artplayer({ ```js var art = new Artplayer({ container: '.artplayer-app', - url: 'https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8', + url: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8', customType: { m3u8: function(video, url) { var hls = new Hls(); @@ -1275,6 +1279,10 @@ var art = new Artplayer({ }, }, }); + +art.on('video:canplay', function() { + art.player.play = true; +}); ``` ## dash.js @@ -1294,6 +1302,10 @@ var art = new Artplayer({ }, }, }); + +art.on('video:canplay', function() { + art.player.play = true; +}); ``` ## shaka-player @@ -1314,6 +1326,10 @@ var art = new Artplayer({ }, }, }); + +art.on('video:canplay', function() { + art.player.play = true; +}); ``` ## webtorrent @@ -1341,4 +1357,8 @@ var art = new Artplayer({ }, }, }); + +art.on('video:canplay', function() { + art.player.play = true; +}); ```