The Mosaic over-the-top (OTT) template offers you all the fundamental functionality to manage your media metadata, orchestrate the video and image ingest, and deliver your content to end-user devices. Take control of your digital supply chain with a centralized hub for ingesting, managing, packaging, securing, and publishing all types of digital assets and services. The OTT template comes in full source code. It can be freely adjusted to cater to your specific business needs.
The template consists of two services:
The Media Service is responsible for managing all the media metadata, orchestrating the metadata ingest, video and image asset ingest, and publishing the metadata. The service integrates into the Mosaic encoding and image services.
The Catalog Service is responsible for making the published metadata available to the end-user apps.
The OTT template allows you to manage (and customize) the following media entity types:
The Movie entity: the movie encapsulates its own metadata properties (e.g. title, original title, synopsis, description, studio, release date, etc.) as well as the related metadata (tags, cast, movie genres, and production countries). It allows you to manage different licenses - during which time should the movie be available in which countries.
A movie references the main video from the Mosaic encoding service as well as trailer videos. To nicely display the movie in the end-user apps, it references a cover and a teaser image from the Mosaic image service.
The TV Show entity: a TV Show is divided into seasons that contain the episodes of that TV Show. All three have metadata structure and related metadata similar to the movie (seasons and episodes have an additional index property). The licenses are managed in the same way. All three entity types can also have a cover and a teaser image as well as trailers. Only the episodes can have a main video.
The Collection entity: this entity allows grouping other entities together. This can be used to display entities in a defined sort order in end-user apps. Again, collections have a metadata structure and related metadata similar to the movie. Collections can have a cover image. However, they don’t have licenses or associated main/trailer videos.
All the entities can be created, updated, and deleted using the UI workflows. Another option is to use the ingest to automate the metadata update and orchestrate the import of videos and images for those entities.
The above-mentioned entities can be published to the catalog service once the media editor is happy with the state of some entity. The publishing format is defined between the catalog and the media service. During publishing, the media service gathers all the required data from its metadata store and the related services (e.g. the image and video service). The data is then validated, checking whether all the mandatory fields are set. Next, the publishing metadata is sent through the message bus.
Developing a high-performance and scalable OTT solution involves many services. The Axinom Mosaic platform provides you with Managed Services that automatically scale with your success.
In a growing market, we understand the need for constant innovation. Hence, the Mosaic framework grows with your requirements. It not only meets your need for extension but also allows for bespoke and customized development.
The following diagram gives you an overview of the Axinom provided services (dark blue) and the Customizable Services (light blue) that are partially already part of the OTT template.
The context view of the OTT Media template system and the services it directly interacts with and the involved persons is displayed below.
The OTT template solution structure follows the general Mosaic approach. It is a folder structure that is optimized to work with the suggested tools, such as Visual Studio Code (vscode), ESLint, Prettier, and so on.
package.jsonfiles are located on the root level. The readme contains all the setup instructions, while the package file contains a lot of useful scripts. Those two files should be your starting points. The other files on the root level are for the development experience (editor config, ESLint, and Prettier) as well as GIT, NPM, ENV, docker, and JEST-specific configuration/ignore files. All the files contain the default values of Mosaic but can be adjusted to your preferences.
.vscodefolder contains settings files that help your development experience while using vscode. It contains our suggested settings and extensions. Moreover, it contains a file that helps in writing SQL migrations with code snippets.
infrafolder contains a docker-compose file to set up the local development resources.
The folders where you will likely spend most of your time customizing the solution to your needs are: the
libsfolder contains all the libraries that are used in the OTT template. For now, this is the
media-messageslibrary that defines JSON schema files for sending messages through the message bus.
servicesfolder contains the different services of the OTT template. There is the
mediaservice folder which contains the (backend)
serviceand the (frontend)
workflows. And it contains the
catalogservice folder which contains only the (backend)
service. The catalog service does not contain any workflows as there is no need to integrate this service into the Management System. Consumers of that service would be the different end-user applications (web apps, mobile apps, TV apps, etc.).
The media service and the media messaging library are described in more detail in the OTT media service overview documentation. The catalog service is documented with further details in the OTT catalog service overview.
For unit tests, the solution uses Jest. Unit
testing files are suffixed with
.spec.ts and reside most of the time
alongside the tested logic. When testing database-specific logic, you can
suffix your unit testing files with
.db.spec.ts. This will create a
completely independent database for every test file, so parallel
unit-test executions will not cause side effects.