import utils from"../../common/utils/utils";Component({properties:{playbackList:{type:Array,value:[],observer(t){const a=t;a&&a.length>0&&(a.forEach(((t,a,e)=>{e[a].firstImage=utils.imagePrefixUrlMethod(t.firstImage)})),this.setData({playBackListData:a}))}},nextVod:{type:String,value:"",observer(t,a){t&&t!==a&&this.playNext()}},skin:{type:String,value:"black",observer(t){"black"!==t&&"white"!==t&&this.setData({skin:"black"})}},liveStatus:{type:String,value:"",observer(t){"Y"===t&&this.setData({currentIndex:0})}}},data:{playBackListData:[],currentIndex:0,currentImage:["../../assets/images/icon-ing.png","../../assets/images/icon-playing.png"]},methods:{tapPlayback(t){const a=t.currentTarget.dataset.idx;this.emitPlayback(a)},playNext(){let t=0;const{playBackListData:a}=this.data;a.length<=1||(this.data.currentIndex<a.length-1&&(t=this.data.currentIndex+1),this.emitPlayback(t))},emitPlayback(t){this.setData({currentIndex:t}),this.triggerEvent("onTapPlayback",this.data.playBackListData[t])}}});