Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
//console.log('PlaybackRatePlugin#render()');
const cfg = this.core.options.playbackRateConfig || {};
if (!this.playbackRates) {
this.playbackRates = cfg.options || DEFAULT_PLAYBACK_RATES;
}
if (!this.selectedRate) {
this.selectedRate = cfg.defaultValue || DEFAULT_PLAYBACK_RATE;
}
if (this.shouldRender()) {
var t = template(pluginHtml);
var html = t({playbackRates: this.playbackRates, title: this.getTitle()});
this.$el.html(html);
var style = Styler.getStyleFor(pluginStyle, {baseUrl: this.core.options.baseUrl});
this.$el.append(style);
this.core.mediaControl.$('.media-control-right-panel').append(this.el);
this.updateText();
}
return this;
}
get template() { return template(pluginHtml) }
get template() { return template(pluginHtml); }
get template() {
return Clappr.template(MediaControl);
}