Skip to content

Commit

Permalink
fix quality options
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Feb 1, 2016
1 parent 66325bb commit 2dbb591
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@
self.onQualityOptionSelected = function (bitrate) {

AppSettings.maxStreamingBitrate(bitrate);
AppSettings.enableAutomaticBitrateDetection(false);

self.changeStream(self.getCurrentTicks(), {
Bitrate: bitrate
Expand Down
13 changes: 12 additions & 1 deletion MediaBrowser.WebDashboard/dashboard-ui/scripts/mediaplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,25 @@

return new Promise(function (resolve, reject) {

require(['browserdeviceprofile'], function (profile) {
require(['browserdeviceprofile', 'qualityoptions'], function (profile, qualityoptions) {

var bitrateSetting = AppSettings.maxStreamingBitrate();

if (!maxHeight) {
maxHeight = qualityoptions.getVideoQualityOptions(bitrateSetting).filter(function (q) {
return q.selected;
})[0].maxHeight;
}

if (AppInfo.isNativeApp && browserInfo.android) {
updateDeviceProfileForAndroid(profile);
}
else if (AppInfo.isNativeApp && browserInfo.safari) {
updateDeviceProfileForIOS(profile);
}

profile.MaxStreamingBitrate = bitrateSetting;

resolve(profile);
});
});
Expand Down

0 comments on commit 2dbb591

Please sign in to comment.