support choosing optimal video version

This commit is contained in:
Luke Pulverenti 2014-03-21 00:52:46 -04:00
parent 02a810cf1e
commit 0f37c36d24
3 changed files with 33 additions and 10 deletions

View file

@ -587,14 +587,14 @@
// Just use the first audio stream
return audioStreams.length ? audioStreams[0].Index : null;
};
function getVideoQualityOptions(mediaStreams) {
var videoStream = mediaStreams.filter(function (stream) {
return stream.Type == "Video";
})[0];
var bitrateSetting = parseInt(localStorage.getItem('preferredVideoBitrate') || '') || 1500000;
var bitrateSetting = self.getBitrateSetting();
var maxAllowedWidth = Math.max(screen.height, screen.width);