Fixed some duration issues, and updated color of durationbar

This commit is contained in:
Kasper Rynning-Tønnesen
2016-03-04 13:18:41 +01:00
parent 6535b07c08
commit ed841c503a
5 changed files with 9 additions and 8 deletions

View File

@@ -213,7 +213,7 @@
<i id="play" class="mdi-av-play-arrow hide"></i>
<i id="pause" class="mdi-av-pause"></i>
</div>
<div id="duration">00:00 / 00:00</div>
<div id="duration"></div>
<div id="fullscreen">
<i class="mdi-navigation-fullscreen"></i>
</div>

View File

@@ -1266,7 +1266,7 @@ nav ul li:hover, nav ul li.active {
#bar
{
height:100%;
background-color:rgba(0,0,0,0.3);
background-color:rgba(0,0,0,0.5);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -35,6 +35,7 @@ var Player = {
time = obj[2];
seekTo = time - conf["startTime"];
song_title = obj[0][0]["title"];
duration = obj[0][0]["duration"];
if(mobile_beginning && window.mobilecheck() && seekTo == 0)
@@ -269,14 +270,14 @@ var Player = {
durationSetter: function()
{
try{
duration = Player.ytplayer.getDuration();
}catch(e){duration = 0};
/*try{
//duration = Player.ytplayer.getDuration();
}catch(e){};*/
if(duration != undefined){
try{
dMinutes = Math.floor(duration / 60);
dSeconds = duration - dMinutes * 60;
currDurr = Player.ytplayer.getCurrentTime();
currDurr = Player.ytplayer.getCurrentTime() != undefined ? Player.ytplayer.getCurrentTime() : seekTo;
if(currDurr > duration)
currDurr = duration;
minutes = Math.floor(currDurr / 60);