1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 12:00:06 +02:00

Do not hide time on PL

This commit is contained in:
DanieL 2022-12-12 10:54:11 -03:00
parent ae291a6f7b
commit c30659942b

View file

@ -0,0 +1,41 @@
player.playlist(embed_playerPlaylist);
player.playlist.autoadvance(0);
player.on('play', function () {
addViewOnCurrentPlaylitItem(0);
});
player.on('ended', function () {
setCurrentPlaylitItemVideoStartSeconds(0);
});
player.on('timeupdate', function () {
var time = Math.round(player.currentTime());
if (time >= 5) {
setCurrentPlaylitItemVideoStartSeconds(time);
if (time % 5 === 0) {
addViewOnCurrentPlaylitItem(time);
}
}
});
player.on('playlistchange', function () {
console.log('event playlistchange');
});
player.on('duringplaylistchange', function () {
console.log('event duringplaylistchange');
});
player.on('playlistitem', function () {
var index = player.playlist.currentIndex();
updatePLSources(index);
mediaId = getCurrentPlaylitItemVideosId();
console.log('event playlistitem ', index, mediaId);
});
player.playlistUi();
if (!empty({$pl_index})) {
player.playlist.currentItem({$pl_index});
}
if (typeof embed_playerPlaylist[0] !== 'undefined') {
updatePLSources({$pl_index});
}
$('.vjs-playlist-item ').click(function () {
var index = player.playlist.currentIndex();
updatePLSources(index);
});