Browse Source

auto play improved

master
filesite 4 months ago
parent
commit
5134301631
  1. 10
      www/js/beauty.js

10
www/js/beauty.js

@ -638,7 +638,8 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') { @@ -638,7 +638,8 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') {
};
//加载更多视频
var currentPage = $('.othervideos').attr('data-page');
var currentPage = $('.othervideos').attr('data-page'),
currentVideoId = $('.othervideos').attr('data-id');
var getOtherVideos = function(currentPage) {
if (_noMoreVideos) {return false;}
var videoId = $('.othervideos').attr('data-id'),
@ -686,7 +687,14 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') { @@ -686,7 +687,14 @@ if ($('#my-player').length > 0 && typeof(videojs) != 'undefined') {
if (moreVideos && moreVideos.length > 0) {
var nextVideo = moreVideos.shift();
if (nextVideo.id == currentVideoId && moreVideos.length > 0) {
nextVideo = moreVideos.shift();
}
if (nextVideo) {
myPlayer.src(nextVideo.path);
$('.navbar-header .videotitle').text(nextVideo.filename);
}
}else {
currentPage = parseInt(currentPage) + 1;
getOtherVideos(currentPage);

Loading…
Cancel
Save