1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Remove 'supportsNativeProgressStyle' in favor of buffer progress

This commit is contained in:
Dmitry Lyzo 2020-02-13 12:21:01 +03:00
parent e13e6f38d5
commit f68f3634c0

View file

@ -3,7 +3,6 @@ define(['browser', 'dom', 'layoutManager', 'keyboardnavigation', 'css!./emby-sli
var EmbySliderPrototype = Object.create(HTMLInputElement.prototype); var EmbySliderPrototype = Object.create(HTMLInputElement.prototype);
var supportsNativeProgressStyle = false;
var supportsValueSetOverride = false; var supportsValueSetOverride = false;
var enableWidthWithTransform; var enableWidthWithTransform;
@ -104,25 +103,23 @@ define(['browser', 'dom', 'layoutManager', 'keyboardnavigation', 'css!./emby-sli
var htmlToInsert = ''; var htmlToInsert = '';
if (!supportsNativeProgressStyle) { htmlToInsert += '<div class="mdl-slider-background-flex-container">';
htmlToInsert += '<div class="mdl-slider-background-flex-container">'; htmlToInsert += '<div class="mdl-slider-background-flex">';
htmlToInsert += '<div class="mdl-slider-background-flex">'; htmlToInsert += '<div class="mdl-slider-background-flex-inner">';
htmlToInsert += '<div class="mdl-slider-background-flex-inner">';
// the more of these, the more ranges we can display // the more of these, the more ranges we can display
htmlToInsert += '<div class="mdl-slider-background-upper"></div>'; htmlToInsert += '<div class="mdl-slider-background-upper"></div>';
if (enableWidthWithTransform) { if (enableWidthWithTransform) {
htmlToInsert += '<div class="mdl-slider-background-lower mdl-slider-background-lower-withtransform"></div>'; htmlToInsert += '<div class="mdl-slider-background-lower mdl-slider-background-lower-withtransform"></div>';
} else { } else {
htmlToInsert += '<div class="mdl-slider-background-lower"></div>'; htmlToInsert += '<div class="mdl-slider-background-lower"></div>';
}
htmlToInsert += '</div>';
htmlToInsert += '</div>';
htmlToInsert += '</div>';
} }
htmlToInsert += '</div>';
htmlToInsert += '</div>';
htmlToInsert += '</div>';
htmlToInsert += '<div class="sliderBubbleTrack"><div class="sliderBubble hide"></div></div>'; htmlToInsert += '<div class="sliderBubbleTrack"><div class="sliderBubble hide"></div></div>';
containerElement.insertAdjacentHTML('beforeend', htmlToInsert); containerElement.insertAdjacentHTML('beforeend', htmlToInsert);
@ -190,13 +187,10 @@ define(['browser', 'dom', 'layoutManager', 'keyboardnavigation', 'css!./emby-sli
passive: true passive: true
}); });
if (!supportsNativeProgressStyle) { if (supportsValueSetOverride) {
this.addEventListener('valueset', updateValues);
if (supportsValueSetOverride) { } else {
this.addEventListener('valueset', updateValues); startInterval(this);
} else {
startInterval(this);
}
} }
}; };