Code Monkey home page Code Monkey logo

iiif-av-component's Introduction

iiif-av-component

npm i
npm run build
npm start

Example Manifests

https://iiif-commons.github.io/iiif-av-component/examples/data/bl/sounds-tests/index.html

Publishing

Checkout the master branch, and ensure it is up-to-date.

Run npm version [major | minor | patch] for example:

npm version patch

This will update the package.json version and create a git tag. Then push both the main/tag.

git push origin main v0.0.8

Then the GitHub action will pick up the tag and publish it to NPM ๐ŸŽ‰

iiif-av-component's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iiif-av-component's Issues

Support playing an annotation target

Annotations presented externally to the AVComponent may wish to use the component to play the targets of their annotations. The basic functionality missing from the current codebase is the ability to advance the player to a particular timestamp (outside of the private method _setCurrentTime on CanvasInstance, but several progressive enhancements might facilitate annotation targets:

Lower-level enhancement suggestions

  • Adding an optional timestamp argument to play().
  • Allowing CanvasInstance.setCanvas to accept a #t= fragment on the URI argument, parsing it to advance the player to the appropriate point.

Mid-level enhancement suggestions

  • Supporting an end time as well as a start-time in the above, so that the player plays only the segment specified.

Higher-level enhancement suggestions:

  • Accepting a JSON block corresponding to the target element of a WebAnnotation (including point selectors and range selectors as in this recipe and playing (or advancing) only that portion of the media.
  • Accepting a (pair of?) URIs for an Annotation (and its containing AnnotationPage?) to be fetched by the component, parsed, and played as above.

This is intended as a starting point for discussion. Example use cases to follow soon.

Support for RFC-2326 "Colon-Formatted" Media Fragments

Hello, in our manifests, we use RFC-2326 "colon-formatted" media fragments on ranges that look like this:

{
  "type": "Range",
  "id": "https:\/\/digital.lib.utk.edu\/notdereferenceable\/assemble\/manifest\/rfta\/8\/range\/places_mentioned\/5",
  "label": {
    "en": [
      "Parkway (US-321\/US 441 S)"
    ]
  },
  "items": [
    {
      "type": "Canvas",
      "id": "https:\/\/digital.lib.utk.edu\/notdereferenceable\/assemble\/manifest\/rfta\/8\/canvas\/0#t=00:28:03,00:32:01"
    }
  ]
}

It seems that iiif-av-component only supports "seconds notation", but I'm wondering if it would be relatively easy to support colon notation as well.

Temporal offset detection algorithm finds false positives for some URLs

In determining the "temporal offsets" for rendering a media element, the entire resource URI is matched against. However, this is problematic for URLs that coincidentally contain a t=<whatever> sequence in their path part, such as this one: https://wowza.library.ucla.edu/iiif_av_public/definst/mp4:soul/pairtree_root/21/19/8=/zz/00/2d/w1/7t/=8/q1/1h/04/9/21198=zz002dw17t=8q11h049/ark%2B=21198=zz002dw17t=8q11h049.mp4/manifest.mpd.

Attempting to load Universal Viewer 3.1.4 with a IIIF Presentation API manifest that references the above content resource results in an error state. Here is the top of the stack trace:

Uncaught TypeError: HTMLMediaElement.currentTime setter: Value being assigned is not a finite floating-point value.
    _setMediaCurrentTime IIIFAVComponent.js:1
    _synchronizeMedia IIIFAVComponent.js:1
    _updateMediaActiveStates IIIFAVComponent.js:1
    _lowPriorityUpdater IIIFAVComponent.js:1
    pause IIIFAVComponent.js:1
    _renderMediaElement IIIFAVComponent.js:1

Steps to reproduce:

  1. Spin up UCLALibrary/dl-viewer locally (http://localhost:8080 by default); depending on your Node version, you may need to set NODE_OPTIONS=--openssl-legacy-provider to work around ERR_OSSL_EVP_UNSUPPORTED
  2. Navigate to http://localhost:8080/#?manifest=https%3A%2F%2Fiiif.library.ucla.edu%2Fark%253A%252F21198%252Fzz002dw17t%2Fmanifest and observe the aforementioned error in the browser console log
  3. Navigate to http://localhost:8080/#?manifest=https%3A%2F%2Fiiif.library.ucla.edu%2Fark%253A%252F21198%252Fzz002dvx8f%2Fmanifest and observe the expected behavior for this resource type: rendering of audiowaveform data

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.