前端视频插件Aliplayer播放器简单使用(基于地址播放)
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="IE=edge" > <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/> <title>Aliplayer在线配置</title> <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.1/skins/default/aliplayer-min.css" /> <script type="text/javascript" charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.1/aliplayer-min.js"></script> </head> <body> <div class="prism-player" id="player-con"></div> <script> var player = new Aliplayer({ "id": "player-con", "source": "//player.alicdn.com/video/aliyunmedia.mp4", "width": "100%", "height": "500px", "autoplay": true, "isLive": false, "rePlay": true, "playsinline": true, "preload": true, "controlBarVisibility": "hover", "useH5Prism": true }, function (player) { player._switchLevel = 0; console.log("播放器创建了。"); } ); </script> </body>
更多配置参数,请点击前往官网查看。https://player.alicdn.com/aliplayer/setting/setting.html
这里再记录一款好用的视频播放插件,video.js。这个是使用教程。https://www.cnblogs.com/afrog/p/6689179.html
滴水成冰,世间不存在毫无意义的付出,时间终会给你答案。