阿里云web播放器地址:https://www.alibabacloud.com/help/zh/doc-detail/125570.htm?spm=a2c63.p38356.879954.6.551811f0xFOj90
集成文档:https://www.alibabacloud.com/help/zh/doc-detail/125570.htm?spm=a2c63.p38356.879954.29.56566e21Xaltel
demo以及文档:http://player.alicdn.com
写一个小demo
先引入sdk
<!-- aliplayer --> <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css" /> <!-- aliplayer --> <script src="https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js" charset="utf-8"></script>
在页面中放个容器
<div class="prism-player" id="J_prismPlayer"></div>
创建播放器实例
let self=this; self.player=new Aliplayer({ id: ‘J_prismPlayer‘, width: ‘100%‘, height:‘100%‘, isLive:false,//直播时 autoplay: true, //支持播放地址播放,此播放优先级最高 source : ‘https://vdept.bdstatic.com/79505936316e694e4a63544c5a76744e/43656c77754e7050/646f1065a3db9819895ced16437ece5854d1adee18e9708475ff5c09e3e920b33cc01b0c716ee28bee801f6b610fb1f4.mp4?auth_key=1590319673-0-0-de017814a7b3eb2d5424af78dd5414db‘ },function(player){ console.log(‘播放器创建好了。‘) });
。