equal
deleted
inserted
replaced
8 /* A Popcorn-based player for HTML5 Video, Youtube and Vimeo */ |
8 /* A Popcorn-based player for HTML5 Video, Youtube and Vimeo */ |
9 |
9 |
10 IriSP.Widgets.MashupPlayer.prototype.defaults = { |
10 IriSP.Widgets.MashupPlayer.prototype.defaults = { |
11 aspect_ratio: 14/9, |
11 aspect_ratio: 14/9, |
12 split_screen: false, |
12 split_screen: false, |
13 player_type: "PopcornPlayer" |
13 player_type: "PopcornPlayer", |
|
14 background: "#000000" |
14 } |
15 } |
15 |
16 |
16 IriSP.Widgets.MashupPlayer.prototype.draw = function() { |
17 IriSP.Widgets.MashupPlayer.prototype.draw = function() { |
17 var _this = this, |
18 var _this = this, |
18 _mashup = this.media, |
19 _mashup = this.media, |
19 _pauseState = true, |
20 _pauseState = (!this.autostart && !this.autoplay), |
20 _currentMedia = null, |
21 _currentMedia = null, |
21 _currentAnnotation = null, |
22 _currentAnnotation = null, |
22 _segmentBegin, |
23 _segmentBegin, |
23 _segmentEnd, |
24 _segmentEnd, |
24 _timecode = 0, |
25 _timecode = 0, |
85 this.height = Math.floor(this.width/this.aspect_ratio); |
86 this.height = Math.floor(this.width/this.aspect_ratio); |
86 this.$.css({ |
87 this.$.css({ |
87 height: this.height |
88 height: this.height |
88 }); |
89 }); |
89 } |
90 } |
|
91 |
|
92 this.$.css({ |
|
93 background: this.background |
|
94 }); |
90 |
95 |
91 var _grid = Math.ceil(Math.sqrt(_mashup.medias.length)), |
96 var _grid = Math.ceil(Math.sqrt(_mashup.medias.length)), |
92 _width = (this.split_screen ? this.width / _grid : this.width), |
97 _width = (this.split_screen ? this.width / _grid : this.width), |
93 _height = (this.split_screen ? this.height / _grid : this.height) |
98 _height = (this.split_screen ? this.height / _grid : this.height) |
94 |
99 |
208 if (_currentMedia) { |
213 if (_currentMedia) { |
209 _currentMedia.pause(); |
214 _currentMedia.pause(); |
210 } |
215 } |
211 } |
216 } |
212 |
217 |
213 changeCurrentAnnotation(); |
218 _mashup.on("loadedmetadata", changeCurrentAnnotation); |
214 |
219 |
215 } |
220 } |