src/widgets/Mediafragment.js
changeset 964 d7d56ea2d0a6
parent 957 4da0a5740b6c
child 986 f9d51dd4a3fe
equal deleted inserted replaced
963:d58d0dcdb640 964:d7d56ea2d0a6
    18 
    18 
    19 IriSP.Widgets.Mediafragment.prototype.draw = function() {
    19 IriSP.Widgets.Mediafragment.prototype.draw = function() {
    20     this.onMediaEvent("pause","setHashToTime");
    20     this.onMediaEvent("pause","setHashToTime");
    21     this.onMediaEvent("seeked","setHashToTime");
    21     this.onMediaEvent("seeked","setHashToTime");
    22     this.goToHash();
    22     this.goToHash();
       
    23     var _this = this;
       
    24     this.getWidgetAnnotations().forEach(function(_annotation) {
       
    25         _annotation.on("click", function() {
       
    26             _this.setHashToAnnotation(_annotation.id);
       
    27         })
       
    28     })
    23 }
    29 }
    24 
    30 
    25 IriSP.Widgets.Mediafragment.prototype.setWindowHash = function(_hash) {
    31 IriSP.Widgets.Mediafragment.prototype.setWindowHash = function(_hash) {
    26     if (typeof window.history !== "undefined" && typeof window.history.replaceState !== "undefined") {
    32     if (typeof window.history !== "undefined" && typeof window.history.replaceState !== "undefined") {
    27         window.history.replaceState({}, "", _hash);
    33         window.history.replaceState({}, "", _hash);