Configuration

A stream-enabled virtual environment is a collection of applications that either stream their contents or receive and display streams from other applications. Configuration is needed to connect these applications together. The configuration is successful when all the wanted streams in the streaming applications are received in the receiving applications.

Items to configure

Configure the items listed in the following sections for all the stream senders and receivers.

Sending applications

  • Set Stream ID for all the stream senders (Streaming Component or Streaming Kzb Player) so that the receiver finds the stream.

  • Define Port for all the stream sending applications so that the streams are reachable in the network.

  • To view a stream in a browser, you need to set the Web Resource Path for the sending application.

Receiving applications

Define the stream source for all the receiving nodes (ReceiverNode2D and ReceiverNode3D) so that they can connect to the correct stream.

  • Set Stream ID in Kanzi Studio.

  • Define Port and Host of the sender using one of the Configuration methods.

Configuration methods

Configure Kanzi VR applications with the following methods:

  1. Required properties of the Streaming Plugin in Kanzi Studio.

  2. Any of the following optional methods:

Virtual environment configuration file

It is recommended to configure the virtual environment using the configuration file described in this section: virtual_environment_configuration.yaml.

You need one configuration file for each computer that participates in the Kanzi VR streaming setup for each virtual environment. Place the file in the working directory of the processes that use it, for example start-virtual-environment.exe. See Starting stream-enabled virtual environments for the other possible processes.

The configuration file is used to:

  • List the processes to be started on the computer for the virtual environment.

    • Each “kzb” key corresponds to a process to start.

    • The list is used by start-virtual-environment.exe.

  • Introduce the streams for both the senders and receivers so that they can find the correct port and host for their stream IDs.

    • Each stream ID corresponds to a stream to establish.

    • The list is used by the Streaming Plugin processes that finds the configuration file from their working directory. See Starting stream-enabled virtual environments for the possible processes.

Example configuration file

# Defines the installation location of the resource files that are
# used when streaming to a web browser. The path can be absolute or relative to the
# configuration file.
# Optional.
webResourcePath: "${KANZI_VR_HOME}/plugins-streaming/streaming-web-resources"

# Introduces the virtual environment to be started.
# Optional.
virtual_environment:

  # Introduces the kzb file that contains the model of the virtual environment.
  # Set as <project_name>.kzb.cfg that lists all the kzb files used in the project.
  # If the project uses a single kzb file, you can point only to that kzb file.
  # Required.
  kzb: exampledashboard.kzb.cfg

  # Introduces additional paths to be used for searching binary dependencies.
  # Can contain either a single path or a list of paths that you want to add to
  # the PATH environment variable for the executable to be started. For example, use this
  # to load feature packs or plugins whose binaries are in a different directory.
  # Optional.
  # extraPath:
  # - "path/to/plugin1/lib/${PLATFORM_TARGET}/GL_vs2017_${BUILD_VARIANT}_DLL"
  # - "path/to/plugin2/lib/${PLATFORM_TARGET}/GL_vs2017_${BUILD_VARIANT}_DLL"

# Defines a list of streams configured by their individual properties.
# Required.
streams:

# Introduces the kzb file to be started for this stream.
# Required only if you are using start-virtual-environment.exe and want to
# start this kzb file in the Streaming Kzb Player on the local computer.
# Optional.
- kzb: ${KANZI_VR_HOME}/examples/StreamSenderExample/bin/streamsenderexample.kzb.cfg

  # Introduces either a single path or a list of paths that you want to add to
  # the PATH environment variable that is used for searching binary dependencies.
  # Works the same way as in virtual_environment.
  # Optional.
  # extraPath: "path/to/plugin3/lib/${PLATFORM_TARGET}/GL_vs2017_${BUILD_VARIANT}_DLL"

  # Defines a single stream ID or a list of stream IDs for which the host and port
  # are configured.
  # Required.
  streamId:
  - Cluster
  - HUD

  # Defines the host for the streams. The default value is localhost.
  # Optional.
  host: localhost

  # Defines the port for the streams.
  # Required.
  port: 9072

- kzb: "${KANZI_HOME}/Tutorials/First/Completed/Application/bin/first_application.kzb.cfg"
  streamId: IVI
  host: localhost
  port: 9073

Command-line arguments for the Streaming Kzb Player

start-virtual-environment.exe uses these command line arguments using the configuration from virtual_environment_configuration.yaml. You can configure these manually.

  • The port argument sets the port for this streaming application. Overrides the one defined in the kzb file.

    --port <number>
    
  • The streamId argument sets the stream ID for full-screen streaming that the Streaming Kzb Player sets up. Used only when the kzb file to be loaded does not refer to the Streaming Plugin.

    --streamId <text>
    

Kanzi Studio configuration properties for the Streaming Plugin

Required properties

Always use these properties:

  • The Stream ID property of the Streaming Component

  • The Stream ID property on ReceiverNode2D and ReceiverNode3D nodes

Optional properties

  • The Streaming Server Port property in the Screen node. You do not need to use this property when you use virtual_environment_configuration.yaml or command-line arguments for the Streaming Kzb Player.

  • The Web Resource Path property on the Screen node. You do not need to use this property when you stream to a Kanzi application or you are using virtual_environment_configuration.yaml.

  • The Port property in a ReceiverNode2D or ReceiverNode3D nodes. You do not need to use this property when you use virtual_environment_configuration.yaml.

  • The Host property in a ReceiverNode2D and ReceiverNode3D nodes. You do not need to use this property when you use virtual_environment_configuration.yaml or when all streaming applications are on the local computer.

  • Use the Configuration File Preferred property on Screen, ReceiverNode2D, and ReceiverNode3D nodes to indicate whether the properties of a node should be overridden by the values defined in virtual_environment_configuration.yaml. By default the property values are overridden.

See also

Starting stream-enabled virtual environments