src/widgets/Mediafragment.js
branchnew-model
changeset 883 d35ad8111c5e
parent 882 61c384dda19e
child 905 029a4efe9e24
equal deleted inserted replaced
882:61c384dda19e 883:d35ad8111c5e
    40 IriSP.Widgets.Mediafragment.prototype.setHashToAnnotation = function(_annotationId) {
    40 IriSP.Widgets.Mediafragment.prototype.setHashToAnnotation = function(_annotationId) {
    41     this.setHash( '#id=' + this.source.unNamespace(_annotationId) );
    41     this.setHash( '#id=' + this.source.unNamespace(_annotationId) );
    42 }
    42 }
    43 
    43 
    44 IriSP.Widgets.Mediafragment.prototype.setHashToTime = function(_time) {
    44 IriSP.Widgets.Mediafragment.prototype.setHashToTime = function(_time) {
    45     _time = (typeof _time !== "undefined" ? _time : this.player.popcorn.currentTime() );
    45     if (_time !== NaN) {
    46     this.setHash( '#t=' + _time );
    46         this.setHash( '#t=' + this.player.popcorn.currentTime() );
       
    47     }
    47 }
    48 }
    48 
    49 
    49 IriSP.Widgets.Mediafragment.prototype.setHash = function(_hash) {
    50 IriSP.Widgets.Mediafragment.prototype.setHash = function(_hash) {
    50     if (!this.blocked && this.last_hash !== _hash) {
    51     if (!this.blocked && this.last_hash !== _hash) {
    51         this.last_hash = _hash;
    52         this.last_hash = _hash;