80 if (!_stop) { |
80 if (!_stop) { |
81 _ann.trigger("unselect",true); |
81 _ann.trigger("unselect",true); |
82 } |
82 } |
83 }); |
83 }); |
84 _node.on("click", function() { |
84 _node.on("click", function() { |
85 _this.player.popcorn.currentTime(_ann.begin.getSeconds()); |
85 _this.media.setCurrentTime(_ann.begin); |
86 _this.player.popcorn.trigger("IriSP.Mediafragment.setHashToAnnotation", _ann.id); |
86 _this.player.trigger("Mediafragment.setHashToAnnotation", _ann.id); |
87 }); |
87 }); |
88 }); |
88 }); |
89 } |
89 } |
90 var _tagmatch = _uri.match(_this.tag_regexp); |
90 var _tagmatch = _uri.match(_this.tag_regexp); |
91 if (_tagmatch) { |
91 if (_tagmatch) { |
92 _node.on("select", function() { |
92 _node.on("select", function() { |
93 _this.player.popcorn.trigger("IriSP.search.triggeredSearch",_tagmatch[1]); |
93 _this.player.trigger("search.triggeredSearch",_tagmatch[1]); |
94 }) |
94 }) |
95 _node.on("unselect", function() { |
95 _node.on("unselect", function() { |
96 _this.player.popcorn.trigger("IriSP.search.cleared"); |
96 _this.player.trigger("search.cleared"); |
97 }) |
97 }) |
98 } |
98 } |
99 }); |
99 }); |
100 }) |
100 }) |
101 this.bindPopcorn("timeupdate","onTimeupdate"); |
101 this.onMediaEvent("timeupdate","onTimeupdate"); |
102 } |
102 } |
103 |
103 |
104 IriSP.Widgets.Renkan.prototype.onTimeupdate = function() { |
104 IriSP.Widgets.Renkan.prototype.onTimeupdate = function(_time) { |
105 var _time = 1000 * this.player.popcorn.currentTime(); |
|
106 IriSP._(this.node_times).each(function(_nt) { |
105 IriSP._(this.node_times).each(function(_nt) { |
107 if (_nt.begin <= _time && _nt.end >= _time) { |
106 if (_nt.begin <= _time && _nt.end >= _time) { |
108 if (!_nt.selected) { |
107 if (!_nt.selected) { |
109 _nt.selected = true; |
108 _nt.selected = true; |
110 _nt.node.trigger("select", true); |
109 _nt.node.trigger("select", true); |