function videoplayer(config) { var player = new aliplayer({ id: config.id, width: '100%', autoplay: false, snapshot: true, preload: true, cover: config.cover, replay: true, //支持播放地址播放,此播放优先级最高 source: config.source, vodretry: 5, skinlayout: [ { name: "bigplaybutton", align: "cc" }, { "name": "controlbar", "align": "blabs", "x": 0, "y": 0, "children": [{ "name": "progress", "align": "blabs", "x": 0, "y": 44 }, { "name": "playbutton", "align": "tl", "x": 15, "y": 12 }, { "name": "timedisplay", "align": "tl", "x": 10, "y": 7 }, { "name": "fullscreenbutton", "align": "tr", "x": 10, "y": 12 }, { "name": "volume", "align": "tr", "x": 5, "y": 10 } ] }] }, function (player) { // player.on("ready", function () { // player.play(); // }) // player.on("ended",function(){ // player.replay(); // }) }); }