mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Dragging and loading
- Fixed searching in offline - Fixed load on mobile in offline
This commit is contained in:
@@ -985,7 +985,7 @@ function seekToMove(e){
|
||||
|
||||
var acceptable = ["bar", "controls", "duration"];
|
||||
if(acceptable.indexOf($(e.target).attr("id")) >= 0 && dragging) {
|
||||
$("#bar").width(((100 / Player.player.getDuration()) * total) + "%");
|
||||
$("#bar").width(((100 / duration) * total) + "%");
|
||||
}
|
||||
} catch(e){}
|
||||
}
|
||||
@@ -999,13 +999,15 @@ function seekToClick(e){
|
||||
|
||||
Helper.log(total);
|
||||
if(!chromecastAvailable){
|
||||
Player.player.seekTo(total);
|
||||
Player.player.seekTo(total + Player.np.start);
|
||||
|
||||
dMinutes = Math.floor(duration / 60);
|
||||
dSeconds = duration - dMinutes * 60;
|
||||
currDurr = total;
|
||||
if(currDurr > duration)
|
||||
currDurr = duration;
|
||||
if(currDurr - Player.np.start > duration) {
|
||||
currDurr = duration - Player.np.start;
|
||||
}
|
||||
currDurr = currDurr - Player.np.start;
|
||||
minutes = Math.floor(currDurr / 60);
|
||||
seconds = currDurr - (minutes * 60);
|
||||
document.getElementById("duration").innerHTML = Helper.pad(minutes)+":"+Helper.pad(seconds)+" <span id='dash'>/</span> "+Helper.pad(dMinutes)+":"+Helper.pad(dSeconds);
|
||||
|
||||
@@ -447,6 +447,13 @@ var Player = {
|
||||
$("#playpause").css("visibility", "hidden");
|
||||
$("#playpause").css("pointer-events", "none");
|
||||
$("#player").css("opacity", "1");
|
||||
if(offline) {
|
||||
setTimeout(function(){
|
||||
$("#channel-load").css("display", "none");
|
||||
$("#playpause").css("visibility", "visible");
|
||||
$("#playpause").css("pointer-events", "all");
|
||||
}, 1500);
|
||||
}
|
||||
} else {
|
||||
//$("#channel-load").css("display", "none");
|
||||
}
|
||||
@@ -594,12 +601,6 @@ var Player = {
|
||||
//currDurr = currDurr - Player.np.start;
|
||||
minutes = Math.floor(currDurr / 60);
|
||||
seconds = currDurr - (minutes * 60);
|
||||
/*if(isNan(minutes)) {
|
||||
minutes = 0;
|
||||
}
|
||||
if(isNan(seconds)) {
|
||||
seconds = 0;
|
||||
}*/
|
||||
document.getElementById("duration").innerHTML = Helper.pad(minutes)+":"+Helper.pad(seconds)+" <span id='dash'>/</span> "+Helper.pad(dMinutes)+":"+Helper.pad(dSeconds);
|
||||
per = (100 / duration) * currDurr;
|
||||
if(per >= 100) {
|
||||
|
||||
Reference in New Issue
Block a user