Skip to content

Instantly share code, notes, and snippets.

IE8 and IE9 have the HttpXmlRequest object, but unlike the implementation in IE10+ and current versions of Safari, Chrome and Firefox it does not support CORS, so will not allow you to attempt any kind of cross domain request.

In IE8 and IE9, Microsoft separated out cross domain activity into the XDomainRequest interface:

https://developer.mozilla.org/en-US/docs/Web/API/XDomainRequest

This sits alongside XmlHttpRequest in IE8 and IE9 (and was dropped in IE10 when XHR became fully-CORS), and you use it when you want to go cross domain. This works fine for many Ajax scenarios, and you can shim it into jQuery with this library, which hides the distinction between the two interfaces when you do CORS from jQuery:

https://github.com/MoonScript/jQuery-ajaxTransport-XDomainRequest

@tomcrane
tomcrane / Thumbnail-Selection.md
Last active December 7, 2018 02:45
Thumbnail selection algorithm

getThumbnail(..)

Motivation

Generally, to encapsulate the logic for getting the best possible thumbnail for a resource, given the user's current known auth status for those resources. Anyone using manifesto or some other library that implements this can just call getThumbnail(..) and not worry about the details. Most of the time auth is not an issue, but if it is, they still don't need to worry about the details, getThumbnail(..) will figure it out and return the best thumbnail the user can currently see (which may be no thumbnail). Crucially, getThumbnail() assumes that the best thumbnail is the FASTEST one, within reason; that viewers favour speed over a precise size because they can scale an image in the browser.

Specifically, to help viewers generate a "field" of thumbnails as quickly as possible. Mirador, UV and other viewers all show large numbers of thumbnails at once. This can give a poor user experience, especially if viewers ask for arbitrary image sizes which

General

sequence -> canvases

OK for video. A canvas with a time dimension. "duration"... (dc?)

Is "canvas" general enough for audio, born digital, 3D?

  • Does OSD handle an info.json with szes only (no tiling?)
  • If so use shimmy to generate info.json from flickr sizes
  • requires proxy to rewrite iiif -> flickr images

https://github.com/mejackreed/shimmy

Make shimmy -> DLCS integration


@tomcrane
tomcrane / links-for-auth.md
Last active February 2, 2016 21:26
Links for auth examples
@tomcrane
tomcrane / canvases.md
Last active April 1, 2016 18:10
UV / Shared Canvas

The current 2-up implementation was developed from the British Library's materials - but in those cases the facing pages were already cropped and framed to give a consistent viewing experience, so the problem wasn't seen. I suspect it would have been before long.

What's happening currently The UV code is postitioning the recto tile source on the canvas so that it aligns with the top of the verso image, and adds a small gutter between them (the size of this gutter is configurable, the current value is the result of user testing at the BL). What happens next is down to the OpenSeadragon library [0] that we use to render the deep zoom images. Currently this is what is scaling the images to be the same width. We need to prevent it doing that.

Quick fix - The only metadata the UV has to go on is that the pair of images are the verso of one page and recto of the following page - and even that information is inferred from the sequence rather than explicit in the metadata (but see https://digirati.atlassian.net/bro

@tomcrane
tomcrane / collections-browse.md
Last active May 9, 2016 11:51
Serendipitous Collection Browsing

Reqt - serendipitous discovery via membership of IIIF collections

(tag-based browsing - this kind of thing: http://iangilman.com/openseadragon/flickr/)

This is not part of the IIIF spec, as it isn't presentation semantics. It would be really useful to add an extra piece of metadata to tell me why a resource is a member of a particular collection.

{
participant user
participant client.org
participant content.org
participant CAS
user->client.org: select something
client.org->content.org: GET info.json
note left of content.org
HTTP 401
unauthorized

Updated 2018 - Please see http://canvas-panel.digirati.com/#/about for later developments. The conversation on this gist is kept here for its usefulness to posterity...


There is a resuable component that sits between tile renderers like OpenSeadragon (OSD) and manifest-level viewers. This component can be reused in very simple IIIF-powered applications - a few lines of JavaScript - but is sophisticated enough to form the basis of custom applications with complex layout and annotation rendering requirements.

I'm not quite sure what its external interface looks like yet - but it's the component I'd reach for to make an ad-hoc IIIF powered mini-application instead of OSD because it understands canvases directly. Under the hood it's wrapping OSD (or another tile renderer).

This is a component that provides a surface for rendering one or more sc:Canvas objects and the image annotations on them. So it's both a library (or combination of libraries) and a UI component that takes up screen space. It takes