avalonmediasystem / avalon

Avalon Media System – Samvera Application
http://www.avalonmediasystem.org/
Apache License 2.0
94 stars 51 forks source link

Test Universal Viewer Support for Avalon Manifests #4081

Closed joncameron closed 4 years ago

joncameron commented 4 years ago

Description

We should explore and list issues of Universal Viewer playing Avalon-generated manifests. There are still some issues with UV playing our media, and it would be good for us to know what these are and what is causing them.

Done Looks Like

Dananji commented 4 years ago

Tested on http://universalviewer.io/examples/;

  1. Avalon manifests are missing the property format for items (https://iiif.io/api/presentation/3.0/#format), and UV expects it to be present. Because of this UV can't load the manifest.

  2. I updated a manifest from Spruce in JSONBin.io (link: https://api.jsonbin.io/b/5ea9a95e66e603359fe0cd7d/5) and tried loading it in UV, and it loads the player. When it is being played there's no sound even though the time is updated in the player. In the console in DevTools it keeps logging loading media indefinitely.

Screenshot from 2020-04-29 13-54-59.png

It seems the loadedmetadata event in ME.js is not getting fired. And I can't figure out what's the reason for this.

  1. IIIF 3.0 spec presentation manifests in maple loads and plays as expected.
Dananji commented 4 years ago

Tested on https://uv.netlify.app/;

  1. Manifest from maple, (https://dlib.indiana.edu/iiif_av/lunchroom_manners/lunchroom_manners_v6_jwd.json, this was used because the format: audio/mp4; codec..xxxxx in mahler_symphony was not recognized by the app as a valid mime type) works well in this app
  2. Manifests from both spruce and mco-staging, does not work in this. It fails trying to fetch additional data from the stream URL. For sample manifests with images, this action happens for fetching additional information for the images from the an image service. For Avalon manifests, the error occurs when trying to go through the service section in the items for authentication. According to 3.0 spec here, the services block has some changes from previous version. I read through it but couldn't find why this would fail from the manifest side.
cjcolvar commented 4 years ago

@Dananji The auth service that we're using is a proposed but not yet adopted form of the auth spec. It could be that the new version of UV doesn't support it yet. Here is the github issue and comment that defines the proposal: https://github.com/IIIF/api/issues/1290#issuecomment-414707643. I'm happy to answer questions! This might be more confusing than the flow chart but here is the cypress test I wrote for testing the auth flow (but haven't finished committing to develop): https://github.com/avalonmediasystem/avalon/blob/aef629c6ac21ccdd6bbcbd727a6f93a633973007/cypress/integration/iiif_auth_spec.js

Dananji commented 4 years ago

Reading through the GitHub issue and comments explains a lot. It has a lot of things I was trying to say in my comment (which I didn't understand most of it at the time). Thank you for sharing this :+1:

So from UV perspective, http://universalviewer.io/examples was written for the previous IIIF spec, which supported auth services and the new one does not because now IIIF 3.0 spec registers only image services in their service registry?

cjcolvar commented 4 years ago

I'm not sure. I don't think the versions of UV are IIIF Presentation spec version dependent. I think they support whatever versions of the spec (and potentially developmental versions of the spec as well) the version of manifesto they were built with support.

Dananji commented 4 years ago
  1. The error happening with regards to auth services failing, Chris found that the issue might be with the changes in the way manifold handles the responses in the version used in UV previously to the latest one in master. Here JSON.parse(xhr.responseText) fails when responseText is empty. Action item: make a PR to manifold to handle this gracefully Possible diff:

    // if it's a resource without an info.json 
    // todo: if resource doesn't have a @profile 
    if (!xhr.responseText) { 
    that.status = HTTPStatusCode.OK; 
    resolve(that); 
    } else { 
    const data = JSON.parse(xhr.responseText); 
    let uri: string = unescape(data["@id"]); 
  2. In the new UV app, the auth services worked when the service block in manifest had a probe service added:

    {
    "@id": "https://spruce.dlib.indiana.edu/master_files/c821gj948/auto.m3u8",
    "@type": "AuthProbeService1",
    "profile": "http://iiif.io/api/auth/1/probe"
    }

    We don't think this is something that needs to be reported to UV, but is worth making a note of it for the time being.

  3. The issue of mediaelement.js being halted trying to load the stream media by not firing the loadedmetadata event, Chris mentioned this may be an issue with HLS in older UV which might be fixed with the newer UV's update of mediaelement.js.

cjcolvar commented 4 years ago

Another issue that we found yesterday was that in the latest UV "Sound" canvases were trying to be matched with video "format"s and failing on "audio/mp4" but successfully loads with "video/mp4".

joncameron commented 4 years ago