|
1033
|
1 |
IriSP.Widgets.SlideVideoPlayer = function(player, config) { |
|
|
2 |
IriSP.loadCss(IriSP.getLib("cssSplitter")); |
|
|
3 |
IriSP.Widgets.Widget.call(this, player, config); |
|
|
4 |
}; |
|
|
5 |
|
|
|
6 |
IriSP.Widgets.SlideVideoPlayer.prototype = new IriSP.Widgets.Widget(); |
|
|
7 |
|
|
|
8 |
|
|
|
9 |
IriSP.Widgets.SlideVideoPlayer.prototype.defaults = { |
|
|
10 |
}; |
|
|
11 |
|
|
|
12 |
IriSP.Widgets.SlideVideoPlayer.prototype.template = '<div class="Ldt-SlideVideoPlayer">\ |
|
|
13 |
<div class="Ldt-SlideVideoPlayer-slide Ldt-SlideVideoPlayer-panel">\ |
|
|
14 |
</div>\ |
|
|
15 |
<div class="Ldt-SlideVideoPlayer-video Ldt-SlideVideoPlayer-panel"></div>\ |
|
|
16 |
</div>'; |
|
|
17 |
|
|
|
18 |
IriSP.Widgets.SlideVideoPlayer.prototype.draw = function() { |
|
|
19 |
var _this = this; |
|
|
20 |
|
|
|
21 |
_this.renderTemplate(); |
|
|
22 |
this.insertSubwidget( |
|
|
23 |
_this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-slide"), |
|
|
24 |
{ |
|
|
25 |
type: "ImageDisplay", |
|
|
26 |
annotation_type: _this.annotation_type, |
|
|
27 |
width: '100%' |
|
|
28 |
}, |
|
|
29 |
"slide" |
|
|
30 |
); |
|
|
31 |
this.insertSubwidget( |
|
|
32 |
_this.$.find(".Ldt-SlideVideoPlayer-panel.Ldt-SlideVideoPlayer-video"), |
|
|
33 |
{ |
|
|
34 |
type: "HtmlPlayer", |
|
|
35 |
video: _this.video, |
|
|
36 |
width: '100%', |
|
|
37 |
url_transform: _this.url_transform |
|
|
38 |
}, |
|
|
39 |
"player" |
|
|
40 |
); |
|
|
41 |
// FIXME: this should be better implemented through a signal sent |
|
|
42 |
// when widgets are ready (and not just loaded) |
|
|
43 |
window.setTimeout(function () { |
|
|
44 |
_this.$.find(".Ldt-SlideVideoPlayer").split({ orientation: 'vertical' }); |
|
|
45 |
}, 1000); |
|
|
46 |
} |