Template Modes
  • 15 Oct 2024
  • 1 読む分

Template Modes


The content is currently unavailable in Ja - 日本語. You are viewing the default English version.
記事の要約

The usual purpose of a template is to show some dynamic content on a player/display, as part of a channel and playlist.

However, in the life cycle of template-based content, there are a number of different cases where the template is called to action. In most cases, the template does not need to worry about which mode it is being invoked, but if it wants to adapt its behavior it may query the DataHelper getter player.viewMode to find out. Note that this is not a pure value returned from the Player, but a property which determines the “view mode“ programmatically.

View Mode

Description

local

Standard playback in full-fledged Dise Player.

edit

Preview in CMS while user is creating/editing content.

preview

Preview of single content object or playlist in CMS.

server

Preview of player/display in CMS or running in "Web mode" on a SOC-device.

thumb

Thumbnail generation.

debug

Playback in PlayerSimulator during development.

Note that these values are the internal-values of the enum ViewMode, which is defined like this:

export const enum ViewMode {
    Edit = 'edit',
    Preview = 'preview',
    LocalChannel = 'local',
    WebChannel = 'server',
    Debug = 'debug',
    Thumbnail = 'thumb',
}

Hence, you should use e.g. Dise.ViewMode.Thumbnail for comparison and not rely on the value.


この記事は役に立ちましたか?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.