Video

A standard Varwin object used to configure video files. Additionally, it has a switchable control panel for video playback. The object has the following behavior:

After importing a video file into the platform resources, it will appear in the Desktop editor in the “Resources” tab. Learn more about downloading resources

../../_images/image-video-1.png

Posting a video on stage

You can place a video file on stage in two ways:

  1. Drag a video file from the “Resources” tab onto the stage
../../_images/image-video-2.gif
  1. Add a “Video” object to the scene and then assign it a resource to play from the resource library
../../_images/image-video-3.gif

Setting up the “Video” object in the scene editor

Video

../../_images/image-video-4.png
  • Video - the field for selecting a resource

Note

supported formats: mp4, mov, webm, wmv

  • Scale - scales the video file. Performs the function of the standard scaling
  • Playback Speed (0-10) - Sets the video file speed between 0 and 10, where 0 is not playing, 1 is playing the file at the original speed, 10 is the maximum speed
  • Volume [0-1] - Set the volume of the video file from 0 to 1, where 0 is silent, 1 is maximum volume

Note

The parameter supports input of fractional numbers in x.y format

  • Mute - mutes the playback of the video file in the scene
  • Loop - repeatedly plays the video file after its completion
  • Play on start - starts the video file right after the scene is initialized
  • “Play” button - to listen to the video file in the editor
  • “Stop” button - to stop listening to the video file in the editor
  • “Load Video” button - loads the resource (if it is selected for this object) and shows a preview in the editor. Initially, the resources are not shown to reduce the load on your PC
  • “Unload Video” button - unloads the resource (if it is selected for this object) and hides the preview in the scene, leaving a white screen

Interface

  • Turn off UI player - turns off the interactive player that controls video file playback
  • Tilt angle of player - changes the angle at which the user sees the control panel in the sphere
  • Speed of following the user - regulates the speed of the control interface movement behind the user’s field of view, if the user starts turning his head
  • Closing time at inactivity - time of hiding the interactive player if the user does not interact with the video screen. The parameter is measured in seconds

Blockly

The main interaction with the video file takes place inside the built-in Blockly logic editor

The default block types for the object are as follows:

Logic

../../_images/image-video-5.png
  • Video playing/paused/stopped/loading - a block that is embedded in the logical construction and is involved in checking the current status of the video file

Actions

../../_images/image-video-6.png

This set of actions allows you to control video file playback:

  • Play/Pause/Stop - a block that allows you to control video file playback
  • Rewind to X seconds - set the playback time to the specified
  • Download/download video:
    • loads the resource (if it is selected for this object) and shows a preview on the screen after you start the project. Initially, the resources are not shown to reduce the load on your PC
    • unloads the resource (if it is selected for this object) and hides the preview from the sphere in the project, leaving a white screen
  • Display/hide player - displays or hides the interactive player

Variables

../../_images/image-video-7.png

Contains blocks that specify and return values of the following video file attributes:

  • Scale - scales the video file. Performs the function of the standard scaling
  • Playback speed [0-10]
  • Volume [0-1]
  • Cycled/non-cycled playback is a parameter that allows you to repeat the video file after it ends
  • Video duration in seconds
  • Current time - get the current time value

Events

../../_images/image-video-8.png
  • Playback completed - Event triggered when the video ends
  • Close Button Pressed - Event triggered when the close button on the playback control panel is pressed