Skip to content

Instantly share code, notes, and snippets.

@mitselek
Last active July 12, 2017 13:53
Show Gist options
  • Save mitselek/6ec213e7653db7556a69e2d9ec1e1674 to your computer and use it in GitHub Desktop.
Save mitselek/6ec213e7653db7556a69e2d9ec1e1674 to your computer and use it in GitHub Desktop.

Media-tag

An independent sessionless, userless, storageless HTML5 app for adding rich metadata to different media types. Actually any file or internet address could be annotated by this convention.

Scope

There are often situations, where some media needs to be annotated and EXIF is not really helpful because its only relevant for single picture.

  • add geolocation, timestamps, links, descriptions, titles etc to media (like EXIF, but universal for all media types);
  • mark regions on media;
  • add multilingual subtitles to videos;
  • create in-video navigation;
  • ...

Mechanics

There are three actors:

  • Service - Media-tag HTML5 environment with flexible media annotation functionality.
    • Annotate remote pictures with customizable fields/classifiers, exact or approximate geografic and datetime information
    • Same for stills from remote video (Vimeo)
    • Same for remote audio (Soundcloud?)
  • User - A human participant
  • Initiator - Environment, that starts the process by directing the User to Service and expects eventually the produced metadata

Initiator generates a JWT token containing any amount of information it needs to recognise the media and user.
Only mandatory field is URL of Initiator's API providing list of fields and related classifiers, ...
"api": "https://intiator.com/api/annotate/configuration

Service then makes a GET request to configuration URL i.e.
https://intiator.com/api/annotate/configuration/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwibWVkaWFJZCI6ImdoMzRoMzhkOHM5aWcyMyIsImV4cCI6MTQ2NTg5MDY1MDYzNCwiY29uZiI6Imh0dHBzOi8vaW50aWF0b3IuY29tL2FwaS9jb25maWd1cmF0aW9uIn0.-IxsxM_CJAaA53I0y3v9MFbfiGELa7nm-NosWNNvrug

Initiator responds with configuration data i.e. https://gist.github.com/mitselek/36b7f3c01f838fa51568d9ed70226b26

Configuration includes:

"media": Link to media file (Vimeo; Image; Soundcloud)
"fields": List of fields and classifiers
"submitTo": API URL i.e. https://intiator.com/api/annotate/submit

Service then renders the HTML5 environment for media annotation.

When user submits a form, the metadata will be sent to submitTo address as a body of POST request
https://intiator.com/api/annotate/submit/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxMjM0NTY3ODkwIiwibWVkaWFJZCI6ImdoMzRoMzhkOHM5aWcyMyIsImV4cCI6MTQ2NTg5MDY1MDYzNCwiY29uZiI6Imh0dHBzOi8vaW50aWF0b3IuY29tL2FwaS9jb25maWd1cmF0aW9uIn0.-IxsxM_CJAaA53I0y3v9MFbfiGELa7nm-NosWNNvrug

  • User might [SUBMIT] several times before leaving the service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment