From f4f1b68abcc069fb3d74a05d6a9a7d22c7c66715 Mon Sep 17 00:00:00 2001 From: Naomi Date: Tue, 8 Apr 2014 18:32:03 -0400 Subject: [PATCH] CC-5788 : Library Cleanup starting to play an item if the player is paused. --- .../public/js/airtime/audiopreview/jPlayerWindow.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/airtime_mvc/public/js/airtime/audiopreview/jPlayerWindow.js b/airtime_mvc/public/js/airtime/audiopreview/jPlayerWindow.js index 80a47a3b4..49fa075e4 100644 --- a/airtime_mvc/public/js/airtime/audiopreview/jPlayerWindow.js +++ b/airtime_mvc/public/js/airtime/audiopreview/jPlayerWindow.js @@ -8,8 +8,10 @@ var AIRTIME = (function(AIRTIME) { function addToPlaylist(data) { var playNow = false; + var jPlayerData = $("#jquery_jplayer_1").data(); - if (playlistJPlayer.playlist.length === 0) { + //if (playlistJPlayer.playlist.length === 0) { + if (jPlayerData.jPlayer.status.paused === true) { playNow = true; } @@ -65,10 +67,9 @@ var AIRTIME = (function(AIRTIME) { { swfPath: baseUrl+"js/jplayer", supplied: "mp3, oga, m4a, wav, flac", - //solution: "flash, html", preload: "none", wmode: "window", - remainingDuration: true, + //remainingDuration: true, size: { width: "0px", height: "0px", @@ -104,8 +105,8 @@ var AIRTIME = (function(AIRTIME) { }); $( "#open_playlist" ).click(function() { - $(".jp-playlist").toggleClass( "open" ); - $( this ).toggleClass( "selected" ); + $(".jp-playlist").toggleClass("open"); + $(this).toggleClass("selected"); }); };