CC-2447:Preview keeps playing if you create a new playlist

- fixed
- preview stops on clicking on any of new, delete, done editing button
This commit is contained in:
james 2011-07-04 14:49:17 -04:00
parent cb72db4a31
commit dcddec9536
2 changed files with 10 additions and 6 deletions

View file

@ -141,19 +141,14 @@ function getFileExt(filename){
return filename.split('.').pop();
}
var currentAudioPreviewID = "";
function audioPreview(filename, elemID){
var elems = $('.ui-icon.ui-icon-pause');
elems.attr("class", "ui-icon ui-icon-play");
if (currentAudioPreviewID == elemID){
if ($("#jquery_jplayer_1").data("jPlayer") && $("#jquery_jplayer_1").data("jPlayer").status.paused != true){
$('#jquery_jplayer_1').jPlayer('stop');
currentAudioPreviewID = "";
return;
} else {
currentAudioPreviewID = elemID;
}
var ext = getFileExt(filename);