PDXostc / media_manager-app

2 stars 5 forks source link

Media manager song progress #20

Open bharmon opened 9 years ago

bharmon commented 9 years ago

The playback line in "songProgress" doesn't always move; especially when you start the first item playing from the library.

aeichepdx commented 9 years ago

The songProgress updating relies on the width of the parent element. The ratio of how long the song's been playing to the total song length provides a percentage of the playback. That percentage is given as a CSS width. See line 571 of js/mediamanager.js

var ratio = 100/(songLength/p);
$(".progressPot").css("width",ratio+"%");

and the relevant HTML

<div id="songProgress" class="progressBar" data-progress-bar="">
    <div id="songSeek" class="progressPot bgColorTheme boxShadow3" data-song-seek="" style="">
        <a>
            <div></div>
        </a> 
    </div>
</div>