diff --git a/dist/iiif-av-component.d.ts b/dist/iiif-av-component.d.ts index caafdf4..cee1cb5 100644 --- a/dist/iiif-av-component.d.ts +++ b/dist/iiif-av-component.d.ts @@ -1,4 +1,4 @@ -// iiif-av-component v0.0.13 https://github.com/iiif-commons/iiif-av-component#readme +// iiif-av-component v0.0.14 https://github.com/iiif-commons/iiif-av-component#readme /// declare namespace IIIFComponents { diff --git a/dist/iiif-av-component.js b/dist/iiif-av-component.js index 2d92efc..f0117d2 100644 --- a/dist/iiif-av-component.js +++ b/dist/iiif-av-component.js @@ -1,4 +1,4 @@ -// iiif-av-component v0.0.13 https://github.com/iiif-commons/iiif-av-component#readme +// iiif-av-component v0.0.14 https://github.com/iiif-commons/iiif-av-component#readme (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.iiifAvComponent = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o diff --git a/dist/iiif-av-component.min.js b/dist/iiif-av-component.min.js index ca2509e..739f547 100644 --- a/dist/iiif-av-component.min.js +++ b/dist/iiif-av-component.min.js @@ -1,2 +1,2 @@ -// iiif-av-component v0.0.13 https://github.com/iiif-commons/iiif-av-component#readme +// iiif-av-component v0.0.14 https://github.com/iiif-commons/iiif-av-component#readme !function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{var g;g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,g.iiifAvComponent=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o1){var rangeTiming=temporal[1].split(","),duration=new IIIFComponents.AVComponentObjects.Duration(Number(rangeTiming[0]),Number(rangeTiming[1]));canvasInstance.currentDuration=duration,canvasInstance.highlightDuration(),canvasInstance.setCurrentTime(duration.start),canvasInstance.play()}}},AVComponent.prototype.showCanvas=function(canvasId){for(var i=0;i')}return CanvasInstance.prototype.init=function(){var _this=this;this._$canvasContainer=$('
'),this._$optionsContainer=$('
'),this._$rangeTimelineContainer=$('
'),this._$canvasTimelineContainer=$('
'),this._$durationHighlight=$('
'),this._$timelineItemContainer=$('
'),this._$controlsContainer=$('
'),this._$playButton=$('"),this._$timingControls=$(""+this._data.content.currentTime+': / '+this._data.content.duration+': '),this._$volumeControl=$(''),this._$canvasTime=this._$timingControls.find(".canvasTime"),this._$canvasDuration=this._$timingControls.find(".canvasDuration"),this._$controlsContainer.append(this._$playButton,this._$timingControls,this._$volumeControl),this._$canvasTimelineContainer.append(this._$durationHighlight),this._$optionsContainer.append(this._$canvasTimelineContainer,this._$rangeTimelineContainer,this._$timelineItemContainer,this._$controlsContainer),this.$playerElement.append(this._$canvasContainer,this._$optionsContainer),this._canvasClockDuration=this.canvas.getDuration();var canvasWidth=this.canvas.getWidth(),canvasHeight=this.canvas.getHeight();canvasWidth?this._canvasWidth=canvasWidth:this._canvasWidth=this.$playerElement.parent().width(),canvasHeight?this._canvasHeight=canvasHeight:this._canvasHeight=this._canvasWidth*this._data.defaultAspectRatio;var that=this;this._$playButton.on("click",function(){_this._isPlaying?_this.pause():_this.play()}),this._$volumeControl.on("input",function(){that.setVolume(Number(this.value))}),this._$volumeControl.on("change",function(){that.setVolume(Number(this.value))}),this._$canvasTimelineContainer.slider({value:0,step:.01,orientation:"horizontal",range:"min",max:that._canvasClockDuration,animate:!1,create:function(evt,ui){},slide:function(evt,ui){that.setCurrentTime(ui.value)},stop:function(evt,ui){}}),this._contentAnnotations=[];var items=this.canvas.__jsonld.content[0].items;1===items.length&&this._$timelineItemContainer.hide();for(var i=0;i');break;case"video":$mediaElement=$('