equal
deleted
inserted
replaced
1 IriSP.Widgets.Title = function(player, config) { |
1 const Title = function (ns) { |
2 IriSP.Widgets.Widget.call(this, player, config); |
2 return class extends ns.Widgets.Widget { |
|
3 constructor(player, config) { |
|
4 super(player, config); |
|
5 } |
|
6 |
|
7 static defaults = { |
|
8 media_title: false, |
|
9 }; |
|
10 |
|
11 static template = |
|
12 '<div class="Ldt-TitleWidget"><h2>{{#media_title}}{{media.title}}{{/media_title}}{{^media_title}}{{source.title}}{{/media_title}}</h2></div>'; |
|
13 |
|
14 draw() { |
|
15 this.renderTemplate(); |
|
16 } |
|
17 }; |
3 }; |
18 }; |
4 |
19 |
5 IriSP.Widgets.Title.prototype = new IriSP.Widgets.Widget(); |
20 export { Title }; |
6 |
|
7 IriSP.Widgets.Title.prototype.defaults = { |
|
8 media_title: false |
|
9 }; |
|
10 |
|
11 IriSP.Widgets.Title.prototype.template = |
|
12 '<div class="Ldt-TitleWidget"><h2>{{#media_title}}{{media.title}}{{/media_title}}{{^media_title}}{{source.title}}{{/media_title}}</h2></div>'; |
|
13 |
|
14 |
|
15 IriSP.Widgets.Title.prototype.draw = function() { |
|
16 this.renderTemplate(); |
|
17 }; |
|