阿里云回放监听当前视频播放完,开始播放下一个视频

最近要写一个自动播放下一集的功能:前提是:当前页面是一个列表,播放完一个,在播放下一个

                 var player = new Aliplayer({
					id: 'MPSplayer',
					width: that.screenWidth - Number(width),
					height: that.screenHeight,
					autoplay: true,
					source: ’阿里云回放地址‘,
					videoWidth: "100%",
				}, function(player) {
                                     player.on("ended", function(e) {
                                     //这里直接写播放下一集的逻辑即可
                                      })    
                                })                                                            

  使用以上代码即可实现监听回放,播放下一集

posted @ 2023-02-15 09:54  冰晨之露  阅读(101)  评论(0编辑  收藏  举报