Provide song duration to jplayer when starting playback

This commit is contained in:
mvn23 2019-09-30 10:53:32 +02:00
parent 44607e4e9b
commit 2f920f434b

View file

@ -114,11 +114,11 @@ angular.module('jamstash.player.directive', ['jamstash.player.service', 'jamstas
}
var media = {};
if (newSong.suffix === 'oga') {
media= { oga: newSong.url };
media= { oga: newSong.url, duration: newSong.duration };
} else if (newSong.suffix === 'm4a') {
media= { m4a: newSong.url };
media= { m4a: newSong.url, duration: newSong.duration };
} else if (newSong.suffix === 'mp3') {
media= { mp3: newSong.url };
media= { mp3: newSong.url, duration: newSong.duration };
}
$player.jPlayer('setMedia', media);
if (globals.settings.Jukebox) {