This commit is contained in:
calzoneman 2013-08-14 23:26:50 -05:00
parent 26a46fc1d9
commit 98b6273dc4
3 changed files with 11 additions and 1 deletions

View File

@ -117,7 +117,8 @@ var USEROPTS = {
ignore_channelcss : getOrDefault("ignore_channelcss", false),
ignore_channeljs : getOrDefault("ignore_channeljs", false),
sort_rank : getOrDefault("sort_rank", false),
sort_afk : getOrDefault("sort_afk", false)
sort_afk : getOrDefault("sort_afk", false),
default_quality : getOrDefault("default_quality", "#quality_auto")
};
var NO_WEBSOCKETS = USEROPTS.altsocket;

View File

@ -224,10 +224,15 @@ $("#userpl_save").click(function() {
});
/* video controls */
function selectQuality(select, preset) {
}
(function() {
function qualHandler(select, preset) {
$(select).click(function() {
VIDEOQUALITY = preset;
USEROPTS.default_quality = select;
saveOpts();
var btn = $("#qualitywrap .btn.dropdown-toggle");
var caret = btn.find(".caret").detach();
btn.text($(select).text());
@ -236,11 +241,14 @@ $("#userpl_save").click(function() {
PLAYER.player.setPlaybackQuality(VIDEOQUALITY);
});
}
qualHandler("#quality_auto", "");
qualHandler("#quality_240p", "small");
qualHandler("#quality_360p", "medium");
qualHandler("#quality_480p", "large");
qualHandler("#quality_720p", "hd720");
qualHandler("#quality_1080p", "hd1080");
if($(USEROPTS.default_quality).length > 0)
$(USEROPTS.default_quality).click();
})();
$("#mediarefresh").click(function() {

View File

@ -149,6 +149,7 @@
Quality <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a id="quality_auto" href="javascript:void(0)">Quality: Auto</a></li>
<li><a id="quality_240p" href="javascript:void(0)">240p</a></li>
<li><a id="quality_360p" href="javascript:void(0)">360p</a></li>
<li><a id="quality_480p" href="javascript:void(0)">480p</a></li>