Commit 49bd3567 by jmclaus

Used chaining. Cached gettext call.

parent 585751ff
......@@ -59,16 +59,22 @@ function () {
// ***************************************************************
function onQualityChange(value) {
var controlStateStr;
this.videoQualityControl.quality = value;
if (_.indexOf(this.config.availableQualities, value) !== -1) {
this.videoQualityControl.el.addClass('active');
this.videoQualityControl.el.attr('title', gettext('HD on'))
.text(gettext('HD on'));
controlStateStr = gettext('HD on');
this.videoQualityControl.el
.addClass('active')
.attr('title', controlStateStr)
.text(controlStateStr);
} else {
this.videoQualityControl.el.removeClass('active');
this.videoQualityControl.el.attr('title', gettext('HD off'))
.text(gettext('HD off'));
controlStateStr = gettext('HD off');
this.videoQualityControl.el
.removeClass('active')
.attr('title', controlStateStr)
.text(controlStateStr);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment