Skip to content

Commit

Permalink
enable aleph in v4
Browse files Browse the repository at this point in the history
  • Loading branch information
edsilv committed Jun 16, 2023
1 parent 5f212a9 commit 1eb67d8
Show file tree
Hide file tree
Showing 5 changed files with 665 additions and 609 deletions.
25 changes: 19 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-intersection-observer": "^8.34.0",
"xss": "1.0.3",
"three": "^0.102.1",
"waveform-panel": "^1.2.0",
"xss": "1.0.3",
"zustand": "^4.0.0-rc.0"
},
"collective": {
Expand Down
49 changes: 27 additions & 22 deletions src/content-handlers/iiif/IIIFContentHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,64 +36,64 @@ const Extension: IExtensionRegistry = {
name: "uv-av-extension",
loader: () =>
/* webpackMode: "lazy" */ import(
"./extensions/uv-av-extension/Extension"
),
"./extensions/uv-av-extension/Extension"
),
},
ALEPH: {
name: "uv-aleph-extension",
loader: () =>
/* webpackMode: "lazy" */ import(
"./extensions/uv-aleph-extension/Extension"
),
"./extensions/uv-aleph-extension/Extension"
),
},
DEFAULT: {
name: "uv-default-extension",
loader: () =>
/* webpackMode: "lazy" */ import(
"./extensions/uv-default-extension/Extension"
),
"./extensions/uv-default-extension/Extension"
),
},
EBOOK: {
name: "uv-ebook-extension",
loader: () =>
/* webpackMode: "lazy" */ import(
"./extensions/uv-ebook-extension/Extension"
),
"./extensions/uv-ebook-extension/Extension"
),
},
MEDIAELEMENT: {
name: "uv-mediaelement-extension",
loader: () =>
/* webpackMode: "lazy" */ import(
"./extensions/uv-mediaelement-extension/Extension"
),
"./extensions/uv-mediaelement-extension/Extension"
),
},
MODELVIEWER: {
name: "uv-model-viewer-extension",
loader: () =>
/* webpackMode: "lazy" */ import(
"./extensions/uv-model-viewer-extension/Extension"
),
"./extensions/uv-model-viewer-extension/Extension"
),
},
OSD: {
name: "uv-openseadragon-extension",
loader: () =>
/* webpackMode: "lazy" */ import(
"./extensions/uv-openseadragon-extension/Extension"
),
"./extensions/uv-openseadragon-extension/Extension"
),
},
PDF: {
name: "uv-pdf-extension",
loader: () =>
/* webpackMode: "lazy" */ import(
"./extensions/uv-pdf-extension/Extension"
),
"./extensions/uv-pdf-extension/Extension"
),
},
SLIDEATLAS: {
name: "uv-openseadragon-extension",
loader: () =>
/* webpackMode: "lazy" */ import(
"./extensions/uv-openseadragon-extension/Extension"
),
"./extensions/uv-openseadragon-extension/Extension"
),
},
};

Expand Down Expand Up @@ -127,17 +127,21 @@ export default class IIIFContentHandler extends BaseContentHandler<IIIFData>
this._extensionRegistry[ExternalResourceType.IMAGE] = Extension.OSD;
this._extensionRegistry[ExternalResourceType.MOVING_IMAGE] =
Extension.MEDIAELEMENT;
// this._extensionRegistry[ExternalResourceType.PHYSICAL_OBJECT] =
// Extension.MODELVIEWER;
this._extensionRegistry[ExternalResourceType.PHYSICAL_OBJECT] =
Extension.MODELVIEWER;
Extension.ALEPH;
this._extensionRegistry[ExternalResourceType.SOUND] =
Extension.MEDIAELEMENT;
this._extensionRegistry[MediaType.AUDIO_MP4] = Extension.AV;
this._extensionRegistry[MediaType.DICOM] = Extension.ALEPH;
this._extensionRegistry[MediaType.DRACO] = Extension.MODELVIEWER;
this._extensionRegistry[MediaType.EPUB] = Extension.EBOOK;
this._extensionRegistry[MediaType.GIRDER] = Extension.SLIDEATLAS;
this._extensionRegistry[MediaType.GLB] = Extension.MODELVIEWER;
this._extensionRegistry[MediaType.GLTF] = Extension.MODELVIEWER;
// this._extensionRegistry[MediaType.GLB] = Extension.MODELVIEWER;
// this._extensionRegistry[MediaType.GLTF] = Extension.MODELVIEWER;
this._extensionRegistry[MediaType.GLB] = Extension.ALEPH;
this._extensionRegistry[MediaType.GLTF] = Extension.ALEPH;
this._extensionRegistry[MediaType.JPG] = Extension.OSD;
this._extensionRegistry[MediaType.MP3] = Extension.AV;
this._extensionRegistry[MediaType.MPEG_DASH] = Extension.AV;
Expand Down Expand Up @@ -391,7 +395,8 @@ export default class IIIFContentHandler extends BaseContentHandler<IIIFData>
that._createExtension(extension, data, helper);
} catch (e) {
this.hideSpinner();
alert("Unable to load manifest");
console.log("error loading manifest: ", e);
// alert("Unable to load manifest");
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/iiif-collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@
"@id": "http://universalviewer.io/manifests.json",
"@type": "sc:Collection",
"label": "3D",
"visible": false,
"visible": true,
"manifests": [
{
"@id": "https://iiif-3d-manifests.netlify.app/collection/gltf/flight-helmet/index.json",
Expand Down Expand Up @@ -1144,4 +1144,4 @@
]
}
]
}
}
Loading

0 comments on commit 1eb67d8

Please sign in to comment.