change how updateDuration happens
This commit is contained in:
parent
a658b40946
commit
feb102251e
2 changed files with 5 additions and 4 deletions
|
@ -275,7 +275,7 @@ angular.module('podcasts.models', ['podcasts.database', 'podcasts.utilities'])
|
|||
var feedItem = _get(feedItemId, function(feedItem) {
|
||||
feedItem.queued = 0;
|
||||
|
||||
var promise = db.put("feedItem", feedItem);
|
||||
var promise = db.put("feedItem", feedItem)
|
||||
.then(function() {
|
||||
$rootScope.$broadcast('queueListRefresh');
|
||||
});
|
||||
|
|
|
@ -110,9 +110,6 @@ angular.module('podcasts.services', ['podcasts.utilities', 'podcasts.queueList',
|
|||
function updateSong(feedItem, $scope)
|
||||
{
|
||||
nowPlaying.title = feedItem.title;
|
||||
/*$timeout(function() {
|
||||
player.nowPlaying.duration = audio.duration;
|
||||
}, 100);*/
|
||||
nowPlaying.currentFeedItem = feedItem;
|
||||
nowPlaying.description = feedItem.description;
|
||||
nowPlaying.feed = feedItem.feed;
|
||||
|
@ -122,6 +119,10 @@ angular.module('podcasts.services', ['podcasts.utilities', 'podcasts.queueList',
|
|||
|
||||
function updatePosition($scope)
|
||||
{
|
||||
$timeout(function() {
|
||||
nowPlaying.duration = audio.duration;
|
||||
}, 500);
|
||||
|
||||
setInterval(function() {
|
||||
nowPlaying.position = audio.currentTime;
|
||||
$scope.$apply();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue