Enabling streaming

A streaming application is an application that streams its contents to virtual environments using Kanzi VR and the Streaming Plugin. A common use case for streaming applications is to enable streaming for already existing content that you want to see in a virtual environment.

Stream sources

Kanzi VR supports the following stream sources:

  • A kzb file run by the Streaming Kzb Player.

    Use this streaming source when you have a Kanzi Studio project and a kzb file and no specific application is required for running the kzb file. This means that all the logic is contained in the Kanzi Studio project, plugins it refers to, or in code-behind modules.

  • A Kanzi application that loads a kzb file that uses the Streaming Plugin.

    Use this streaming source when custom application code is needed for displaying the streamed content.

  • A Kanzi VR Android Streaming application.

    Use this streaming source when you want to stream the contents of the whole screen of an Android device. This case is suitable when the streamed application relies on the Android platform or is partially or fully authored without Kanzi. A common example of this is an IVI screen created using native Android UI framework combined with Kanzi views for rich graphics.

    To learn how to use Android streaming, see Android streaming.

Enabling streaming for a kzb file

To enable streaming for a kzb file use one of these approaches:

  • Run the unmodified kzb file with the Streaming Kzb Player.

    Use this approach when you want to stream the full screen of existing content.

    Streaming Kzb Player sets up full screen streaming for kzb files that do not refer to the Streaming Plugin and acts like the Kzb Player in other cases.

    To learn how to use Streaming Kzb Player, see Starting all virtual environment processes.

  • Configure streaming using the Streaming Plugin in a Kanzi Studio project.

    Use this approach when you want to see parts of the content of the kzb file on different screens in the virtual environment.

    To learn how to create content using the Streaming Plugin in Kanzi Studio, see Enabling streaming using the Streaming Plugin in Kanzi Studio.

Enabling streaming using the Streaming Plugin in Kanzi Studio

To enable streaming using the Streaming Plugin in Kanzi Studio:

  1. In Kanzi Studio open a project or create a new project.

  2. Import the Streaming Plugin to enable creation of Streaming Components.

    1. In the Library right-click Kanzi Engine Plugins and select Import Kanzi Engine Plugin.

      ../_images/import-kanzi-engine-plugin.png
    2. In the Kanzi VR feature pack directory go to the plugins-streaming\lib\Win64 directory, select the plugin in the directory of the configuration that you selected in the first step, and select Open.

      For example, select GL_vs2017_Release_DLL\KanziStreaming.dll.

      Kanzi Studio imports the Streaming Plugin to your Kanzi Studio project and brings node types to the project, such as ReceiverNode3D and ReceiverNode2D, and the Streaming Component node component type.

  3. For content that you want to stream to a virtual environment:

    1. In Node Components create a Streaming Component for the root node of the part that you want to stream.

      ../_images/new_streaming_component.png
    2. Set the StreamId property of the Streaming Component.

  4. Set Streaming Server Port to Screen.

    When you use more than one stream in a Kanzi Studio project, all streams share the same port, but each uses a different Stream ID. See Configuration.

To run kzb files created in this way, you can use the Kzb Player that comes with Kanzi. However, the Streaming Kzb Player is recommended because of its better interoperability with Configuration.

Enabling streaming in custom Kanzi applications

To enable streaming for custom Kanzi applications, see Enabling streaming using the Streaming Plugin in Kanzi Studio. Then load the modified kzb file to your Kanzi application.

See also

Starting stream-enabled virtual environments