diff --git a/dashboard-ui/css/detailtable.css b/dashboard-ui/css/detailtable.css
index 930fd572d7..5e7a308e79 100644
--- a/dashboard-ui/css/detailtable.css
+++ b/dashboard-ui/css/detailtable.css
@@ -49,7 +49,8 @@
}
.userDataCell {
- width: 140px;
+ width: 130px;
+ text-align: right;
}
.tabletColumn {
diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css
index 46d6c09676..fc60398cd0 100644
--- a/dashboard-ui/css/librarybrowser.css
+++ b/dashboard-ui/css/librarybrowser.css
@@ -120,6 +120,10 @@
}
}
+.playFlyout a {
+ font-size: 14px;
+}
+
.detailPageName {
margin: 0 0 .1em;
}
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index e19855afad..f499cd8b5f 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -237,7 +237,7 @@
html += '
';
- html += ' | ';
+ html += ' | ';
var num = item.IndexNumber;
@@ -297,7 +297,7 @@
var html = '';
- html += '
';
+ html += '';
html += '- Play Menu
';
html += '- Play
';
@@ -321,7 +321,7 @@
$(this).off("popupafterclose").remove();
- }).parents(".ui-popup-container").css("margin-left", 110).css("margin-top", 50);
+ }).parents(".ui-popup-container").css("margin-left", 100).css("margin-top", 35);
},
closePlayMenu: function () {
diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js
index c856e02bff..7254861b3d 100644
--- a/dashboard-ui/scripts/mediaplayer.js
+++ b/dashboard-ui/scripts/mediaplayer.js
@@ -8,6 +8,15 @@
var currentMediaElement;
var currentProgressInterval;
+ function endsWith(text, pattern) {
+
+ text = text.toLowerCase();
+ pattern = pattern.toLowerCase();
+
+ var d = text.length - pattern.length;
+ return d >= 0 && text.lastIndexOf(pattern) === d;
+ }
+
function playAudio(item, params) {
var volume = localStorage.getItem("volume") || 0.5;
@@ -31,6 +40,26 @@
audioCodec: 'Vorbis'
}));
+ var mediaStreams = item.MediaStreams || [];
+
+ for (var i = 0, length = mediaStreams.length; i < length; i++) {
+
+ var stream = mediaStreams[i];
+
+ if (stream.Type == "Audio") {
+
+ // Stream statically when possible
+ if (endsWith(item.Path, ".aac") && stream.BitRate <= 256000) {
+ aacUrl += "&static=true";
+ }
+ else if (endsWith(item.Path, ".mp3") && stream.BitRate <= 256000) {
+ mp3Url += "&static=true";
+ }
+ break;
+ }
+
+ }
+
/* ffmpeg always says the ogg stream is corrupt after conversion
var oggUrl = ApiClient.getUrl('Audio/' + item.Id + '/stream.oga', $.extend({}, baseParams, {
audioCodec: 'Vorbis'
@@ -369,7 +398,7 @@
return mediaType == "Audio";
};
- self.playLast = function(itemId) {
+ self.playLast = function (itemId) {
};