Skip to main content
Skip table of contents

Configuration

Overall Hints

  • TurboPlayerService can start without defining the ParameterService

  • If the TurboPlayerService  is defined, a valid combination of ParameterService and ConfigurationName must exist in order to start TurboPlayerService  successfully

  • TurboPlayerService requires new version of DPE (DPE 2.7 from Release 2023.1.0 works but DPE 2.4 doesn't work.)

Service configurations

All service configurations are stored in the DigaSystem registry in the subkey "TurboPlayerService". Global, local and user registries can be used to store configuration. If the same parameters are store in different registries, they will be preferred to use in followed order

  • Global registry

  • Local registry (overwrite parameter values from global registry)

  • User registry (overwrite parameter values from global & local registries)

Logging

Service use two logs

  • Log service for all error & information messages

  • File log if the log service isn't available or logged message has log level "Debug", because of debug log level generate very large logs

If the log service isn't available, information about it will be logged by the file log. After the log service will be available again, information about it will be logged by the log service

DPE Log service

DPE Log service is used for all error  & information messages. If the service isn't available, then the file log will be used and information about it will be logged by file log. After the log service will be available again, information about it will be logged by the log service.

If the logged message has log level is "Debug", then only file log will be used, because of  debug log level generate very large logs. For all other messages (e.g. with log level "Error") DPE Log service will be used if it's available, otherwise file log.

File log

The file log is used for all messages with "Debug" log level and for all other messages (e.g. "with log level Error") if the DPE Log Service it's available.

If the DPE Log service isn't available, then the file log will be used and information about it will be logged by file log. After the log service will be available again, information about it will be logged by the log service.

Configuration files

Service uses two configuration files by initialization

  • log4net.config - this file contains configuration for the file-based logger. File-based logger is used if the Log service isn't available or specified log level creates too much log information

  • AppSettings.json - this file contains parameters to get access to the external services & configuration uses for the current service instance

log4net.config

This file  contains configuration for the file log. By default, file logs will be created in the subdirectory "log", split per 10 MB size files and formatted as "YYYY-MM-DD HH:MM:SS.sss LogLevel Message". E.g.

CODE
2022-04-14 12:18:58.144 INFO Application started

File logger has various parameters and can be strong customized.

See here information about configuration files
https://logging.apache.org/log4net/release/manual/configuration.html

See here configuration file examples
https://logging.apache.org/log4net/release/config-examples.html

appsettings.json

This file is the standard configuration file for .NET 6 Core applications. It may be case-insensitive on Windows depending on specific Windows configurations. As a standard configuration file, there are many .NET Core options which need or can be specified. Worth mentioning, the "AllowedHosts" is and needs to be configured in this file. (Typically, if no security worries, we can simply specify it as "*". For more, please check https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.hostfiltering.hostfilteringoptions.allowedhosts?view=aspnetcore-6.0 .)

This file also contains parameters to get access to the external services & configuration uses for the current service instance.

Configuration

Multiple configurations can be defined for the service, and one configuration must be specified to use. To specify configuration used for the current service instance, add the parameter "ConfigurationName" to the file appsettings.json. E.g.

JS
"ConfigurationName": "1-st Configuration"

External services

Parameter service

Service get access to the parameters stored in the DigaSystem registry via DPE Parameter service. All registries are read in followed sequence

  • Global registry

  • Local registry (overwrite parameters from global registry)

  • User registry (overwrite parameters from global & local registry)

To provide access to the Parameter service, add the configuration section "ParameterService" to the file appsettings.json. E.g.

JSON
"ParameterService": {
  "Host": "http://localhost/DpeWebApplication/",
  "Username": "",
  "Password": ""
}
Rights service

Service get access to the user rights via DPE Rights service. To provide access to the Rights service, add the configuration section "RightsService" to the file appsettings.json. E.g.

JSON
"RightsService": {
  "Host": "http://localhost/DpeWebApplication/",
  "Username": "",
  "Password": ""
}
Log service

The service uses the DPE Log service to log all errors. If the log service isn't available, the file log will be used. To provide access to the DPE Log service, add the configuration section "LogService" to the file appsettings.json. E.g.

JSON
"LogService": {
  "Host": "http://localhost/DpeWebApplication/",
  "Username": "",
  "Password": ""
}

DigaSystem registry subkeys and parameters

TurboPlayerService\ConfigurationName

Parameter name

Description

LogLevel

Determined how many details will be stored into log for this configuration. Only followed values can be specified, otherwise error occurred

  • Critical - only very important messages will be logged. Errors aren't included

  • Error - very important messages and all errors are logged

  • Warning - very important messages, errors and warnings are logged

  • Information - very important messages, errors, warnings and verbose messages (include HTTP & WebSocket API calls) are logged. Warning! This level can generate large log files. Enable it only if you want to log all API calls

  • Debug - all messages (included HTTP & WebSocket API calls) and special information for support are logged.  Warning! This level generate very large log files. Enable it only if it requested from support

Default value
Error

TurboPlayerService\ConfigurationName\Service

Parameter name

Description

InactivityMetadata

Max data lifetime (milliseconds) in the TurboPlayer Engine metadata cache. After this time, the data will be removed

Default value:
300000 (5 minutes)

InactivityTimeout

Closing WebSocket connection due to inactivity from client after timeout (milliseconds). Disabled if zero. If disabled, connection to the client will be closed only after closing event from WebSocket API

Default value:
900000 (15 minutes)

RightsCacheLifeTime

Max data lifetime (milliseconds) in the rights cache. After this time, the data will be required from the Rights Service again

Default value:
120000 (2 minutes)

SendNoPrelistenAudio

Indicates, is the service sending default audio file, if the prelisten audio file isn't available

  • True - service sending default audio file, if the prelisten audio file isn't available

  • False - service return error, if the prelisten audio file isn't available

Default value:
True

MaxGlobalDataModels

Maximum number of global data models can be created dynamically from all clients. Data models from service configuration are not counted to this limit

Default value - 50

MaxLocalDataModelsPerClient

Maximum number of local data models can be created dynamically by every client separately

Default value - 20

KeywordPrefix

Prefix for keywords used in the data model markup language

Default value - _$_

KeywordPostfix

Postfix for keywords used in the data model markup language

Default value - _$_

TurboPlayerService\ConfigurationName\TurboPlayer

Parameter name

Description

GuiNumber

Number of GUI related to the configuration. GUI No. of TurboPlayer (Settings/"the GUI number") must be the same as this value. Every configuration can be related to the one GUI only

ReadOnly

  • True - configured GUI can be used only in read mode. Any requests with changes will be rejected

  • False - clients can perform changes in GUI, but some requests can be rejected dependent on the user rights. Only one client at any time can be authenticated in non-read only mode, and unlimited clients can be authenticated in read-only mode.

Default value:
True

CommunicationType

  • MMF - service establish connection to the TurboPlayer Engine via MMF

  • IP - service establish connection to the TurboPlayer Engine via IP

EngineAddress

Used only with communication type "IP"
IP address or resolvable name of the TurboPlayer engine

TreeManagerPortRange

Used only with communication type "IP"
Port range for Tree Manager as Low-High

Default value:
9991-9999

RundownKernelPortRange

Used only with communication type "IP"
Port range for Rundown Kernel as Low-High

Default value:
9981-9989

Timeout

TurboPlayer Engine connection & request timeout (milliseconds)

Default value:

10000 (10 seconds)

UseGlobalNamespaceForMMF

Used only with communication type "MMF"

  • True - MMF will be created in the global (kernel) namespace.

  • False - MMF should be created in the local namespace.

Default value:
False

TurboPlayerService\ConfigurationName\DataModel

Parameter name

Description

Model0

Mdoel1

...

ModelN

Contains one data-model used for subscription to the changes. Data model can be configured as

  • Path to the file with the data model. E.g. D:\DataModels\ElementStarted.json

  • Data model source code in JSON. E.g. 

    JSON
    {
      "DataModel": "NextPlayItem",
      "Type": "partial/notification",
      "TransactionId": "",
      "Code": 0,
      "Description": "",
      "Data": {
        "NextPlayItem": {
          "_$_Fields_$_": [
            {
              "Source": "Metadata",
              "Name": null,
              "FieldName": "ItemId",
              "Format": "Text",
              "SendAlways": true
            }
          ],
          "_$_Conditions_$_": [
            {
              "Source": "Metadata",
              "FieldName": "NextPlayItem",
              "ValueSource": "Constant",
              "Value": true,
              "Format": "Boolean",
              "Condition": "Equal",
              "CaseSensitive": false
            }
          ]
        }
      }
    }

User rights

To perform some request's client must authenticate under a user account with specific rights, defined in DigaSystem registry

Request

Required right name

Reload service settings

TurboPlayerServiceReloadSettings

Create local data model (see TurboPlayer Service SDK data model for details)

TurboPlayerServiceCreateLocalDataModel

Create global data model (see TurboPlayer Service SDK data model for details)

TurboPlayerServiceCreateGlobalDataModel

Update global data model (see TurboPlayer Service SDK data model for details)

TurboPlayerServiceUpdateGlobalDataModel

Delete global data model (see TurboPlayer Service SDK data model for details)

TurboPlayerServiceDeleteGlobalDataModel

Select jingle group

TurboPlayerServiceSelectJingleGroup

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.