Versions Compared

Key

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


Page Properties
hiddentrue
idrLANGDONE

Product Version
Report Notepublished, language check outstanding
AssigneeKolibri

Resources & Remarks

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

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.


Modification History

NameDateProduct VersionAction
Antje08 FEB 20212.4New page properties macro.

Introduction

...

Antje17 FEB 20222022 Springdiacritics in search terms in pdf preview


Introduction

The yuuvis® Momentum viewer service offers to display several common file types directly within a yuuvis® Momentum client application. It serves within the yuuvis® Momentum reference client and can readily be integrated in a custom client. It is designed allow for easy integration of further viewers in addition to the free ones included already.

Image Removed

This article is intended for administrators who want to know about the supported file types so they can decide whether to let the viewer service be extended for not supported ones.


Section
bordertrue


Column

Table of Contents

Table of Contents
exclude(Table of Contents|Read on|Another Tutorial|Another Concept Article|Another interesting Tutorial)


Supported Types

All of the following formats are supported by the viewer service. Some others like Microsoft Office files including MSG-formated e-mails are supported by the rendition service provided that it is installed and running.

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

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.

Image

Used component: Custom Angular Application with angular-x-image-viewer 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

Not supported file types are by default offered as a download.

Image (tiff/tif)

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 with ngx-json-viewer plugin.

Default component: Used component.

Mimetype: application/json 

E-Mails

Used component: eml files are parsed by mailparser., msg files are parsed by custom parser inspired by (msgreader)

Default component: Used component.

Mimetypes : message/rfc822 (eml)

Not supported file types are by default offered as a download.

...

), beginning with 2021 Winter Alpha2: application/vnd.ms-outlook (msg)

Markdown (text/markdown)

Used component: Custom React application with markdown-to-jsx plug-in. / Custom Angular application withshowdown plug-in.

Default component: Used component.

Mimetypesx-web-markdownmarkdown

Open Document Format

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)

Text (text/plain)

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

The ranging support provided by PDF.js is supported by yuuvis the Web-API Gateway as well.

Video

Used component:  By default video files are natively played by the browser with HTML5


Note
titleSearch Term Highlighting

The full-text search provided by yuuvis® Momentum is insensitive to diacritics whereas the VIEWER service's PDF preview is sensitive to diacritics. Thus, the found search term is not highlighted in the preview if it differs from the entered search term in diacritics.

Video

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

Default component: Used component.

Mimetypes: mpeg, mp4, ogg, webm

All played files are streamed to prevent unnecessary data downloads. The autoplay is set to false.

Zip

Used component: Native string rendering

Default component: Used component.

Mimetype: x-zip-compressed, zip

The content of the zip container is read and the name and paths are printed out.

...

string rendering

Default component: Used component.

Mimetype: x-zip-compressed, zip

The content of the zip container is read and the name and paths are printed out.

Customizing

The viewer service can be extended as described in this section.

Localization

The viewer service offers a few strings with information for your users. You can change these or add some more language strings by setting them up in the translation section of the plugin file that can be uploaded for use in the client.

Code Block
titleSetting the localization strings in the plugin file of the client
{ 
  "translations": {
    "en": {
       "yuv.viewer.not.authorized": "Not authorized to preview file.",
       "yuv.viewer.not.found": "File not found.",
       "yuv.viewer.not.supported": "Format not supported.",
       "yuv.viewer.not.supported.download.content": "Unable to display format. You can click this link to download the file."
    },
    "de": {
       "yuv.viewer.not.authorized": "Fehlende Authorisierung zur Anzeige der Datei.",
       "yuv.viewer.not.found": "Datei nicht gefunden.",
       "yuv.viewer.not.supported": "Dieses Format ist nicht unterstützt.",
       "yuv.viewer.not.supported.download.content": "Dieses Format kann nicht angezeigt werden. Ein Klick auf den Link lädt die Datei herunter."
    }
  }
}

For more information about the plugin capabilities see this documentation: Extending Clients with Plug-ins

Extending the Viewer Service

Note

Please note that this feature is currently for internal use only!

...

Outlook: We are working on a new customizing concept that allows us to extend the viewer service with additional components with building and deploying the viewer service itself.

The Viewer Service API

For the viewer to process 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 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.)

Custom

...

Viewer Configuration

The viewer service can be extended by adding a few lines to its configuration.

...

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

Summary

You were provided with an overview of the file types supported by the viewer service and its concept of extensibility.

...