aboutsummaryrefslogtreecommitdiff
path: root/js/components
diff options
context:
space:
mode:
Diffstat (limited to 'js/components')
-rwxr-xr-xjs/components/tools-properties/tag-properties.reel/tag-properties.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.js b/js/components/tools-properties/tag-properties.reel/tag-properties.js
index ab745049..f14183e0 100755
--- a/js/components/tools-properties/tag-properties.reel/tag-properties.js
+++ b/js/components/tools-properties/tag-properties.reel/tag-properties.js
@@ -54,6 +54,7 @@ var TagProperties = exports.TagProperties = Montage.create(ToolProperties, {
54 this.divElement.addEventListener("click", this, false); 54 this.divElement.addEventListener("click", this, false);
55 this.imageElement.addEventListener("click", this, false); 55 this.imageElement.addEventListener("click", this, false);
56 this.videoElement.addEventListener("click", this, false); 56 this.videoElement.addEventListener("click", this, false);
57 this.videoElement.addEventListener("canplay", this, false);
57 this.canvasElement.addEventListener("click", this, false); 58 this.canvasElement.addEventListener("click", this, false);
58 this.customElement.addEventListener("click", this, false); 59 this.customElement.addEventListener("click", this, false);
59 } 60 }
@@ -99,6 +100,19 @@ var TagProperties = exports.TagProperties = Montage.create(ToolProperties, {
99 } 100 }
100 } 101 }
101 }, 102 },
103
104 handleCanplay: {
105 value: function (e) {
106 //TODO: Figure out why the video must be seeked to the end before pausing
107 var time = Math.ceil(this.duration);
108 //Trying to display the last frame (doing minus 2 seconds if long video)
109 if (time > 2) this.currentTime = time - 2;
110 else if (time > 1) this.currentTime = time - 1;
111 else this.currentTime = time || 0;
112 //Pauing video
113 this.pause();
114 }
115 },
102 116
103 _selectedElement: { 117 _selectedElement: {
104 value: "div", enumerable: false 118 value: "div", enumerable: false