Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page Properties
hiddentrue


Status

Status
colourBlue
titlereview

Priority3
Notepublished, language check outstanding
AssigneeKolibri

Resources

https://wiki.optimal-systems.de/display/devkolibri/yuuvis+Momentum+-+Flex+Viewer+Service

Remarks

There is description for extending the viewer service mentioned to be existing in git (ask Jürgen) - however, the link is missing. Get that documentation and cast it into a tutorial article linked to this viewer service concept article!

The link pointing to the "freely available" viewer components, also meant to be in git, is also inoperable or not accessible to anyone outside of team kolibri... → grab and integrate that info.

Supported filetypes look nicer when in tables:

Audio

Used component: By default audio files are natively played by the Browser with HTML5 Audio. (that is a subject of the HTML5 Audio specification).

Default component: Used component.
Mimetype: mpeg, mp3, ogg, wav
All played files are streamed to prevent unnecessary data downloads. The autoplay is set to false.

The API description lacks information...

These sentences are somewhat confusing and should be checked with the PO:
Additionaly, non mandatory parameters are provided (corresponding to the client settings)

  • bla
  • bla

Additionally provided parameters will be passed to the custom viewer. (I believe this should read: any further parameters provided will be passed to the custom viewer)


Place links for further reading at the bottom (api-gateway, functional extension - client side, architecture, a still-to-be-written customization tutorial)

A tutorial, describing how to integrate the viewer service into an Angular application ist missing.

...

For the description about how to extend the viewer service, see the readme here: GitLab

...

For the viewer to process the a request, a path pointing to the file to be displayed must be accessible. The mimeType or size may be omitted here , if provided in the Request Header.

...

  • path: the direct path from where the file can be loaded (required)
  • mimeType: the files file's mimeType (if not provided, the service tries to get it from request headers. If also not available there, an error page is shown)
  • fileSize: the size of the file (if not provided, the service tries to get it from request headers. If also not available there, an error page is shown)

...

  • mimeType may also be a string Array, containing multiple mime types
  • file extension is not mandatory. Provide only if mimeType is not unambiguouslyambiguous.


Additionally, non-mandatory parameters are provided (corresponding to the client settings)

  • darkMode: boolean = sets class dark to the body (default = false).
  • direction: string = sets the document direction to the body (default = „LTR“).
  • accentColor: string = set sets the accent color as css variable to the html tag (default = „“).
  • local: string = sets the document locale to the html tag (default = „en-US“).
  • fileExtension: string =  if mimeType is not unambiguouslyambiguous, provides a more clear file specification.

Additionally. the provided parameters will be passed to the custom viewer.

Supported Types

For unsupported filetypesfile types, the viewer service sends a notification and a download link, allowing for the content to be downloaded and viewed by an external application.

All of the following formats are supported by the Viewer viewer Service. Some others like Microsoft Office including MSG-formated emails e-mails are supported by the Rendition Service it that is installed an up as wellrendition service provided that it is installed and running.

Audio

Used component: By default, audio files are natively played by the Browser browser with HTML5 Audio. audio (that is a subject of the HTML5 Audio specification).

Default component: Used component.

Mimetype: mpeg, mp3, ogg, wav

...

Used component: Custom Angular Application with angular-x-image-viewer plugin plug-in.

Default component: By default, the supported mimeTypes are rendered in the standard HTML img tag.

Mimetypes: jpeg, gif, png, svg, bmp, png, ico

...

Used component: Native image rendering as base64 encoded.

Default component: By default, the supported mimeTypes are rendered in the standard HTML img tag.

Mimetypes: tiff, tif

JSON

Used component: Custom Angular Application application with ngx-json-viewer plugin.

Default component: Used component.

Mimetype: application/json 

E-Mails

Used component: eml files are parsed by mailparser.

Default component: Used component.

Mimetypes : message/rfc822 (eml)

...

Used component: Custom React Application application with markdown-to-jsxplugin plug-in. / Custom Angular Application application with showdown plugin.,showdown plug-in.

Default component: Used component.

Mimetypesx-web-markdownmarkdown

...

The ODFs are currently resolved as application/zip. The viewer analyses all such mime - types additionally and reacts in this case on the file extension that must be provided.

Used component: Files are parsed and rendered with https://webodf.org/

Default component: Used component.

File extension: odt, ods, odp

Mimetypes: application/zip (as resolved by yuuvis core service)

...

Used component: By default, plain text is natively rendered by the Browser.

Default component: Used component.

Mimetypesplain

XML(text/xml)

Used component: By default xml is natively rendered as text by the Browser.

Default component: Used component.

Mimetypes: xml

PDF

Used component: PDF.js which is a Mozilla project.

Default component: Used component.

Mimetypes: application/pdf

...

Used component:  By default video files are natively played by the Browser browser with HTML5 Video (that is a subject of the HTML5 Video specification).

Default component: Used component.

Mimetypes: mpeg, mp4, ogg, webm

...

Used component: Native string rendering

Default component: Used component.

Mimetype: x-zip-compressed, zip

...