From 54f95bf52f660f5d8bcb3180c203ffd6ce9b8557 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 28 Jun 2012 23:27:38 -0700 Subject: Fixing reference to object --- js/tools/TagTool.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/tools') diff --git a/js/tools/TagTool.js b/js/tools/TagTool.js index 27665ee6..80e6150d 100755 --- a/js/tools/TagTool.js +++ b/js/tools/TagTool.js @@ -118,14 +118,14 @@ exports.TagTool = Montage.create(DrawingTool, { handleCanplay: { value: function(event) { //TODO: Figure out why the video must be seeked to the end before pausing - var time = Math.ceil(this.duration); + var time = Math.ceil(event.target.duration); //Trying to display the last frame (doing minus 2 seconds if long video) if (time > 2) { - this.currentTime = time - 2; + event.target.currentTime = time - 2; } else if (time > 1) { - this.currentTime = time - 1; + event.target.currentTime = time - 1; } else { - this.currentTime = time || 0; + event.target.currentTime = time || 0; } //Pauing video event.target.pause(); -- cgit v1.2.3