User Tools

Site Tools


Sidebar

editor:blocks:2d-models:video

Video

The Video command let you play cutscenes videos or video overlays effects inside your game.
In order to use the video block, drag it from the 2D Models → Video into the workflow area and set the Video URL parameter.
The Video URL parameter can be a youtube URL that is not protected or any MP4 file URL on the internet.
Cyberix3D doesn't store the video files on its servers and the video will be available only online in the Web / EXE / Android versions.
The video will always play at full-screen above the game and you can determine if there will be a skip button for skipping the video.
In order to use the video as an overlay effect, you can set the alpha parameter to 0.25 (or something else) and you will see your game while the video is playing.
The video will not interrupt the game and you can continue playing while the video is playing.
When you are using the video as an overlay effect, we recommend hiding the Skip button by set the Show skip button parameter to 0.

You can also control the Video Player by using the Set command,
By dragging the VariablesSet command into the workflow area and set the Var parameter to some variable under the VideoPlayer class.

Performance Issues

There might be loading performance issues, especially with the Youtube video URLs.
To overcome the problem, when you are using the Video command, the video prebuffered automatically when the game loads,
So if you need to play the video in the middle of your game there shouldn't be a problem.
The disadvantage of using the Set command to control the Video Player is that the video will not be prebuffered and this could lead to slow loading video.

Examples

Parameters

  • On Video Start - A function parameter that will run automaticly when the video starts playing.
  • On Video End - A function parameter that will run automaticly when the video ends.
  • On Video Repeat - A function parameter that will run automaticly when the video repeats.
  • On Video Skipped - A function parameter that will run automaticly when the video skipped.
  • Video URL - The URL address for the video. It can be a Youtube video URL that is not protected or any MP4 file URL on the internet. The Supported video formats are MP4, M4V, F4V, 3GPP, FLV. Here is an example for a Youtube video URL. Here is an example for an MP4 video URL.
  • Visible - Set the Video Player visibility: 0 - Hide the Video Player. 1 - Show the Video Player. When you set the Visible to 0 the video will stop playing automatically. The default value is 1.
  • Play - Play or pause the video: 0 - Pause the video. 1 - Play the video. The default value is 1.
  • Repeat - Set the video repeat parameter: 0 - Don't repeat the video when it ends. 1 - Repat the video. The default value is 0.
  • Auto Play - Set the video autoplay parameter: 0 - Don't play the video automatically. 1 - Play the video automatically. The default value is 1.
  • Duration - The duration of the video in seconds. This is a read-only parameter.
  • Time - Get or set the current video time in seconds.
  • Volume - Set the video volume between 0 to 1 (0.5 for example). The default value is 1.
  • Alpha - Set the video transparency between 0 to 1. The default value is 1.
  • Show Skip Button - Show a skip button: 0 - Don't show a skip button. 1 - Show a skip button to skip the video. The default value is 1.
  • Skip Button Label - The skip button text. The default value is “Skip”.
  • Skip Button Font Size - The skip button font size. The default value is 20.
  • Skip Button Position - The skip button position on the screen. It can be Top Left, Top Right, Bottom Left, Bottom Right or Center. The default value is Bottom Right.
  • Skip Button Roundness - Sets the skip button corners roundness between 0-50. The default value is 10.

MORE INFORMATION