diff --git a/README.md b/README.md index 4b58169..75485f7 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,8 @@ Features * Podcast support (includes description field on hover) * Favorite/Starred support for Albums & Songs * Shortcuts supported -* Chat support (when the chat window is open it will auto-update in the background) -* Now Playing support (see what others are streaming at the moment) * Easy installation (Chrome App or manual install) * FF/Chome support (IE9 works but is a little rough around the edges) -* Sortable Columns * Light/Dark Theme * Last.fm support * Autopilot Mode (click one button and songs continue to play) diff --git a/index.html b/index.html index 9935bd4..78303f6 100755 --- a/index.html +++ b/index.html @@ -138,5 +138,17 @@ + diff --git a/js/_saved/saved.html b/js/_saved/saved.html index 7daddd5..85c8c06 100644 --- a/js/_saved/saved.html +++ b/js/_saved/saved.html @@ -264,7 +264,8 @@
- All + + All None Remove Song(s) Empty diff --git a/js/_saved/subsonicViewModel.js b/js/_saved/subsonicViewModel.js index b3c51b2..8fd0a3c 100644 --- a/js/_saved/subsonicViewModel.js +++ b/js/_saved/subsonicViewModel.js @@ -36,64 +36,9 @@ } } - self.getAlbumsByTag = function (data, Event) { // Gets albums by ID3 tag - var id = event.currentTarget.id; - $('#AutoAlbumContainer li').removeClass('selected'); - $('#ArtistContainer li').removeClass('selected'); - $(this).addClass('selected'); - var map = { - create: function (options) { - var album = options.data; - var coverart, starred; - if (typeof album.coverArt != 'undefined') { - coverart = self.settings.BaseURL() + '/getCoverArt.view?' + self.settings.BaseParams() + '&size=50&id=' + album.coverArt; - } - if (typeof album.starred !== 'undefined') { starred = true; } else { starred = false; } - return new model.Album(album.id, album.parent, album.name, album.artist, coverart, album.created, starred, '', ''); - } - } - $.ajax({ - url: self.settings.BaseURL() + '/getArtist.view?' + self.settings.BaseParams() + '&id=' + id, - method: 'GET', - dataType: self.settings.Protocol(), - timeout: 10000, - success: function (data) { - if (data["subsonic-response"].artist !== undefined) { - var children = []; - if (data["subsonic-response"].artist.album.length > 0) { - children = data["subsonic-response"].artist.album; - } else { - children[0] = data["subsonic-response"].artist.album; - } - self.album.removeAll(); - self.templateToUse('album-template'); - mapping.fromJS(children, map, self.album); - } - } - }); - } - self.getSongsByTag = function (data, event) { // Gets songs by ID3 tag - var id = event.currentTarget.id; - $.ajax({ - url: self.settings.BaseURL() + '/getAlbum.view?' + self.settings.BaseParams() + '&id=' + id, - method: 'GET', - dataType: self.settings.Protocol(), - timeout: 10000, - success: function (data) { - if (data["subsonic-response"].album !== undefined) { - var children = []; - if (data["subsonic-response"].album.song.length > 0) { - children = data["subsonic-response"].album.song; - } else { - children[0] = data["subsonic-response"].album.song; - } - self.song.removeAll(); - mapping.fromJS(children, self.songMapping, self.song); - } - } - }); - }; + + // Referenced Functions self.getRandomSongs = function (action, genre, folder) { return subsonic.getRandomSongs(action, genre, folder); } diff --git a/js/app.js b/js/app.js index c945164..677f9a8 100755 --- a/js/app.js +++ b/js/app.js @@ -5,7 +5,8 @@ JamStash.config(function ($routeProvider) { .when('/index', { redirectTo: '/library' }) .when('/settings', { templateUrl: 'js/partials/settings.html', controller: 'SettingsCtrl' }) .when('/library', { templateUrl: 'js/partials/library.html', controller: 'SubsonicCtrl' }) - .when('/library/:albumId', { templateUrl: 'js/partials/library.html', controller: 'SubsonicCtrl' }) + .when('/library/:artistId', { templateUrl: 'js/partials/library.html', controller: 'SubsonicCtrl', reloadOnSearch: false }) + .when('/library/:artistId/:albumId', { templateUrl: 'js/partials/library.html', controller: 'SubsonicCtrl', reloadOnSearch: false }) .when('/playlists', { templateUrl: 'js/partials/playlists.html', controller: 'PlaylistCtrl' }) .when('/podcasts', { templateUrl: 'js/partials/podcasts.html', controller: 'PodcastCtrl' }) .when('/archive', { templateUrl: 'js/partials/archive.html', controller: 'ArchiveCtrl' }) @@ -17,7 +18,7 @@ JamStash.config(function ($routeProvider) { $rootScope.$on("$locationChangeStart", function (event, next, current) { $rootScope.loggedIn = false; var path = $location.path().replace(/^\/([^\/]*).*$/, '$1'); - if (globals.settings.Username != "" && globals.settings.Password != "" && globals.settings.Server != "") { + if (globals.settings.Username != "" && globals.settings.Password != "" && globals.settings.Server != "" && path != 'archive') { $rootScope.loggedIn = true; } if (!$rootScope.loggedIn && (path != 'settings' && path != 'archive')) { @@ -65,17 +66,19 @@ JamStash.service('model', function (utils) { this.id = id; this.name = name; } - this.Album = function (id, parentid, name, artist, coverartthumb, coverartfull, date, starred, description, url) { + this.Album = function (id, parentid, name, artist, artistId, coverartthumb, coverartfull, date, starred, description, url, type) { this.id = id; this.parentid = parentid; this.name = name; this.artist = artist; + this.artistId = artistId; this.coverartthumb = coverartthumb; this.coverartfull = coverartfull; this.date = date; this.starred = starred; this.description = description; this.url = url; + this.type = type; } this.Song = function (id, parentid, track, name, artist, artistId, album, albumId, coverartthumb, coverartfull, duration, rating, starred, suffix, specs, url, position, description) { this.id = id; @@ -167,6 +170,28 @@ JamStash.directive('ngEnter', function () { }); }; }); +JamStash.directive('ngDownload', function ($compile) { + return { + restrict: 'E', + scope: { data: '=' }, + link: function (scope, elm, attrs) { + function getUrl() { + return URL.createObjectURL(new Blob([JSON.stringify(scope.data)], { type: "application/json" })); + } + + elm.append($compile( + '' + + 'Download' + + '' + )(scope)); + + scope.$watch(scope.data, function () { + elm.children()[0].href = getUrl(); + }); + } + }; +}); /* Factory */ JamStash.factory('json', function ($http) { // Deferred loading diff --git a/js/controllers/archive.js b/js/controllers/archive.js index f7b4df7..ccccbb9 100644 --- a/js/controllers/archive.js +++ b/js/controllers/archive.js @@ -137,7 +137,7 @@ function ArchiveCtrl($scope, $rootScope, $location, $routeParams, $http, utils, description += typeof song.publisher != 'undefined' ? 'Transferer: ' + song.publisher + '
' : ''; description += typeof song.avg_rating != 'undefined' ? 'Rating: ' + song.avg_rating + '
' : ''; description += typeof song.downloads != 'undefined' ? 'Downloads: ' + song.downloads + '
' : ''; - return new model.Album(song.identifier, null, song.title, song.collection[0], coverartthumb, coverartfull, $.format.date(new Date(song.publicdate), "yyyy-MM-dd h:mm a"), starred, description, url); + return new model.Album(song.identifier, null, song.title, song.collection[0], '', coverartthumb, coverartfull, $.format.date(new Date(song.publicdate), "yyyy-MM-dd h:mm a"), starred, description, url); } if ($scope.filter.Source) { url += ' AND source:(' + $scope.filter.Source + ')'; diff --git a/js/controllers/library.js b/js/controllers/library.js index 59b4b3d..6a6cb38 100644 --- a/js/controllers/library.js +++ b/js/controllers/library.js @@ -3,12 +3,15 @@ function SubsonicCtrl($scope, $rootScope, $location, $window, $routeParams, util $("#SubsonicAlbums").layout($scope.layoutThreeCol); $rootScope.song = []; + //$scope.artistId = $routeParams.artistId; + //$scope.albumId = $routeParams.albumId; $scope.settings = globals.settings; $scope.itemType = 'ss'; $scope.index = []; $scope.shortcut = []; $scope.album = []; $scope.Server = globals.settings.Server; + $scope.playlistMenu = []; $scope.AutoAlbums = [ { id: "random", name: "Random" }, { id: "newest", name: "Recently Added" }, @@ -64,6 +67,9 @@ function SubsonicCtrl($scope, $rootScope, $location, $window, $routeParams, util } return new model.Index(data.name, artists); } + $scope.mapPlaylist = function (data) { + return new model.Artist(data.id, data.name); + } $scope.getArtists = function (id) { var url, id; if (utils.getValue('MusicFolders')) { @@ -113,17 +119,25 @@ function SubsonicCtrl($scope, $rootScope, $location, $window, $routeParams, util }; $scope.mapAlbum = function (data) { var album = data; - var coverartthumb, coverartfull, starred; + var title, coverartthumb, coverartfull, starred; if (typeof album.coverArt != 'undefined') { coverartthumb = globals.BaseURL() + '/getCoverArt.view?' + globals.BaseParams() + '&size=160&id=' + album.coverArt; coverartfull = globals.BaseURL() + '/getCoverArt.view?' + globals.BaseParams() + '&id=' + album.coverArt; } if (typeof album.starred !== 'undefined') { starred = true; } else { starred = false; } - return new model.Album(album.id, album.parent, album.title, album.artist, coverartthumb, coverartfull, $.format.date(new Date(album.created), "yyyy-MM-dd h:mm a"), starred, '', ''); + if (typeof album.title !== 'undefined') { title = album.title; } else { title = album.name; } + var type; + if (album.isDir) { + type = 'byfolder'; + } else { + type = 'bytag'; + } + return new model.Album(album.id, album.parent, title, album.artist, album.artistId, coverartthumb, coverartfull, $.format.date(new Date(album.created), "yyyy-MM-dd h:mm a"), starred, '', '', type); } $scope.getAlbums = function (id) { $scope.selectedAutoAlbum = null; $scope.selectedArtist = id; + $scope.artistId = id; var url = globals.BaseURL() + '/getMusicDirectory.view?' + globals.BaseParams() + '&id=' + id; $.ajax({ url: url, @@ -151,6 +165,7 @@ function SubsonicCtrl($scope, $rootScope, $location, $window, $routeParams, util if ($scope.selectedSubsonicAlbumSort != "default") { $scope.sortSubsonicAlbums($scope.selectedSubsonicAlbumSort); } + //$location.path('/library/' + id); $scope.$apply(); } else { notifications.updateMessage('No Albums Returned :(', true); @@ -158,6 +173,77 @@ function SubsonicCtrl($scope, $rootScope, $location, $window, $routeParams, util } }); }; + $scope.getArtistByTag = function (id) { // Gets Artist by ID3 tag + /* + var map = { + create: function (options) { + var album = options.data; + var coverart, starred; + if (typeof album.coverArt != 'undefined') { + coverart = self.settings.BaseURL() + '/getCoverArt.view?' + self.settings.BaseParams() + '&size=50&id=' + album.coverArt; + } + if (typeof album.starred !== 'undefined') { starred = true; } else { starred = false; } + return new model.Album(album.id, album.parent, album.name, album.artist, coverart, album.created, starred, '', ''); + } + } + */ + + $scope.selectedAutoAlbum = null; + $scope.selectedArtist = id; + var url = globals.BaseURL() + '/getArtist.view?' + globals.BaseParams() + '&id=' + id; + $.ajax({ + url: url, + method: 'GET', + dataType: globals.settings.Protocol, + timeout: globals.settings.Timeout, + success: function (data) { + var items = []; + if (typeof data["subsonic-response"].artist != 'undefined') { + if (data["subsonic-response"].artist.album.length > 0) { + items = data["subsonic-response"].artist.album; + } else { + items[0] = data["subsonic-response"].artist.album; + } + $scope.album = []; + $rootScope.song = []; + + angular.forEach(items, function (item, key) { + $scope.album.push($scope.mapAlbum(item)); + }); + $scope.$apply(); + } else { + notifications.updateMessage('No Albums Returned :(', true); + } + } + }); + }; + $scope.getAlbumByTag = function (id) { // Gets Album by ID3 tag + $.ajax({ + url: globals.BaseURL() + '/getAlbum.view?' + globals.BaseParams() + '&id=' + id, + method: 'GET', + dataType: globals.settings.Protocol, + timeout: globals.settings.Timeout, + success: function (data) { + if (typeof data["subsonic-response"].album != 'undefined') { + $scope.album = []; + $rootScope.song = []; + + $scope.album.push($scope.mapAlbum(data["subsonic-response"].album)); + + var items = []; + if (data["subsonic-response"].album.song.length > 0) { + items = data["subsonic-response"].album.song; + } else { + items[0] = data["subsonic-response"].album.song; + } + angular.forEach(items, function (item, key) { + $rootScope.song.push($scope.mapSong(item)); + }); + $scope.$apply(); + } + } + }); + }; $scope.offset = 0; $scope.getAlbumListBy = function (id, offset) { var size, url; @@ -253,6 +339,7 @@ function SubsonicCtrl($scope, $rootScope, $location, $window, $routeParams, util if (albums.length > 0) { $scope.album = albums; } + //$location.path('/library/0/' + id); $scope.$apply(); } } else { @@ -315,15 +402,64 @@ function SubsonicCtrl($scope, $rootScope, $location, $window, $routeParams, util $scope.toggleAZ = function (event) { $scope.toggleSubmenu('#submenu_AZIndex', '#AZIndex', 'right', 44); } - $scope.addSongsToQueue = function () { + $scope.loadPlaylistsForMenu = function (data, event) { + $.ajax({ + url: globals.BaseURL() + '/getPlaylists.view?' + globals.BaseParams(), + method: 'GET', + dataType: globals.settings.Protocol, + timeout: globals.settings.Timeout, + success: function (data) { + var playlists = []; + $scope.playlistMenu = []; + if (typeof data["subsonic-response"].playlists.playlist != 'undefined') { + if (data["subsonic-response"].playlists.playlist.length > 0) { + playlists = data["subsonic-response"].playlists.playlist; + } else { + playlists[0] = data["subsonic-response"].playlists.playlist; + } + angular.forEach(playlists, function (item, key) { + if (item.owner == globals.settings.Username) { + $scope.playlistMenu.push($scope.mapPlaylist(item)); + } + }); + if ($scope.playlistMenu.length > 0) { + $scope.$apply(); + $scope.toggleSubmenu('#submenu_AddToPlaylist', '#action_AddToPlaylist', 'left', 124); + } else { + notifications.updateMessage('No Playlists :(', true); + } + } + /* + $("+ New
").appendTo("#" + menu); + $.each(playlists, function (i, playlist) { + $('' + playlist.name + '
').appendTo("#" + menu); + }); + */ + } + }); + } + $scope.addToPlaylist = function (id) { + var songs = []; if ($scope.selectedSongs.length !== 0) { angular.forEach($scope.selectedSongs, function (item, key) { - $scope.queue.push(item); - item.selected = false; + songs.push(item.id); }); - $('body').layout().open('south'); - notifications.updateMessage($scope.selectedSongs.length + ' Song(s) Added to Queue', true); - $scope.selectedSongs.length = 0; + var runningVersion = utils.parseVersionString(globals.settings.ApiVersion); + var minimumVersion = utils.parseVersionString('1.8.0'); + if (utils.checkVersion(runningVersion, minimumVersion)) { // is 1.8.0 or newer + $.ajax({ + type: 'GET', + url: globals.BaseURL() + '/updatePlaylist.view?' + globals.BaseParams(), + dataType: globals.settings.Protocol, + timeout: globals.settings.Timeout, + data: { playlistId: id, songIdToAdd: songs }, + success: function (data) { + $scope.selectedSongs.length = 0; + notifications.updateMessage('Playlist Updated!', true); + }, + traditional: true // Fixes POST with an array in JQuery 1.4 + }); + } } } $scope.sortDateFunction = function (a, b) { @@ -361,8 +497,10 @@ function SubsonicCtrl($scope, $rootScope, $location, $window, $routeParams, util /* Launch on Startup */ $scope.getArtists(); - if ($routeParams.albumId) { - $scope.getSongs($routeParams.albumId, ''); + if ($routeParams.artistId && $routeParams.albumId) { + $scope.getAlbumByTag($routeParams.albumId); + } else if ($routeParams.artistId) { + $scope.getAlbums($routeParams.artistId); } /* End Startup */ }); diff --git a/js/controllers/main.js b/js/controllers/main.js index 1565f81..8447ed2 100644 --- a/js/controllers/main.js +++ b/js/controllers/main.js @@ -22,6 +22,13 @@ function AppCtrl($scope, $rootScope, $document, $location, utils, globals, model } } }); + $rootScope.loggedIn = function () { + if (globals.settings.Server != '' && globals.settings.Username != '' && globals.settings.Password != '') { + return true; + } else { + return false; + } + } /* $scope.playSong = function (loadonly, data) { $scope.$apply(function () { @@ -330,6 +337,17 @@ function AppCtrl($scope, $rootScope, $document, $location, utils, globals, model item.selected = false; }); } + $scope.addSongsToQueue = function () { + if ($scope.selectedSongs.length !== 0) { + angular.forEach($scope.selectedSongs, function (item, key) { + $scope.queue.push(item); + item.selected = false; + }); + $('body').layout().open('south'); + notifications.updateMessage($scope.selectedSongs.length + ' Song(s) Added to Queue', true); + $scope.selectedSongs.length = 0; + } + } $scope.isActive = function (route) { return route === $location.path(); }; @@ -397,10 +415,14 @@ function AppCtrl($scope, $rootScope, $document, $location, utils, globals, model dataType: globals.settings.Protocol, timeout: globals.settings.Timeout, success: function (data) { - if (data["subsonic-response"].user.downloadRole == true) { - $window.location.href = globals.BaseURL() + '/download.view?' + globals.BaseParams() + '&id=' + id; + if (typeof data["subsonic-response"].error != 'undefined') { + notifications.updateMessage('Error: ' + data["subsonic-response"].error.message, true); } else { - notifications.updateMessage('You do not have permission to Download', true); + if (data["subsonic-response"].user.downloadRole == true) { + $window.location.href = globals.BaseURL() + '/download.view?' + globals.BaseParams() + '&id=' + id; + } else { + notifications.updateMessage('You do not have permission to Download', true); + } } } }); @@ -574,11 +596,10 @@ function AppCtrl($scope, $rootScope, $document, $location, utils, globals, model - /* Launch on Startup */ $scope.loadSettings(); utils.switchTheme(globals.settings.Theme); - if (globals.settings.Server != '' && globals.settings.Username != '' && globals.settings.Password != '') { + if ($scope.loggedIn) { $scope.ping(); $scope.getMusicFolders(); if (globals.settings.SaveTrackPosition) { diff --git a/js/controllers/playlists.js b/js/controllers/playlists.js index 18703ab..4022a37 100644 --- a/js/controllers/playlists.js +++ b/js/controllers/playlists.js @@ -162,53 +162,6 @@ function PlaylistCtrl($scope, $rootScope, $location, utils, globals, model, noti } }); } - $scope.addSongsToPlaylist = function (data, event) { - var $this = $(event.target); - var submenu = $('div#submenu_AddToPlaylist'); - if (submenu.is(":visible")) { - submenu.fadeOut(); - } else { - $scope.loadPlaylistsForMenu('submenu_AddToPlaylist'); - //get the position of the placeholder element - pos = $this.offset(); - width = $this.width(); - height = $this.height(); - //show the menu directly over the placeholder - submenu.css({ "left": (pos.left) + "px", "top": (pos.top + height + 14) + "px" }).fadeIn(400); - } - } - $scope.playlistMenu = []; - $scope.loadPlaylistsForMenu = function (menu) { - var map = { - create: function (options) { - var artist = options.data; - return new model.Artist(artist.id, artist.name); - } - }; - $.ajax({ - url: globals.BaseURL() + '/getPlaylists.view?' + globals.BaseParams(), - method: 'GET', - dataType: globals.settings.Protocol, - timeout: globals.settings.Timeout, - success: function (data) { - var playlists = []; - if (data["subsonic-response"].playlists.playlist !== undefined) { - if (data["subsonic-response"].playlists.playlist.length > 0) { - playlists = data["subsonic-response"].playlists.playlist; - } else { - playlists[0] = data["subsonic-response"].playlists.playlist; - } - mapping.fromJS(playlists, map, $scope.playlistMenu); - } - /* - $("+ New
").appendTo("#" + menu); - $.each(playlists, function (i, playlist) { - $('' + playlist.name + '
').appendTo("#" + menu); - }); - */ - } - }); - } $scope.newPlaylist = function (data, event) { var reply = prompt("Choose a name for your new playlist.", ""); if (reply != 'null' && reply != null && reply != '') { @@ -262,31 +215,6 @@ function PlaylistCtrl($scope, $rootScope, $location, utils, globals, model, noti } } } - $scope.addToPlaylist = function (data, event) { - var id = event.currentTarget.id; - var songs = []; - ko.utils.arrayForEach($scope.selectedSongs(), function (item) { - songs.push(item.id); - }); - if (songs.length > 0) { - var runningVersion = utils.parseVersionString(globals.settings.ApiVersion()); - var minimumVersion = utils.parseVersionString('1.8.0'); - if (utils.checkVersion(runningVersion, minimumVersion)) { // is 1.8.0 or newer - $.ajax({ - type: 'GET', - url: globals.BaseURL() + '/updatePlaylist.view?' + globals.BaseParams(), - dataType: globals.settings.Protocol, - timeout: globals.settings.Timeout, - data: { playlistId: id, songIdToAdd: songs }, - success: function (data) { - $scope.selectedSongs(null); - updateMessage('Playlist Updated!', true); - }, - traditional: true // Fixes POST with an array in JQuery 1.4 - }); - } - } - } $scope.removeSelectedSongs = function (data, event) { ko.utils.arrayForEach($scope.selectedSongs(), function (item) { $rootScope.song.remove(item); diff --git a/js/json_changelog.js b/js/json_changelog.js index 26487bc..2ecc256 100644 --- a/js/json_changelog.js +++ b/js/json_changelog.js @@ -1,4 +1,9 @@ [ +{ "date": "12/5/2013", "version": "3.1.2", + "changes": [ + { "text": "- Improved linking between tabs, + Playlist fixed, " } + ] +}, { "date": "10/31/2013", "version": "3.1.1", "changes": [ { "text": "- Sway.fm Media Keys plugin fixed" }, diff --git a/js/partials/library.html b/js/partials/library.html index 9f85666..dbd7bd6 100644 --- a/js/partials/library.html +++ b/js/partials/library.html @@ -17,9 +17,9 @@ All None + Queue - + Playlist -
@@ -58,7 +58,7 @@
@@ -70,25 +70,42 @@ +
diff --git a/js/partials/playlists.html b/js/partials/playlists.html index 0d5cc6e..6a1cd15 100644 --- a/js/partials/playlists.html +++ b/js/partials/playlists.html @@ -5,6 +5,9 @@
+ All + None + + Queue + New Delete Save diff --git a/js/partials/podcasts.html b/js/partials/podcasts.html index 94ae788..e085437 100644 --- a/js/partials/podcasts.html +++ b/js/partials/podcasts.html @@ -5,7 +5,9 @@
- + All + None + + Queue
diff --git a/js/partials/settingsForm.html b/js/partials/settingsForm.html index 585184b..0d8b199 100644 --- a/js/partials/settingsForm.html +++ b/js/partials/settingsForm.html @@ -85,8 +85,15 @@

+
-
Save
+
+Save +
diff --git a/js/partials/songs.html b/js/partials/songs.html index b6dccfc..dd71913 100644 --- a/js/partials/songs.html +++ b/js/partials/songs.html @@ -6,11 +6,12 @@
- +
- - + + +
 
{{o.time}}
diff --git a/js/player.js b/js/player.js index 4904575..9006685 100644 --- a/js/player.js +++ b/js/player.js @@ -75,7 +75,7 @@ if (song) { var position = audio.status.currentTime; if (position != null) { - $('#action_SaveProgress').fadeOut("slow").delay(500).fadeIn("slow").delay(500).fadeOut("slow").delay(500).fadeIn("slow"); + $('#action_SaveProgress').fadeTo("slow", 0).delay(500).fadeTo("slow", 1).delay(500).fadeTo("slow", 0).delay(500).fadeTo("slow", 1); song.position = position; // Save Queue if (utils.browserStorageCheck()) { @@ -191,7 +191,6 @@ } } $('#SMStats').html(spechtml); - scrobbleSong(false); scrobbled = false; if (globals.settings.NotificationSong && !loadonly) { @@ -215,7 +214,7 @@ volume = parseFloat(utils.getValue('Volume')); } var audioSolution = "html,flash"; - if (utils.getValue('ForceFlash')) { + if (globals.settings.ForceFlash) { audioSolution = "flash,html"; } //var salt = Math.floor(Math.random() * 100000); @@ -243,6 +242,7 @@ duration: "#duration" }, ready: function () { + console.log("File Suffix: " + suffix); if (suffix == 'oga') { $(this).jPlayer("setMedia", { oga: url, @@ -352,24 +352,18 @@ } scrobbleSong = function (submission) { - var songid = $('#songdetails li.song').attr('id'); - if (typeof songid != 'undefined' && globals.settings.Username != '' && globals.settings.Server != '') { - if (globals.settings.Debug) { console.log('Scrobble Song: ' + songid); } + if ($rootScope.loggedIn && submission) { + var id = $rootScope.playingSong.id; + if (globals.settings.Debug) { console.log('Scrobble Song: ' + id); } $.ajax({ - url: globals.BaseURL() + '/scrobble.view?' + globals.BaseParams() + '&id=' + songid + "&submission=" + submission, + url: globals.BaseURL() + '/scrobble.view?' + globals.BaseParams() + '&id=' + id + "&submission=" + submission, method: 'GET', dataType: globals.settings.Protocol, timeout: 10000, success: function () { - if (submission) { - scrobbled = true; - } + scrobbled = true; } }); - } else { - if (submission) { - scrobbled = true; - } } } rateSong = function (songid, rating) { diff --git a/js/plugins/jplayer/Jplayer.swf b/js/plugins/jplayer/Jplayer.swf index aca11a5..2121715 100644 Binary files a/js/plugins/jplayer/Jplayer.swf and b/js/plugins/jplayer/Jplayer.swf differ diff --git a/js/plugins/jplayer/jquery.jplayer.min.js b/js/plugins/jplayer/jquery.jplayer.min.js index 4cc3f06..796e970 100644 --- a/js/plugins/jplayer/jquery.jplayer.min.js +++ b/js/plugins/jplayer/jquery.jplayer.min.js @@ -2,96 +2,113 @@ * jPlayer Plugin for jQuery JavaScript Library * http://www.jplayer.org * - * Copyright (c) 2009 - 2012 Happyworm Ltd - * Dual licensed under the MIT and GPL licenses. - * - http://www.opensource.org/licenses/mit-license.php - * - http://www.gnu.org/copyleft/gpl.html + * Copyright (c) 2009 - 2013 Happyworm Ltd + * Licensed under the MIT license. + * http://opensource.org/licenses/MIT * * Author: Mark J Panaghiston - * Version: 2.2.0 - * Date: 13th September 2012 + * Version: 2.5.0 + * Date: 7th November 2013 */ -(function(b,f){b.fn.jPlayer=function(a){var c="string"===typeof a,d=Array.prototype.slice.call(arguments,1),e=this,a=!c&&d.length?b.extend.apply(null,[!0,a].concat(d)):a;if(c&&"_"===a.charAt(0))return e;c?this.each(function(){var c=b.data(this,"jPlayer"),h=c&&b.isFunction(c[a])?c[a].apply(c,d):c;if(h!==c&&h!==f)return e=h,!1}):this.each(function(){var c=b.data(this,"jPlayer");c?c.option(a||{}):b.data(this,"jPlayer",new b.jPlayer(a,this))});return e};b.jPlayer=function(a,c){if(arguments.length){this.element= -b(c);this.options=b.extend(!0,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};b.jPlayer.emulateMethods="load play pause";b.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";b.jPlayer.emulateOptions="muted volume";b.jPlayer.reservedEvent="ready flashreset resize repeat error warning";b.jPlayer.event={ready:"jPlayer_ready",flashreset:"jPlayer_flashreset",resize:"jPlayer_resize",repeat:"jPlayer_repeat", -click:"jPlayer_click",error:"jPlayer_error",warning:"jPlayer_warning",loadstart:"jPlayer_loadstart",progress:"jPlayer_progress",suspend:"jPlayer_suspend",abort:"jPlayer_abort",emptied:"jPlayer_emptied",stalled:"jPlayer_stalled",play:"jPlayer_play",pause:"jPlayer_pause",loadedmetadata:"jPlayer_loadedmetadata",loadeddata:"jPlayer_loadeddata",waiting:"jPlayer_waiting",playing:"jPlayer_playing",canplay:"jPlayer_canplay",canplaythrough:"jPlayer_canplaythrough",seeking:"jPlayer_seeking",seeked:"jPlayer_seeked", -timeupdate:"jPlayer_timeupdate",ended:"jPlayer_ended",ratechange:"jPlayer_ratechange",durationchange:"jPlayer_durationchange",volumechange:"jPlayer_volumechange"};b.jPlayer.htmlEvent="loadstart abort emptied stalled loadedmetadata loadeddata canplay canplaythrough ratechange".split(" ");b.jPlayer.pause=function(){b.each(b.jPlayer.prototype.instances,function(a,c){c.data("jPlayer").status.srcSet&&c.jPlayer("pause")})};b.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0, -sepHour:":",sepMin:":",sepSec:""};b.jPlayer.convertTime=function(a){var c=new Date(1E3*a),d=c.getUTCHours(),a=c.getUTCMinutes(),c=c.getUTCSeconds(),d=b.jPlayer.timeFormat.padHour&&10>d?"0"+d:d,a=b.jPlayer.timeFormat.padMin&&10>a?"0"+a:a,c=b.jPlayer.timeFormat.padSec&&10>c?"0"+c:c;return(b.jPlayer.timeFormat.showHour?d+b.jPlayer.timeFormat.sepHour:"")+(b.jPlayer.timeFormat.showMin?a+b.jPlayer.timeFormat.sepMin:"")+(b.jPlayer.timeFormat.showSec?c+b.jPlayer.timeFormat.sepSec:"")};b.jPlayer.uaBrowser= -function(a){var a=a.toLowerCase(),c=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,e=/(mozilla)(?:.*? rv:([\w.]+))?/,a=/(webkit)[ \/]([\w.]+)/.exec(a)||c.exec(a)||b.exec(a)||0>a.indexOf("compatible")&&e.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};b.jPlayer.uaPlatform=function(a){var b=a.toLowerCase(),d=/(android)/,e=/(mobile)/,a=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(b)||[],b=/(ipad|playbook)/.exec(b)||!e.exec(b)&&d.exec(b)||[];a[1]&&(a[1]=a[1].replace(/\s/g, -"_"));return{platform:a[1]||"",tablet:b[1]||""}};b.jPlayer.browser={};b.jPlayer.platform={};var i=b.jPlayer.uaBrowser(navigator.userAgent);i.browser&&(b.jPlayer.browser[i.browser]=!0,b.jPlayer.browser.version=i.version);i=b.jPlayer.uaPlatform(navigator.userAgent);i.platform&&(b.jPlayer.platform[i.platform]=!0,b.jPlayer.platform.mobile=!i.tablet,b.jPlayer.platform.tablet=!!i.tablet);b.jPlayer.prototype={count:0,version:{script:"2.2.0",needFlash:"2.2.0",flash:"unknown"},options:{swfPath:"js",solution:"html, flash", -supplied:"mp3",preload:"metadata",volume:0.8,muted:!1,wmode:"opaque",backgroundColor:"#000000",cssSelectorAncestor:"#jp_container_1",cssSelector:{videoPlay:".jp-video-play",play:".jp-play",pause:".jp-pause",stop:".jp-stop",seekBar:".jp-seek-bar",playBar:".jp-play-bar",mute:".jp-mute",unmute:".jp-unmute",volumeBar:".jp-volume-bar",volumeBarValue:".jp-volume-bar-value",volumeMax:".jp-volume-max",currentTime:".jp-current-time",duration:".jp-duration",fullScreen:".jp-full-screen",restoreScreen:".jp-restore-screen", -repeat:".jp-repeat",repeatOff:".jp-repeat-off",gui:".jp-gui",noSolution:".jp-no-solution"},fullScreen:!1,autohide:{restored:!1,full:!0,fadeIn:200,fadeOut:600,hold:1E3},loop:!1,repeat:function(a){a.jPlayer.options.loop?b(this).unbind(".jPlayerRepeat").bind(b.jPlayer.event.ended+".jPlayer.jPlayerRepeat",function(){b(this).jPlayer("play")}):b(this).unbind(".jPlayerRepeat")},nativeVideoControls:{},noFullScreen:{msie:/msie [0-6]/,ipad:/ipad.*?os [0-4]/,iphone:/iphone/,ipod:/ipod/,android_pad:/android [0-3](?!.*?mobile)/, -android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,webos:/webos/},noVolume:{ipad:/ipad/,iphone:/iphone/,ipod:/ipod/,android_pad:/android(?!.*?mobile)/,android_phone:/android.*?mobile/,blackberry:/blackberry/,windows_ce:/windows ce/,webos:/webos/,playbook:/playbook/},verticalVolume:!1,idPrefix:"jp",noConflict:"jQuery",emulateHtml:!1,errorAlerts:!1,warningAlerts:!1},optionsAudio:{size:{width:"0px",height:"0px",cssClass:""},sizeFull:{width:"0px",height:"0px",cssClass:""}}, -optionsVideo:{size:{width:"480px",height:"270px",cssClass:"jp-video-270p"},sizeFull:{width:"100%",height:"100%",cssClass:"jp-video-full"}},instances:{},status:{src:"",media:{},paused:!0,format:{},formatType:"",waitForPlay:!0,waitForLoad:!0,srcSet:!1,video:!1,seekPercent:0,currentPercentRelative:0,currentPercentAbsolute:0,currentTime:0,duration:0,readyState:0,networkState:0,playbackRate:1,ended:0},internal:{ready:!1},solution:{html:!0,flash:!0},format:{mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:!0, -media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"',flashCanPlay:!0,media:"audio"},oga:{codec:'audio/ogg; codecs="vorbis"',flashCanPlay:!1,media:"audio"},wav:{codec:'audio/wav; codecs="1"',flashCanPlay:!1,media:"audio"},webma:{codec:'audio/webm; codecs="vorbis"',flashCanPlay:!1,media:"audio"},fla:{codec:"audio/x-flv",flashCanPlay:!0,media:"audio"},rtmpa:{codec:'audio/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"audio"},m4v:{codec:'video/mp4; codecs="avc1.42E01E, mp4a.40.2"',flashCanPlay:!0,media:"video"}, -ogv:{codec:'video/ogg; codecs="theora, vorbis"',flashCanPlay:!1,media:"video"},webmv:{codec:'video/webm; codecs="vorbis, vp8"',flashCanPlay:!1,media:"video"},flv:{codec:"video/x-flv",flashCanPlay:!0,media:"video"},rtmpv:{codec:'video/rtmp; codecs="rtmp"',flashCanPlay:!0,media:"video"}},_init:function(){var a=this;this.element.empty();this.status=b.extend({},this.status);this.internal=b.extend({},this.internal);this.internal.domNode=this.element.get(0);this.formats=[];this.solutions=[];this.require= -{};this.htmlElement={};this.html={};this.html.audio={};this.html.video={};this.flash={};this.css={};this.css.cs={};this.css.jq={};this.ancestorJq=[];this.options.volume=this._limitValue(this.options.volume,0,1);b.each(this.options.supplied.toLowerCase().split(","),function(c,d){var e=d.replace(/^\s+|\s+$/g,"");if(a.format[e]){var f=false;b.each(a.formats,function(a,b){if(e===b){f=true;return false}});f||a.formats.push(e)}});b.each(this.options.solution.toLowerCase().split(","),function(c,d){var e= -d.replace(/^\s+|\s+$/g,"");if(a.solution[e]){var f=false;b.each(a.solutions,function(a,b){if(e===b){f=true;return false}});f||a.solutions.push(e)}});this.internal.instance="jp_"+this.count;this.instances[this.internal.instance]=this.element;this.element.attr("id")||this.element.attr("id",this.options.idPrefix+"_jplayer_"+this.count);this.internal.self=b.extend({},{id:this.element.attr("id"),jq:this.element});this.internal.audio=b.extend({},{id:this.options.idPrefix+"_audio_"+this.count,jq:f});this.internal.video= -b.extend({},{id:this.options.idPrefix+"_video_"+this.count,jq:f});this.internal.flash=b.extend({},{id:this.options.idPrefix+"_flash_"+this.count,jq:f,swf:this.options.swfPath+(this.options.swfPath.toLowerCase().slice(-4)!==".swf"?(this.options.swfPath&&this.options.swfPath.slice(-1)!=="/"?"/":"")+"Jplayer.swf":"")});this.internal.poster=b.extend({},{id:this.options.idPrefix+"_poster_"+this.count,jq:f});b.each(b.jPlayer.event,function(b,c){if(a.options[b]!==f){a.element.bind(c+".jPlayer",a.options[b]); -a.options[b]=f}});this.require.audio=false;this.require.video=false;b.each(this.formats,function(b,c){a.require[a.format[c].media]=true});this.options=this.require.video?b.extend(true,{},this.optionsVideo,this.options):b.extend(true,{},this.optionsAudio,this.options);this._setSize();this.status.nativeVideoControls=this._uaBlocklist(this.options.nativeVideoControls);this.status.noFullScreen=this._uaBlocklist(this.options.noFullScreen);this.status.noVolume=this._uaBlocklist(this.options.noVolume);this._restrictNativeVideoControls(); -this.htmlElement.poster=document.createElement("img");this.htmlElement.poster.id=this.internal.poster.id;this.htmlElement.poster.onload=function(){(!a.status.video||a.status.waitForPlay)&&a.internal.poster.jq.show()};this.element.append(this.htmlElement.poster);this.internal.poster.jq=b("#"+this.internal.poster.id);this.internal.poster.jq.css({width:this.status.width,height:this.status.height});this.internal.poster.jq.hide();this.internal.poster.jq.bind("click.jPlayer",function(){a._trigger(b.jPlayer.event.click)}); -this.html.audio.available=false;if(this.require.audio){this.htmlElement.audio=document.createElement("audio");this.htmlElement.audio.id=this.internal.audio.id;this.html.audio.available=!!this.htmlElement.audio.canPlayType&&this._testCanPlayType(this.htmlElement.audio)}this.html.video.available=false;if(this.require.video){this.htmlElement.video=document.createElement("video");this.htmlElement.video.id=this.internal.video.id;this.html.video.available=!!this.htmlElement.video.canPlayType&&this._testCanPlayType(this.htmlElement.video)}this.flash.available= -this._checkForFlash(10);this.html.canPlay={};this.flash.canPlay={};b.each(this.formats,function(b,c){a.html.canPlay[c]=a.html[a.format[c].media].available&&""!==a.htmlElement[a.format[c].media].canPlayType(a.format[c].codec);a.flash.canPlay[c]=a.format[c].flashCanPlay&&a.flash.available});this.html.desired=false;this.flash.desired=false;b.each(this.solutions,function(c,d){if(c===0)a[d].desired=true;else{var e=false,f=false;b.each(a.formats,function(b,c){a[a.solutions[0]].canPlay[c]&&(a.format[c].media=== -"video"?f=true:e=true)});a[d].desired=a.require.audio&&!e||a.require.video&&!f}});this.html.support={};this.flash.support={};b.each(this.formats,function(b,c){a.html.support[c]=a.html.canPlay[c]&&a.html.desired;a.flash.support[c]=a.flash.canPlay[c]&&a.flash.desired});this.html.used=false;this.flash.used=false;b.each(this.solutions,function(c,d){b.each(a.formats,function(b,c){if(a[d].support[c]){a[d].used=true;return false}})});this._resetActive();this._resetGate();this._cssSelectorAncestor(this.options.cssSelectorAncestor); -if(!this.html.used&&!this.flash.used){this._error({type:b.jPlayer.error.NO_SOLUTION,context:"{solution:'"+this.options.solution+"', supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SOLUTION,hint:b.jPlayer.errorHint.NO_SOLUTION});this.css.jq.noSolution.length&&this.css.jq.noSolution.show()}else this.css.jq.noSolution.length&&this.css.jq.noSolution.hide();if(this.flash.used){var c,d="jQuery="+encodeURI(this.options.noConflict)+"&id="+encodeURI(this.internal.self.id)+"&vol="+this.options.volume+ -"&muted="+this.options.muted;if(b.jPlayer.browser.msie&&Number(b.jPlayer.browser.version)<=8){d=['','','','',''];c=document.createElement(''); -for(var e=0;e0?100*d/this.status.duration:0;if(typeof a.seekable==="object"&&a.seekable.length>0){g=this.status.duration>0?100*a.seekable.end(a.seekable.length-1)/this.status.duration:100;f=this.status.duration>0?100*a.currentTime/a.seekable.end(a.seekable.length-1):0}else{g= -100;f=e}if(b)e=f=d=0;this.status.seekPercent=g;this.status.currentPercentRelative=f;this.status.currentPercentAbsolute=e;this.status.currentTime=d;this.status.readyState=a.readyState;this.status.networkState=a.networkState;this.status.playbackRate=a.playbackRate;this.status.ended=a.ended},_resetStatus:function(){this.status=b.extend({},this.status,b.jPlayer.prototype.status)},_trigger:function(a,c,d){a=b.Event(a);a.jPlayer={};a.jPlayer.version=b.extend({},this.version);a.jPlayer.options=b.extend(true, -{},this.options);a.jPlayer.status=b.extend(true,{},this.status);a.jPlayer.html=b.extend(true,{},this.html);a.jPlayer.flash=b.extend(true,{},this.flash);if(c)a.jPlayer.error=b.extend({},c);if(d)a.jPlayer.warning=b.extend({},d);this.element.trigger(a)},jPlayerFlashEvent:function(a,c){if(a===b.jPlayer.event.ready)if(this.internal.ready){if(this.flash.gate){if(this.status.srcSet){var d=this.status.currentTime,e=this.status.paused;this.setMedia(this.status.media);d>0&&(e?this.pause(d):this.play(d))}this._trigger(b.jPlayer.event.flashreset)}}else{this.internal.ready= -true;this.internal.flash.jq.css({width:"0px",height:"0px"});this.version.flash=c.version;this.version.needFlash!==this.version.flash&&this._error({type:b.jPlayer.error.VERSION,context:this.version.flash,message:b.jPlayer.errorMsg.VERSION+this.version.flash,hint:b.jPlayer.errorHint.VERSION});this._trigger(b.jPlayer.event.repeat);this._trigger(a)}if(this.flash.gate)switch(a){case b.jPlayer.event.progress:this._getFlashStatus(c);this._updateInterface();this._trigger(a);break;case b.jPlayer.event.timeupdate:this._getFlashStatus(c); -this._updateInterface();this._trigger(a);break;case b.jPlayer.event.play:this._seeked();this._updateButtons(true);this._trigger(a);break;case b.jPlayer.event.pause:this._updateButtons(false);this._trigger(a);break;case b.jPlayer.event.ended:this._updateButtons(false);this._trigger(a);break;case b.jPlayer.event.click:this._trigger(a);break;case b.jPlayer.event.error:this.status.waitForLoad=true;this.status.waitForPlay=true;this.status.video&&this.internal.flash.jq.css({width:"0px",height:"0px"});this._validString(this.status.media.poster)&& -this.internal.poster.jq.show();this.css.jq.videoPlay.length&&this.status.video&&this.css.jq.videoPlay.show();this.status.video?this._flash_setVideo(this.status.media):this._flash_setAudio(this.status.media);this._updateButtons(false);this._error({type:b.jPlayer.error.URL,context:c.src,message:b.jPlayer.errorMsg.URL,hint:b.jPlayer.errorHint.URL});break;case b.jPlayer.event.seeking:this._seeking();this._trigger(a);break;case b.jPlayer.event.seeked:this._seeked();this._trigger(a);break;case b.jPlayer.event.ready:break; -default:this._trigger(a)}return false},_getFlashStatus:function(a){this.status.seekPercent=a.seekPercent;this.status.currentPercentRelative=a.currentPercentRelative;this.status.currentPercentAbsolute=a.currentPercentAbsolute;this.status.currentTime=a.currentTime;this.status.duration=a.duration;this.status.readyState=4;this.status.networkState=0;this.status.playbackRate=1;this.status.ended=false},_updateButtons:function(a){if(a!==f){this.status.paused=!a;if(this.css.jq.play.length&&this.css.jq.pause.length)if(a){this.css.jq.play.hide(); -this.css.jq.pause.show()}else{this.css.jq.play.show();this.css.jq.pause.hide()}}if(this.css.jq.restoreScreen.length&&this.css.jq.fullScreen.length)if(this.status.noFullScreen){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.hide()}else if(this.options.fullScreen){this.css.jq.fullScreen.hide();this.css.jq.restoreScreen.show()}else{this.css.jq.fullScreen.show();this.css.jq.restoreScreen.hide()}if(this.css.jq.repeat.length&&this.css.jq.repeatOff.length)if(this.options.loop){this.css.jq.repeat.hide(); -this.css.jq.repeatOff.show()}else{this.css.jq.repeat.show();this.css.jq.repeatOff.hide()}},_updateInterface:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.width(this.status.seekPercent+"%");this.css.jq.playBar.length&&this.css.jq.playBar.width(this.status.currentPercentRelative+"%");this.css.jq.currentTime.length&&this.css.jq.currentTime.text(b.jPlayer.convertTime(this.status.currentTime));this.css.jq.duration.length&&this.css.jq.duration.text(b.jPlayer.convertTime(this.status.duration))}, -_seeking:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.addClass("jp-seeking-bg")},_seeked:function(){this.css.jq.seekBar.length&&this.css.jq.seekBar.removeClass("jp-seeking-bg")},_resetGate:function(){this.html.audio.gate=false;this.html.video.gate=false;this.flash.gate=false},_resetActive:function(){this.html.active=false;this.flash.active=false},setMedia:function(a){var c=this,d=false,e=this.status.media.poster!==a.poster;this._resetMedia();this._resetGate();this._resetActive();b.each(this.formats, -function(e,f){var i=c.format[f].media==="video";b.each(c.solutions,function(b,e){if(c[e].support[f]&&c._validString(a[f])){var g=e==="html";if(i){if(g){c.html.video.gate=true;c._html_setVideo(a);c.html.active=true}else{c.flash.gate=true;c._flash_setVideo(a);c.flash.active=true}c.css.jq.videoPlay.length&&c.css.jq.videoPlay.show();c.status.video=true}else{if(g){c.html.audio.gate=true;c._html_setAudio(a);c.html.active=true}else{c.flash.gate=true;c._flash_setAudio(a);c.flash.active=true}c.css.jq.videoPlay.length&& -c.css.jq.videoPlay.hide();c.status.video=false}d=true;return false}});if(d)return false});if(d){if((!this.status.nativeVideoControls||!this.html.video.gate)&&this._validString(a.poster))e?this.htmlElement.poster.src=a.poster:this.internal.poster.jq.show();this.status.srcSet=true;this.status.media=b.extend({},a);this._updateButtons(false);this._updateInterface()}else this._error({type:b.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SUPPORT, -hint:b.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus();this._updateButtons(false);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);this.html.active?this._html_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia();this.html.active?this._html_clearMedia():this.flash.active&&this._flash_clearMedia();this._resetGate();this._resetActive()},load:function(){this.status.srcSet? -this.html.active?this._html_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},play:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_play(a):this.flash.active&&this._flash_play(a):this._urlNotSetError("play")},videoPlay:function(){this.play()},pause:function(a){a=typeof a==="number"?a:NaN;this.status.srcSet?this.html.active?this._html_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},pauseOthers:function(){var a= -this;b.each(this.instances,function(b,d){a.element!==d&&d.data("jPlayer").status.srcSet&&d.jPlayer("pause")})},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);this.status.srcSet?this.html.active?this._html_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.options.muted=a;this.html.used&&this._html_mute(a); -this.flash.used&&this._flash_mute(a);if(!this.html.video.gate&&!this.html.audio.gate){this._updateMute(a);this._updateVolume(this.options.volume);this._trigger(b.jPlayer.event.volumechange)}},mute:function(a){a=a===f?true:!!a;this._muted(a)},unmute:function(a){a=a===f?true:!!a;this._muted(!a)},_updateMute:function(a){if(a===f)a=this.options.muted;if(this.css.jq.mute.length&&this.css.jq.unmute.length)if(this.status.noVolume){this.css.jq.mute.hide();this.css.jq.unmute.hide()}else if(a){this.css.jq.mute.hide(); -this.css.jq.unmute.show()}else{this.css.jq.mute.show();this.css.jq.unmute.hide()}},volume:function(a){a=this._limitValue(a,0,1);this.options.volume=a;this.html.used&&this._html_volume(a);this.flash.used&&this._flash_volume(a);if(!this.html.video.gate&&!this.html.audio.gate){this._updateVolume(a);this._trigger(b.jPlayer.event.volumechange)}},volumeBar:function(a){if(this.css.jq.volumeBar.length){var b=this.css.jq.volumeBar.offset(),d=a.pageX-b.left,e=this.css.jq.volumeBar.width(),a=this.css.jq.volumeBar.height()- -a.pageY+b.top,b=this.css.jq.volumeBar.height();this.options.verticalVolume?this.volume(a/b):this.volume(d/e)}this.options.muted&&this._muted(false)},volumeBarValue:function(a){this.volumeBar(a)},_updateVolume:function(a){if(a===f)a=this.options.volume;a=this.options.muted?0:a;if(this.status.noVolume){this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide();this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide();this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()}else{this.css.jq.volumeBar.length&& -this.css.jq.volumeBar.show();if(this.css.jq.volumeBarValue.length){this.css.jq.volumeBarValue.show();this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](a*100+"%")}this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show()}},volumeMax:function(){this.volume(1);this.options.muted&&this._muted(false)},_cssSelectorAncestor:function(a){var c=this;this.options.cssSelectorAncestor=a;this._removeUiClass();this.ancestorJq=a?b(a):[];a&&this.ancestorJq.length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT, -context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();b.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)})},_cssSelector:function(a,c){var d=this;if(typeof c==="string")if(b.jPlayer.prototype.options.cssSelector[a]){this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer");this.options.cssSelector[a]=c;this.css.cs[a]=this.options.cssSelectorAncestor+ -" "+c;this.css.jq[a]=c?b(this.css.cs[a]):[];this.css.jq[a].length&&this.css.jq[a].bind("click.jPlayer",function(c){d[a](c);b(this).blur();return false});c&&this.css.jq[a].length!==1&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:this.css.cs[a],message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT})}else this._warning({type:b.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_METHOD, -hint:b.jPlayer.warningHint.CSS_SELECTOR_METHOD});else this._warning({type:b.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:b.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:b.jPlayer.warningHint.CSS_SELECTOR_STRING})},seekBar:function(a){if(this.css.jq.seekBar){var b=this.css.jq.seekBar.offset(),a=a.pageX-b.left,b=this.css.jq.seekBar.width();this.playHead(100*a/b)}},playBar:function(a){this.seekBar(a)},repeat:function(){this._loop(true)},repeatOff:function(){this._loop(false)},_loop:function(a){if(this.options.loop!== -a){this.options.loop=a;this._updateButtons();this._trigger(b.jPlayer.event.repeat)}},currentTime:function(){},duration:function(){},gui:function(){},noSolution:function(){},option:function(a,c){var d=a;if(arguments.length===0)return b.extend(true,{},this.options);if(typeof a==="string"){var e=a.split(".");if(c===f){for(var d=b.extend(true,{},this.options),g=0;g0?this._html_load():clearTimeout(this.internal.htmlDlyCmdId);this.htmlElement.media.pause();if(!isNaN(a))try{this.htmlElement.media.currentTime= -a}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.pause(a)},100);return}a>0&&this._html_checkWaitForPlay()},_html_playHead:function(a){var b=this;this._html_load();try{if(typeof this.htmlElement.media.seekable==="object"&&this.htmlElement.media.seekable.length>0)this.htmlElement.media.currentTime=a*this.htmlElement.media.seekable.end(this.htmlElement.media.seekable.length-1)/100;else if(this.htmlElement.media.duration>0&&!isNaN(this.htmlElement.media.duration))this.htmlElement.media.currentTime= -a*this.htmlElement.media.duration/100;else throw"e";}catch(d){this.internal.htmlDlyCmdId=setTimeout(function(){b.playHead(a)},100);return}this.status.waitForLoad||this._html_checkWaitForPlay()},_html_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide();this.internal.video.jq.css({width:this.status.width,height:this.status.height})}}},_html_volume:function(a){if(this.html.audio.available)this.htmlElement.audio.volume= -a;if(this.html.video.available)this.htmlElement.video.volume=a},_html_mute:function(a){if(this.html.audio.available)this.htmlElement.audio.muted=a;if(this.html.video.available)this.htmlElement.video.muted=a},_flash_setAudio:function(a){var c=this;try{b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4a":case "fla":c._getMovie().fl_setAudio_m4a(a[d]);break;case "mp3":c._getMovie().fl_setAudio_mp3(a[d]);break;case "rtmpa":c._getMovie().fl_setAudio_rtmp(a[d])}c.status.src= -a[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload==="auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_setVideo:function(a){var c=this;try{b.each(this.formats,function(b,d){if(c.flash.support[d]&&a[d]){switch(d){case "m4v":case "flv":c._getMovie().fl_setVideo_m4v(a[d]);break;case "rtmpv":c._getMovie().fl_setVideo_rtmp(a[d])}c.status.src=a[d];c.status.format[d]=true;c.status.formatType=d;return false}});if(this.options.preload=== -"auto"){this._flash_load();this.status.waitForLoad=false}}catch(d){this._flashError(d)}},_flash_resetMedia:function(){this.internal.flash.jq.css({width:"0px",height:"0px"});this._flash_pause(NaN)},_flash_clearMedia:function(){try{this._getMovie().fl_clearMedia()}catch(a){this._flashError(a)}},_flash_load:function(){try{this._getMovie().fl_load()}catch(a){this._flashError(a)}this.status.waitForLoad=false},_flash_play:function(a){try{this._getMovie().fl_play(a)}catch(b){this._flashError(b)}this.status.waitForLoad= -false;this._flash_checkWaitForPlay()},_flash_pause:function(a){try{this._getMovie().fl_pause(a)}catch(b){this._flashError(b)}if(a>0){this.status.waitForLoad=false;this._flash_checkWaitForPlay()}},_flash_playHead:function(a){try{this._getMovie().fl_play_head(a)}catch(b){this._flashError(b)}this.status.waitForLoad||this._flash_checkWaitForPlay()},_flash_checkWaitForPlay:function(){if(this.status.waitForPlay){this.status.waitForPlay=false;this.css.jq.videoPlay.length&&this.css.jq.videoPlay.hide();if(this.status.video){this.internal.poster.jq.hide(); -this.internal.flash.jq.css({width:this.status.width,height:this.status.height})}}},_flash_volume:function(a){try{this._getMovie().fl_volume(a)}catch(b){this._flashError(b)}},_flash_mute:function(a){try{this._getMovie().fl_mute(a)}catch(b){this._flashError(b)}},_getMovie:function(){return document[this.internal.flash.id]},_checkForFlash:function(a){var b=false,d;if(window.ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+a);b=true}catch(e){}else if(navigator.plugins&&navigator.mimeTypes.length> -0)(d=navigator.plugins["Shockwave Flash"])&&navigator.plugins["Shockwave Flash"].description.replace(/.*\s(\d+\.\d+).*/,"$1")>=a&&(b=true);return b},_validString:function(a){return a&&typeof a==="string"},_limitValue:function(a,b,d){return ad?d:a},_urlNotSetError:function(a){this._error({type:b.jPlayer.error.URL_NOT_SET,context:a,message:b.jPlayer.errorMsg.URL_NOT_SET,hint:b.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH";this._error({type:b.jPlayer.error[c], -context:this.internal.flash.swf,message:b.jPlayer.errorMsg[c]+a.message,hint:b.jPlayer.errorHint[c]});this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(b.jPlayer.event.error,a);this.options.errorAlerts&&this._alert("Error!"+(a.message?"\n\n"+a.message:"")+(a.hint?"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_warning:function(a){this._trigger(b.jPlayer.event.warning,f,a);this.options.warningAlerts&&this._alert("Warning!"+(a.message?"\n\n"+a.message:"")+(a.hint? -"\n\n"+a.hint:"")+"\n\nContext: "+a.context)},_alert:function(a){alert("jPlayer "+this.version.script+" : id='"+this.internal.self.id+"' : "+a)},_emulateHtmlBridge:function(){var a=this;b.each(b.jPlayer.emulateMethods.split(/\s+/g),function(b,d){a.internal.domNode[d]=function(b){a[d](b)}});b.each(b.jPlayer.event,function(c,d){var e=true;b.each(b.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c)return e=false});e&&a.element.bind(d+".jPlayer.jPlayerHtml",function(){a._emulateHtmlUpdate(); -var b=document.createEvent("Event");b.initEvent(c,false,true);a.internal.domNode.dispatchEvent(b)})})},_emulateHtmlUpdate:function(){var a=this;b.each(b.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});b.each(b.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");b.each((b.jPlayer.emulateMethods+" "+b.jPlayer.emulateStatus+" "+b.jPlayer.emulateOptions).split(/\s+/g), -function(b,d){delete a.internal.domNode[d]})}};b.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled",NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};b.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.", -NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.",URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+b.jPlayer.prototype.version.script+" needs Jplayer.swf version "+b.jPlayer.prototype.version.needFlash+" but found "};b.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.", -NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.",URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};b.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};b.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ", -CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.",OPTION_KEY:"The option requested in jPlayer('option') is undefined."};b.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}})(jQuery); \ No newline at end of file +(function(b,f){"function"===typeof define&&define.amd?define(["jquery"],f):b.jQuery?f(b.jQuery):f(b.Zepto)})(this,function(b,f){b.fn.jPlayer=function(a){var c="string"===typeof a,d=Array.prototype.slice.call(arguments,1),e=this;a=!c&&d.length?b.extend.apply(null,[!0,a].concat(d)):a;if(c&&"_"===a.charAt(0))return e;c?this.each(function(){var c=b(this).data("jPlayer"),h=c&&b.isFunction(c[a])?c[a].apply(c,d):c;if(h!==c&&h!==f)return e=h,!1}):this.each(function(){var c=b(this).data("jPlayer");c?c.option(a|| +{}):b(this).data("jPlayer",new b.jPlayer(a,this))});return e};b.jPlayer=function(a,c){if(arguments.length){this.element=b(c);this.options=b.extend(!0,{},this.options,a);var d=this;this.element.bind("remove.jPlayer",function(){d.destroy()});this._init()}};"function"!==typeof b.fn.stop&&(b.fn.stop=function(){});b.jPlayer.emulateMethods="load play pause";b.jPlayer.emulateStatus="src readyState networkState currentTime duration paused ended playbackRate";b.jPlayer.emulateOptions="muted volume";b.jPlayer.reservedEvent= +"ready flashreset resize repeat error warning";b.jPlayer.event={};b.each("ready flashreset resize repeat click error warning loadstart progress suspend abort emptied stalled play pause loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange".split(" "),function(){b.jPlayer.event[this]="jPlayer_"+this});b.jPlayer.htmlEvent="loadstart abort emptied stalled loadedmetadata loadeddata canplay canplaythrough".split(" ");b.jPlayer.pause= +function(){b.each(b.jPlayer.prototype.instances,function(a,c){c.data("jPlayer").status.srcSet&&c.jPlayer("pause")})};b.jPlayer.timeFormat={showHour:!1,showMin:!0,showSec:!0,padHour:!1,padMin:!0,padSec:!0,sepHour:":",sepMin:":",sepSec:""};var m=function(){this.init()};m.prototype={init:function(){this.options={timeFormat:b.jPlayer.timeFormat}},time:function(a){var c=new Date(1E3*(a&&"number"===typeof a?a:0)),b=c.getUTCHours();a=this.options.timeFormat.showHour?c.getUTCMinutes():c.getUTCMinutes()+60* +b;c=this.options.timeFormat.showMin?c.getUTCSeconds():c.getUTCSeconds()+60*a;b=this.options.timeFormat.padHour&&10>b?"0"+b:b;a=this.options.timeFormat.padMin&&10>a?"0"+a:a;c=this.options.timeFormat.padSec&&10>c?"0"+c:c;b=""+(this.options.timeFormat.showHour?b+this.options.timeFormat.sepHour:"");b+=this.options.timeFormat.showMin?a+this.options.timeFormat.sepMin:"";return b+=this.options.timeFormat.showSec?c+this.options.timeFormat.sepSec:""}};var n=new m;b.jPlayer.convertTime=function(a){return n.time(a)}; +b.jPlayer.uaBrowser=function(a){a=a.toLowerCase();var c=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,e=/(mozilla)(?:.*? rv:([\w.]+))?/;a=/(webkit)[ \/]([\w.]+)/.exec(a)||c.exec(a)||b.exec(a)||0>a.indexOf("compatible")&&e.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}};b.jPlayer.uaPlatform=function(a){var c=a.toLowerCase(),b=/(android)/,e=/(mobile)/;a=/(ipad|iphone|ipod|android|blackberry|playbook|windows ce|webos)/.exec(c)||[];c=/(ipad|playbook)/.exec(c)||!e.exec(c)&&b.exec(c)|| +[];a[1]&&(a[1]=a[1].replace(/\s/g,"_"));return{platform:a[1]||"",tablet:c[1]||""}};b.jPlayer.browser={};b.jPlayer.platform={};var k=b.jPlayer.uaBrowser(navigator.userAgent);k.browser&&(b.jPlayer.browser[k.browser]=!0,b.jPlayer.browser.version=k.version);k=b.jPlayer.uaPlatform(navigator.userAgent);k.platform&&(b.jPlayer.platform[k.platform]=!0,b.jPlayer.platform.mobile=!k.tablet,b.jPlayer.platform.tablet=!!k.tablet);b.jPlayer.getDocMode=function(){var a;b.jPlayer.browser.msie&&(document.documentMode? +a=document.documentMode:(a=5,document.compatMode&&"CSS1Compat"===document.compatMode&&(a=7)));return a};b.jPlayer.browser.documentMode=b.jPlayer.getDocMode();b.jPlayer.nativeFeatures={init:function(){var a=document,c=a.createElement("video"),b={w3c:"fullscreenEnabled fullscreenElement requestFullscreen exitFullscreen fullscreenchange fullscreenerror".split(" "),moz:"mozFullScreenEnabled mozFullScreenElement mozRequestFullScreen mozCancelFullScreen mozfullscreenchange mozfullscreenerror".split(" "), +webkit:" webkitCurrentFullScreenElement webkitRequestFullScreen webkitCancelFullScreen webkitfullscreenchange ".split(" "),webkitVideo:"webkitSupportsFullscreen webkitDisplayingFullscreen webkitEnterFullscreen webkitExitFullscreen ".split(" ")},e=["w3c","moz","webkit","webkitVideo"],g,h;this.fullscreen=c={support:{w3c:!!a[b.w3c[0]],moz:!!a[b.moz[0]],webkit:"function"===typeof a[b.webkit[3]],webkitVideo:"function"===typeof c[b.webkitVideo[2]]},used:{}};g=0;for(h=e.length;g','','','',''];c=document.createElement(''); +for(var e=0;e").join(">").split('"').join(""")},_qualifyURL:function(a){var c=document.createElement("div");c.innerHTML='x';return c.firstChild.href},_absoluteMediaUrls:function(a){var c=this;b.each(a,function(b,e){c.format[b]&& +(a[b]=c._qualifyURL(e))});return a},setMedia:function(a){var c=this,d=!1,e=this.status.media.poster!==a.poster;this._resetMedia();this._resetGate();this._resetActive();a=this._absoluteMediaUrls(a);b.each(this.formats,function(e,f){var k="video"===c.format[f].media;b.each(c.solutions,function(b,e){if(c[e].support[f]&&c._validString(a[f])){var g="html"===e;k?(g?(c.html.video.gate=!0,c._html_setVideo(a),c.html.active=!0):(c.flash.gate=!0,c._flash_setVideo(a),c.flash.active=!0),c.css.jq.videoPlay.length&& +c.css.jq.videoPlay.show(),c.status.video=!0):(g?(c.html.audio.gate=!0,c._html_setAudio(a),c.html.active=!0):(c.flash.gate=!0,c._flash_setAudio(a),c.flash.active=!0),c.css.jq.videoPlay.length&&c.css.jq.videoPlay.hide(),c.status.video=!1);d=!0;return!1}});if(d)return!1});d?(this.status.nativeVideoControls&&this.html.video.gate||!this._validString(a.poster)||(e?this.htmlElement.poster.src=a.poster:this.internal.poster.jq.show()),this.status.srcSet=!0,this.status.media=b.extend({},a),this._updateButtons(!1), +this._updateInterface()):this._error({type:b.jPlayer.error.NO_SUPPORT,context:"{supplied:'"+this.options.supplied+"'}",message:b.jPlayer.errorMsg.NO_SUPPORT,hint:b.jPlayer.errorHint.NO_SUPPORT})},_resetMedia:function(){this._resetStatus();this._updateButtons(!1);this._updateInterface();this._seeked();this.internal.poster.jq.hide();clearTimeout(this.internal.htmlDlyCmdId);this.html.active?this._html_resetMedia():this.flash.active&&this._flash_resetMedia()},clearMedia:function(){this._resetMedia(); +this.html.active?this._html_clearMedia():this.flash.active&&this._flash_clearMedia();this._resetGate();this._resetActive()},load:function(){this.status.srcSet?this.html.active?this._html_load():this.flash.active&&this._flash_load():this._urlNotSetError("load")},focus:function(){this.options.keyEnabled&&(b.jPlayer.focus=this)},play:function(a){a="number"===typeof a?a:NaN;this.status.srcSet?(this.focus(),this.html.active?this._html_play(a):this.flash.active&&this._flash_play(a)):this._urlNotSetError("play")}, +videoPlay:function(){this.play()},pause:function(a){a="number"===typeof a?a:NaN;this.status.srcSet?this.html.active?this._html_pause(a):this.flash.active&&this._flash_pause(a):this._urlNotSetError("pause")},tellOthers:function(a,c){var d=this,e="function"===typeof c,g=Array.prototype.slice.call(arguments);"string"===typeof a&&(e&&g.splice(1,1),b.each(this.instances,function(){d.element!==this&&(e&&!c.call(this.data("jPlayer"),d)||this.jPlayer.apply(this,g))}))},pauseOthers:function(a){this.tellOthers("pause", +function(){return this.status.srcSet},a)},stop:function(){this.status.srcSet?this.html.active?this._html_pause(0):this.flash.active&&this._flash_pause(0):this._urlNotSetError("stop")},playHead:function(a){a=this._limitValue(a,0,100);this.status.srcSet?this.html.active?this._html_playHead(a):this.flash.active&&this._flash_playHead(a):this._urlNotSetError("playHead")},_muted:function(a){this.mutedWorker(a);this.options.globalVolume&&this.tellOthers("mutedWorker",function(){return this.options.globalVolume}, +a)},mutedWorker:function(a){this.options.muted=a;this.html.used&&this._html_setProperty("muted",a);this.flash.used&&this._flash_mute(a);this.html.video.gate||this.html.audio.gate||(this._updateMute(a),this._updateVolume(this.options.volume),this._trigger(b.jPlayer.event.volumechange))},mute:function(a){a=a===f?!0:!!a;this._muted(a)},unmute:function(a){a=a===f?!0:!!a;this._muted(!a)},_updateMute:function(a){a===f&&(a=this.options.muted);this.css.jq.mute.length&&this.css.jq.unmute.length&&(this.status.noVolume? +(this.css.jq.mute.hide(),this.css.jq.unmute.hide()):a?(this.css.jq.mute.hide(),this.css.jq.unmute.show()):(this.css.jq.mute.show(),this.css.jq.unmute.hide()))},volume:function(a){this.volumeWorker(a);this.options.globalVolume&&this.tellOthers("volumeWorker",function(){return this.options.globalVolume},a)},volumeWorker:function(a){a=this._limitValue(a,0,1);this.options.volume=a;this.html.used&&this._html_setProperty("volume",a);this.flash.used&&this._flash_volume(a);this.html.video.gate||this.html.audio.gate|| +(this._updateVolume(a),this._trigger(b.jPlayer.event.volumechange))},volumeBar:function(a){if(this.css.jq.volumeBar.length){var c=b(a.currentTarget),d=c.offset(),e=a.pageX-d.left,g=c.width();a=c.height()-a.pageY+d.top;c=c.height();this.options.verticalVolume?this.volume(a/c):this.volume(e/g)}this.options.muted&&this._muted(!1)},volumeBarValue:function(){},_updateVolume:function(a){a===f&&(a=this.options.volume);a=this.options.muted?0:a;this.status.noVolume?(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.hide(), +this.css.jq.volumeBarValue.length&&this.css.jq.volumeBarValue.hide(),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.hide()):(this.css.jq.volumeBar.length&&this.css.jq.volumeBar.show(),this.css.jq.volumeBarValue.length&&(this.css.jq.volumeBarValue.show(),this.css.jq.volumeBarValue[this.options.verticalVolume?"height":"width"](100*a+"%")),this.css.jq.volumeMax.length&&this.css.jq.volumeMax.show())},volumeMax:function(){this.volume(1);this.options.muted&&this._muted(!1)},_cssSelectorAncestor:function(a){var c= +this;this.options.cssSelectorAncestor=a;this._removeUiClass();this.ancestorJq=a?b(a):[];a&&1!==this.ancestorJq.length&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.ancestorJq.length+" found for cssSelectorAncestor.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT});this._addUiClass();b.each(this.options.cssSelector,function(a,b){c._cssSelector(a,b)});this._updateInterface();this._updateButtons();this._updateAutohide();this._updateVolume(); +this._updateMute()},_cssSelector:function(a,c){var d=this;"string"===typeof c?b.jPlayer.prototype.options.cssSelector[a]?(this.css.jq[a]&&this.css.jq[a].length&&this.css.jq[a].unbind(".jPlayer"),this.options.cssSelector[a]=c,this.css.cs[a]=this.options.cssSelectorAncestor+" "+c,this.css.jq[a]=c?b(this.css.cs[a]):[],this.css.jq[a].length&&this.css.jq[a].bind("click.jPlayer",function(c){c.preventDefault();d[a](c);b(this).blur()}),c&&1!==this.css.jq[a].length&&this._warning({type:b.jPlayer.warning.CSS_SELECTOR_COUNT, +context:this.css.cs[a],message:b.jPlayer.warningMsg.CSS_SELECTOR_COUNT+this.css.jq[a].length+" found for "+a+" method.",hint:b.jPlayer.warningHint.CSS_SELECTOR_COUNT})):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_METHOD,context:a,message:b.jPlayer.warningMsg.CSS_SELECTOR_METHOD,hint:b.jPlayer.warningHint.CSS_SELECTOR_METHOD}):this._warning({type:b.jPlayer.warning.CSS_SELECTOR_STRING,context:c,message:b.jPlayer.warningMsg.CSS_SELECTOR_STRING,hint:b.jPlayer.warningHint.CSS_SELECTOR_STRING})}, +seekBar:function(a){if(this.css.jq.seekBar.length){var c=b(a.currentTarget),d=c.offset();a=a.pageX-d.left;c=c.width();this.playHead(100*a/c)}},playBar:function(){},playbackRate:function(a){this._setOption("playbackRate",a)},playbackRateBar:function(a){if(this.css.jq.playbackRateBar.length){var c=b(a.currentTarget),d=c.offset(),e=a.pageX-d.left,g=c.width();a=c.height()-a.pageY+d.top;c=c.height();this.playbackRate((this.options.verticalPlaybackRate?a/c:e/g)*(this.options.maxPlaybackRate-this.options.minPlaybackRate)+ +this.options.minPlaybackRate)}},playbackRateBarValue:function(){},_updatePlaybackRate:function(){var a=(this.options.playbackRate-this.options.minPlaybackRate)/(this.options.maxPlaybackRate-this.options.minPlaybackRate);this.status.playbackRateEnabled?(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.show(),this.css.jq.playbackRateBarValue.length&&(this.css.jq.playbackRateBarValue.show(),this.css.jq.playbackRateBarValue[this.options.verticalPlaybackRate?"height":"width"](100*a+"%"))): +(this.css.jq.playbackRateBar.length&&this.css.jq.playbackRateBar.hide(),this.css.jq.playbackRateBarValue.length&&this.css.jq.playbackRateBarValue.hide())},repeat:function(){this._loop(!0)},repeatOff:function(){this._loop(!1)},_loop:function(a){this.options.loop!==a&&(this.options.loop=a,this._updateButtons(),this._trigger(b.jPlayer.event.repeat))},currentTime:function(){},duration:function(){},gui:function(){},noSolution:function(){},option:function(a,c){var d=a;if(0===arguments.length)return b.extend(!0, +{},this.options);if("string"===typeof a){var e=a.split(".");if(c===f){for(var d=b.extend(!0,{},this.options),g=0;g= +a&&(b=!0);return b},_validString:function(a){return a&&"string"===typeof a},_limitValue:function(a,b,d){return ad?d:a},_urlNotSetError:function(a){this._error({type:b.jPlayer.error.URL_NOT_SET,context:a,message:b.jPlayer.errorMsg.URL_NOT_SET,hint:b.jPlayer.errorHint.URL_NOT_SET})},_flashError:function(a){var c;c=this.internal.ready?"FLASH_DISABLED":"FLASH";this._error({type:b.jPlayer.error[c],context:this.internal.flash.swf,message:b.jPlayer.errorMsg[c]+a.message,hint:b.jPlayer.errorHint[c]}); +this.internal.flash.jq.css({width:"1px",height:"1px"})},_error:function(a){this._trigger(b.jPlayer.event.error,a);this.options.errorAlerts&&this._alert("Error!"+(a.message?"\n"+a.message:"")+(a.hint?"\n"+a.hint:"")+"\nContext: "+a.context)},_warning:function(a){this._trigger(b.jPlayer.event.warning,f,a);this.options.warningAlerts&&this._alert("Warning!"+(a.message?"\n"+a.message:"")+(a.hint?"\n"+a.hint:"")+"\nContext: "+a.context)},_alert:function(a){a="jPlayer "+this.version.script+" : id='"+this.internal.self.id+ +"' : "+a;this.options.consoleAlerts?console&&console.log&&console.log(a):alert(a)},_emulateHtmlBridge:function(){var a=this;b.each(b.jPlayer.emulateMethods.split(/\s+/g),function(b,d){a.internal.domNode[d]=function(b){a[d](b)}});b.each(b.jPlayer.event,function(c,d){var e=!0;b.each(b.jPlayer.reservedEvent.split(/\s+/g),function(a,b){if(b===c)return e=!1});e&&a.element.bind(d+".jPlayer.jPlayerHtml",function(){a._emulateHtmlUpdate();var b=document.createEvent("Event");b.initEvent(c,!1,!0);a.internal.domNode.dispatchEvent(b)})})}, +_emulateHtmlUpdate:function(){var a=this;b.each(b.jPlayer.emulateStatus.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.status[d]});b.each(b.jPlayer.emulateOptions.split(/\s+/g),function(b,d){a.internal.domNode[d]=a.options[d]})},_destroyHtmlBridge:function(){var a=this;this.element.unbind(".jPlayerHtml");b.each((b.jPlayer.emulateMethods+" "+b.jPlayer.emulateStatus+" "+b.jPlayer.emulateOptions).split(/\s+/g),function(b,d){delete a.internal.domNode[d]})}};b.jPlayer.error={FLASH:"e_flash",FLASH_DISABLED:"e_flash_disabled", +NO_SOLUTION:"e_no_solution",NO_SUPPORT:"e_no_support",URL:"e_url",URL_NOT_SET:"e_url_not_set",VERSION:"e_version"};b.jPlayer.errorMsg={FLASH:"jPlayer's Flash fallback is not configured correctly, or a command was issued before the jPlayer Ready event. Details: ",FLASH_DISABLED:"jPlayer's Flash fallback has been disabled by the browser due to the CSS rules you have used. Details: ",NO_SOLUTION:"No solution can be found by jPlayer in this browser. Neither HTML nor Flash can be used.",NO_SUPPORT:"It is not possible to play any media format provided in setMedia() on this browser using your current options.", +URL:"Media URL could not be loaded.",URL_NOT_SET:"Attempt to issue media playback commands, while no media url is set.",VERSION:"jPlayer "+b.jPlayer.prototype.version.script+" needs Jplayer.swf version "+b.jPlayer.prototype.version.needFlash+" but found "};b.jPlayer.errorHint={FLASH:"Check your swfPath option and that Jplayer.swf is there.",FLASH_DISABLED:"Check that you have not display:none; the jPlayer entity or any ancestor.",NO_SOLUTION:"Review the jPlayer options: support and supplied.",NO_SUPPORT:"Video or audio formats defined in the supplied option are missing.", +URL:"Check media URL is valid.",URL_NOT_SET:"Use setMedia() to set the media URL.",VERSION:"Update jPlayer files."};b.jPlayer.warning={CSS_SELECTOR_COUNT:"e_css_selector_count",CSS_SELECTOR_METHOD:"e_css_selector_method",CSS_SELECTOR_STRING:"e_css_selector_string",OPTION_KEY:"e_option_key"};b.jPlayer.warningMsg={CSS_SELECTOR_COUNT:"The number of css selectors found did not equal one: ",CSS_SELECTOR_METHOD:"The methodName given in jPlayer('cssSelector') is not a valid jPlayer method.",CSS_SELECTOR_STRING:"The methodCssSelector given in jPlayer('cssSelector') is not a String or is empty.", +OPTION_KEY:"The option requested in jPlayer('option') is undefined."};b.jPlayer.warningHint={CSS_SELECTOR_COUNT:"Check your css selector and the ancestor.",CSS_SELECTOR_METHOD:"Check your method name.",CSS_SELECTOR_STRING:"Check your css selector is a string.",OPTION_KEY:"Check your option name."}}); \ No newline at end of file diff --git a/manifest.json b/manifest.json index fe918c1..2f542fe 100644 --- a/manifest.json +++ b/manifest.json @@ -1,11 +1,11 @@ { "manifest_version": 2, - "name": "Jamstash (Beta)", + "name": "Jamstash", "description": "HTML5 Player for Subsonic & Archive.org", - "version": "3.0.8", + "version": "3.1.2", "app": { "launch": { - "web_url": "http://jamstash.com/beta" + "web_url": "http://jamstash.com" } }, "icons": { diff --git a/style/Style.css b/style/Style.css index ff3ce10..6c92fdf 100755 --- a/style/Style.css +++ b/style/Style.css @@ -470,16 +470,10 @@ ul.mainlist li.item a.add:hover { background: url('../images/plus_8x8.png') no-repeat 6px center #DEECFB; } -#BreadCrumbContainer -{ - margin: 5px 5px 0 0; - font-size: 12px; - height: 22px; -} #BreadCrumb { - float: left; - margin: 0; + float: right; + margin: 5px 0 0 0; padding: 2px 8px; color: #AEAEA7; background: #f6f6f6; @@ -692,6 +686,11 @@ ul.songlist .row a:hover { text-decoration: underline; } +ul.songlist .row span.albumblock +{ + color: #7EA8D5; + font-size: 12px; +} ul.songlist .row .album img { border: 1px solid #DEDEDE; @@ -892,6 +891,15 @@ ul.songlist li:hover padding: 6px 16px; display: block; } +#submenu_AddToPlaylist { + width: 100px; +} +#submenu_AddToPlaylist a { + float: left; + padding: 4px; + display: block; + clear: both; +} .actions { height: 30px; @@ -1083,6 +1091,7 @@ ul.songlist li:hover background: #5b5b4e; } #QueuePreview li { + height: 120px; } #QueuePreview .queueactions { padding: 0 5px;