digirati-co-uk / iiif-manifest-editor

Create new IIIF Manifests. Modify existing manifests. Tell stories with IIIF.
https://manifest-editor.digirati.services/
MIT License
31 stars 2 forks source link

Media 6. Choice #198

Open tomcrane opened 2 years ago

tomcrane commented 2 years ago

Reference: https://tomcrane.github.io/scratch/me/media.html#case6

And also:

image

Data

The entry in the Media items list on the Media tab isn’t actually media - it’s a Choice. In the items list, it has the label Choice. It might also have an icon that indicates multiple images somehow. A little stack.

If you click through into the Choice, you just go one level deeper into a Media list, whose members are just like the anno bodies above. This is just an extra layer of UI - the target belongs to the Choice, but the members of the Choice are edited just like the Image, Image with/from Image Service, Audio or Video bodies.

{
    "id": "https:/example.org/anno1",
    "type": "Annotation",
    "motivation": "painting",
    "body": {
        "id": "https:/example.org/choicebody-rogueone",
        "type": "Choice",
        "items": [
            {
                "id": "https:/example.org/movies/rogue-one.mp4",
                "type": "Video",
                "width": 1920,
                "height": 1080,
                "duration": 8567.3,
                "format": "video/mp4",
                "label": { "en": [ "HD" ]}
            },
            {
                "id": "https:/example.org/movies/rogue-one-4K.mp4",
                "type": "Video",
                "width": 3840,
                "height": 2160,
                "duration": 8567.3,
                "format": "video/mp4",
                "label": { "en": [ "4K" ]}
            },
            {
                "id": "https:/example.org/movies/rogue-one.m3u8",
                "type": "Video",
                "duration": 8567.3,
                "format": "application/vnd.apple.mpegurl",
                "label": { "en": [ "Adaptive HLS" ]}
            }
        ]
    },
    "target": "https:/example.org/canvas1"
}

Editing Scenarios

You can delete the whole Choice (with plenty of warnings!) You can delete individual members of the Choice. Once inside a member of the Choice, it’s just the same as the previous 5 issues - they are just media!

(NB we might want to recognise HLS as a special case and have a custom widget for it).

The target belongs to the Choice, so sits with the list of media. Each media item in the Choice does not have a target, so it's not 100% the same as moving the painting annos in the other cases down one level.

Wrapping and unwrapping

Given a Choice, you can expand it out into a list of media - moving all the items up one level so that they become individual painting annotations. (Unwrap)

You can convert a single piece of media into a Choice with one entry in its items array - not much use on its own, but then you can add more media to the choice by the standard mechanism.

Given a list of media (rare), you can select multiple media and merge selected into a choice.

Content Creation

We don't need to support creating of Choice at the very first step. It's enough of a special case not to clutter the UI with this possibility at the outset.

So if assembling, say, a multispectral image stack, you could either:

On a media item at the top level:

On a Choice item at the top level:

On an item within a Choice:

(does that cover it?)