<div id="player-con" class="frequency-pic"></div> <link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.2/skins/default/aliplayer-min.css" /> <script charset="utf-8" src="https://g.alicdn.com/de/prismplayer/2.8.2/aliplayer-min.js"></script> <script> var aliplayer = new Aliplayer({ "id": "player-con", "source": '<% =videoUrl %>', "width": "640px", "height": "480px", "autoplay": true, "isLive": false, "cover": '@(Course.Cover==null? "http://image.bnuxq.net/20190525/guo-pic.jpg":Course.CoverPath_pre+""+Course.Cover)', "rePlay": true, "playsinline": true, "preload": true, "language": "zh-cn", "controlBarVisibility": "hover", "useH5Prism": true }, function (player) { console.log("播放器创建了。"); } ); aliplayer.autoplay = true; var whereYouAt = parseFloat(aliplayer.getCurrentTime()) + 1; var totalTime = parseFloat(aliplayer.getDuration());