aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements
diff options
context:
space:
mode:
authorJose Antonio Marquez Russo2012-06-28 22:50:24 -0700
committerJose Antonio Marquez Russo2012-06-28 22:50:24 -0700
commit7a8c1f20208fe09d78dc6ec5c8762cebcdf9b677 (patch)
treedd4478eea3294a7a41d150247b3eac8791acc1ee /js/controllers/elements
parent4bfc0b9221734c75f305dbeefe8e49a9d73b766b (diff)
parent1b6202d3cd517480aebafdfe97e9b89600d715ce (diff)
downloadninja-7a8c1f20208fe09d78dc6ec5c8762cebcdf9b677.tar.gz
Merge pull request #40 from mencio/video-fix
Video fix cleanup
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-xjs/controllers/elements/video-controller.js13
1 files changed, 0 insertions, 13 deletions
diff --git a/js/controllers/elements/video-controller.js b/js/controllers/elements/video-controller.js
index 44ba5aa1..c36752f5 100755
--- a/js/controllers/elements/video-controller.js
+++ b/js/controllers/elements/video-controller.js
@@ -28,19 +28,6 @@ exports.VideoController = Montage.create(ElementController, {
28 value: function(el, p, value) { 28 value: function(el, p, value) {
29 switch(p) { 29 switch(p) {
30 case "src": 30 case "src":
31
32 //TODO: Move this to the location where the element is created
33 el.addEventListener('canplay', function(e) {
34 //TODO: Figure out why the video must be seeked to the end before pausing
35 var time = Math.ceil(this.duration);
36 //Trying to display the last frame (doing minus 2 seconds if long video)
37 if (time > 2) this.currentTime = time - 2;
38 else if (time > 1) this.currentTime = time - 1;
39 else this.currentTime = time || 0;
40 //Pauing video
41 this.pause();
42 }, false);
43
44 el.setAttribute(p, value); 31 el.setAttribute(p, value);
45 break; 32 break;
46 case "poster": 33 case "poster":