mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Do not hide time on PL
This commit is contained in:
parent
ae291a6f7b
commit
c30659942b
1 changed files with 41 additions and 0 deletions
41
plugin/PlayLists/getStartPlayerJS.js
Normal file
41
plugin/PlayLists/getStartPlayerJS.js
Normal 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);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue