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:
- Moving
- Interactivity
- Scaling
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
Posting a video on stage
You can place a video file on stage in two ways:
- Drag a video file from the “Resources” tab onto the stage
- Add a “Video” object to the scene and then assign it a resource to play from the resource library
Setting up the “Video” object in the scene editor
- Video - the field for selecting a resource
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
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
Blockly
The main interaction with the video file takes place inside the built-in Blockly logic editor
The following block types are set for the object by default:
Action Blocks
This set of actions allows you to control the playback of the video file and includes:
- Playback
- Stopping playback
- Turning on pause during playback
- Restoring the original playback speed
- Rewind one second N
- Muting the sound
- Turning the sound on
Variables
Contains blocks that specify and return values of the following video file attributes:
- Scale
- Playback speed (0-10)
- Volume (0-1)
- Looping
- Playback on start
- Video Playback
- Whether it's playing
- Video duration in seconds
- Current time (in seconds)
Events
Event that is triggered when video playback ends