Prev link to first page reload the videoplayer
Hi, congratulations for your great project!
Sorry for my english, I saw that every time I went to the first "Videos page" with the "Prev" button, the videoplayer reloads itself. This don't happen in other videos pages.
Thanks in advance
Ok, I solved the problem adding a var.
$.fn.ycp = function(m, n, p, o) { var isPlaying = false; ... }
then in the ycp_list:
if ((c.prevPageToken == null || c.prevPageToken == undefined) && !isPlaying) {
and at the end of this if:
$(l + ' .ycp div#ycp_youtube_channels' + k + ' div.play:eq(0)').addClass('vid-active'); isPlaying = true;
So now, when I return to the first page the player doesn't reload to play the first video, but continues to play the current video.
EXTRA:
In ycp_part function I've added an extra IF to add a zero if the detik is lesser than 10, so I get 4:05 min instead of 4:5 min
if (dataw[1] != '') { detik = dataw[1].replace('S', ''); if (detik < 10) detik = "0"+detik; }
I hope this can be useful for someone.
Bye and thanks again for your project :)
Cool @jpp86, your welcome. 👍