equal
deleted
inserted
replaced
116 } |
116 } |
117 }; |
117 }; |
118 |
118 |
119 IriSP.SegmentsWidget.prototype.clickHandler = function(annotation) { |
119 IriSP.SegmentsWidget.prototype.clickHandler = function(annotation) { |
120 var begin = Math.round((+ annotation.begin) / 1000); |
120 var begin = Math.round((+ annotation.begin) / 1000); |
|
121 var end = Math.round((+ annotation.end) / 1000); |
121 this._Popcorn.currentTime(begin); |
122 this._Popcorn.currentTime(begin); |
|
123 |
|
124 var duration = +this._serializer.currentMedia().meta["dc:duration"] / 1000; |
|
125 var middle_time = (begin + end) / 2; |
|
126 var percents = Math.round((middle_time / duration) * 100); |
|
127 |
|
128 this._Popcorn.trigger("IriSP.SegmentsWidget.segmentClick", percents); |
122 }; |
129 }; |
123 |
130 |
124 IriSP.SegmentsWidget.prototype.searchHandler = function(searchString) { |
131 IriSP.SegmentsWidget.prototype.searchHandler = function(searchString) { |
125 |
132 |
126 if (searchString == "") |
133 if (searchString == "") |