New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

universalviewer

Package Overview
Dependencies
Maintainers
1
Versions
191
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

universalviewer - npm Package Compare versions

Comparing version 3.0.18 to 3.0.19

2

package.json
{
"name": "universalviewer",
"version": "3.0.18",
"version": "3.0.19",
"description": "The Universal Viewer is a community-developed open source project on a mission to help you share your content with the world.",

@@ -5,0 +5,0 @@ "repository": {

@@ -1,1 +0,1 @@

{ "version": "3.0.18" }
{ "version": "3.0.19" }

@@ -1,2 +0,2 @@

// iiif-av-component v0.0.23 https://github.com/iiif-commons/iiif-av-component#readme
// iiif-av-component v0.0.24 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<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

@@ -503,3 +503,3 @@ (function (global){

this._contentAnnotations = [];
var items = this.options.data.canvas.__jsonld.content[0].items; //todo: use canvas.getContent()
var items = this.options.data.canvas.getContent(); // (<any>this.options.data.canvas).__jsonld.content[0].items; //todo: use canvas.getContent()
if (items.length === 1) {

@@ -516,13 +516,20 @@ this._$timelineItemContainer.hide();

var mediaSource = void 0;
if (Array.isArray(item.body) && item.body[0].type.toLowerCase() === 'choice') {
// Choose first "Choice" item as body
var tmpItem = item;
item.body = tmpItem.body[0].items[0];
mediaSource = item.body.id.split('#')[0];
var bodies = item.getBody();
if (!bodies.length) {
console.warn('item has no body');
return;
}
else if (item.body.type.toLowerCase() === 'textualbody') {
mediaSource = item.body.value;
var body = bodies[0];
var type = body.getType();
// if (type && type.toString() === 'choice') {
// // Choose first "Choice" item as body
// const tmpItem = item;
// item.body = tmpItem.body[0].items[0];
// mediaSource = item.body.id.split('#')[0];
// } else
if (type && type.toString() === 'textualbody') {
//mediaSource = (<any>body).value;
}
else {
mediaSource = item.body.id.split('#')[0];
mediaSource = body.id.split('#')[0];
}

@@ -542,4 +549,9 @@ /*

*/
var spatial = /xywh=([^&]+)/g.exec(item.target);
var temporal = /t=([^&]+)/g.exec(item.target);
var target = item.getTarget();
if (!target) {
console.warn('item has no target');
return;
}
var spatial = /xywh=([^&]+)/g.exec(target);
var temporal = /t=([^&]+)/g.exec(target);
var xywh = void 0;

@@ -561,3 +573,3 @@ if (spatial && spatial[1]) {

var percentageTop = this._convertToPercentage(positionTop, this._canvasHeight), percentageLeft = this._convertToPercentage(positionLeft, this._canvasWidth), percentageWidth = this._convertToPercentage(mediaWidth, this._canvasWidth), percentageHeight = this._convertToPercentage(mediaHeight, this._canvasHeight);
var temporalOffsets = /t=([^&]+)/g.exec(item.body.id);
var temporalOffsets = /t=([^&]+)/g.exec(body.id);
var ot = void 0;

@@ -572,3 +584,3 @@ if (temporalOffsets && temporalOffsets[1]) {

var itemData = {
'type': item.body.type,
'type': type,
'source': mediaSource,

@@ -663,3 +675,4 @@ 'start': startTime,

var $mediaElement;
switch (data.type.toLowerCase()) {
var type = data.type.toString().toLowerCase();
switch (type) {
case 'image':

@@ -687,3 +700,3 @@ $mediaElement = $('<img class="anno" src="' + data.source + '" />');

data.element = $mediaElement;
if (data.type.toLowerCase() === 'video' || data.type.toLowerCase() === 'audio') {
if (type === 'video' || type === 'audio') {
data.timeout = null;

@@ -717,3 +730,3 @@ var that_1 = this;

}
if (data.type.toLowerCase() === 'video' || data.type.toLowerCase() === 'audio') {
if (type === 'video' || type === 'audio') {
var that_2 = this;

@@ -949,2 +962,3 @@ var self_1 = data;

contentAnnotation = this._contentAnnotations[i];
var type = contentAnnotation.type.toString().toLowerCase();
if (contentAnnotation.start <= this._canvasClockTime && contentAnnotation.end >= this._canvasClockTime) {

@@ -958,3 +972,3 @@ this._checkMediaSynchronization();

}
if (contentAnnotation.type.toLowerCase() === 'video' || contentAnnotation.type.toLowerCase() === 'audio') {
if (type === 'video' || type === 'audio') {
if (contentAnnotation.element[0].currentTime > contentAnnotation.element[0].duration - contentAnnotation.endOffset) {

@@ -970,3 +984,3 @@ contentAnnotation.element[0].pause();

contentAnnotation.timelineElement.removeClass('active');
if (contentAnnotation.toLowerCase() === 'video' || contentAnnotation.toLowerCase() === 'audio') {
if (type === 'video' || type === 'audio') {
contentAnnotation.element[0].pause();

@@ -983,3 +997,4 @@ }

contentAnnotation = this._contentAnnotations[i];
if (contentAnnotation.type.toLowerCase() === 'video' || contentAnnotation.type.toLowerCase() === 'audio') {
var type = contentAnnotation.type.toString().toLowerCase();
if (type === 'video' || type === 'audio') {
contentAnnotation.element[0].currentTime = this._canvasClockTime - contentAnnotation.start + contentAnnotation.startOffset;

@@ -1013,3 +1028,4 @@ if (contentAnnotation.start <= this._canvasClockTime && contentAnnotation.end >= this._canvasClockTime) {

contentAnnotation = this._contentAnnotations[i];
if ((contentAnnotation.type.toLowerCase() === 'video' || contentAnnotation.type.toLowerCase() === 'audio') &&
var type = contentAnnotation.type.toString().toLowerCase();
if ((type === 'video' || type === 'audio') &&
(contentAnnotation.start <= this._canvasClockTime && contentAnnotation.end >= this._canvasClockTime)) {

@@ -1016,0 +1032,0 @@ var correctTime = (this._canvasClockTime - contentAnnotation.start + contentAnnotation.startOffset);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc