diff --git a/dashboard-ui/mypreferenceswebclient.html b/dashboard-ui/mypreferenceswebclient.html
index b7a1c73edb..34bc5884b2 100644
--- a/dashboard-ui/mypreferenceswebclient.html
+++ b/dashboard-ui/mypreferenceswebclient.html
@@ -135,8 +135,8 @@
diff --git a/dashboard-ui/scripts/externalplayer.js b/dashboard-ui/scripts/externalplayer.js
index 10b7625277..f3f11b9b48 100644
--- a/dashboard-ui/scripts/externalplayer.js
+++ b/dashboard-ui/scripts/externalplayer.js
@@ -10,15 +10,25 @@
}
- function getCodecLimits() {
+ function getCodecLimits(maxBitrate) {
+
+ var maxWidth;
+
+ if (maxBitrate <= 1000000) {
+ maxWidth = 720;
+ }
+ else if (maxBitrate <= 5000000) {
+ maxWidth = 1280;
+ } else {
+ maxWidth = 1280;
+ }
return {
maxVideoAudioChannels: 6,
maxAudioChannels: 2,
maxVideoLevel: 50,
- maxWidth: 1920,
- maxHeight: 1080,
+ maxWidth: maxWidth,
maxSampleRate: 48000
};
@@ -31,7 +41,7 @@
return false;
}
- var codecLimits = getCodecLimits();
+ var codecLimits = getCodecLimits(maxBitrate);
if (mediaType == "Audio") {
@@ -49,6 +59,10 @@
return false;
}
+ if (videoStream.Width && videoStream.Width > codecLimits.maxWidth) {
+ return false;
+ }
+
if (mediaSource.VideoType != 'VideoFile') {
return false;
}
@@ -59,7 +73,7 @@
throw new Error('Unrecognized MediaType');
}
- function canPlayAudioStreamDirect(audioStream, isVideo) {
+ function canPlayAudioStreamDirect(audioStream, isVideo, maxBitrate) {
var audioCodec = (audioStream.Codec || '').toLowerCase().replace('-', '');
@@ -70,7 +84,7 @@
return false;
}
- var codecLimits = getCodecLimits();
+ var codecLimits = getCodecLimits(maxBitrate);
var maxChannels = isVideo ? codecLimits.maxVideoAudioChannels : codecLimits.maxAudioChannels;
@@ -159,7 +173,7 @@
var audioStream = m.audioStream;
- if (!audioStream || !canPlayAudioStreamDirect(audioStream, item.MediaType == 'Video')) {
+ if (!audioStream || !canPlayAudioStreamDirect(audioStream, item.MediaType == 'Video', maxBitrate)) {
return false;
}
@@ -217,7 +231,7 @@
var url;
- var codecLimits = getCodecLimits();
+ var codecLimits = getCodecLimits(maxBitrate);
if (mediaType == 'Audio') {
@@ -268,7 +282,6 @@
url += '&level=41';
url += '&maxwidth=' + codecLimits.maxWidth;
- url += '&maxheight=' + codecLimits.maxHeight;
url += '&videoCodec=h264';
url += '&audioCodec=aac';
diff --git a/dashboard-ui/scripts/useredit.js b/dashboard-ui/scripts/useredit.js
index 5bbb7169ec..e376d12f74 100644
--- a/dashboard-ui/scripts/useredit.js
+++ b/dashboard-ui/scripts/useredit.js
@@ -21,7 +21,7 @@
}
if (user.Id && loggedInUser.Configuration.IsAdministrator) {
- $('#fldConnectInfo', page).show();
+ $('#fldConnectInfo', page).hide();
} else {
$('#fldConnectInfo', page).hide();
}