equal
deleted
inserted
replaced
26 // timecode |
26 // timecode |
27 if ( pageoffset.substring( 2 ) != null ) { |
27 if ( pageoffset.substring( 2 ) != null ) { |
28 var offsettime = pageoffset.substring( 2 ); |
28 var offsettime = pageoffset.substring( 2 ); |
29 this._Popcorn.currentTime( parseFloat( offsettime ) ); |
29 this._Popcorn.currentTime( parseFloat( offsettime ) ); |
30 } |
30 } |
31 } else if ( pageoffset.substring(0, 2) === "a=") { |
31 } else if ( pageoffset.substring(0, 3) === "id=") { |
32 // annotation |
32 // annotation |
33 var annotationId = pageoffset.substring( 2 ); |
33 var annotationId = pageoffset.substring( 3 ); |
34 |
|
35 // there's no better way than that because |
34 // there's no better way than that because |
36 // of possible race conditions |
35 // of possible race conditions |
37 this._serializer.sync(IriSP.wrap(this, function() { |
36 this._serializer.sync(IriSP.wrap(this, function() { |
38 this.lookupAnnotation.call(this, annotationId); |
37 this.lookupAnnotation.call(this, annotationId); |
39 })); |
38 })); |
64 if ( !history.pushState ) { |
63 if ( !history.pushState ) { |
65 return false; |
64 return false; |
66 } |
65 } |
67 |
66 |
68 splitArr = window.location.href.split( "#" ) |
67 splitArr = window.location.href.split( "#" ) |
69 history.replaceState( {}, "", splitArr[0] + "#a=" + annotationId); |
68 history.replaceState( {}, "", splitArr[0] + "#id=" + annotationId); |
70 |
69 |
71 window.setTimeout(function() { _this.mutex = false }, 50); |
70 window.setTimeout(function() { _this.mutex = false }, 50); |
72 }; |
71 }; |
73 |
72 |
74 // lookup and seek to the beginning of an annotation |
73 // lookup and seek to the beginning of an annotation |
87 } |
86 } |
88 } |
87 } |
89 |
88 |
90 if (typeof(annotation) !== "undefined") { |
89 if (typeof(annotation) !== "undefined") { |
91 this._Popcorn.currentTime(annotation.begin / 1000); |
90 this._Popcorn.currentTime(annotation.begin / 1000); |
|
91 this._Popcorn.trigger("IriSP.Mediafragment.showAnnotation", annotationId); |
92 } |
92 } |
93 |
93 |
94 window.setTimeout(function() { _this.mutex = false }, 50); |
94 window.setTimeout(function() { _this.mutex = false }, 50); |
95 }; |
95 }; |