Skip to main content

video

video — use this tag to add video files to bot replies.

Value

A link to the video file is specified after the tag.

Parameters

  • name (string) — video file name. An optional parameter.
caution
Each channel has its own restrictions on video files that can be uploaded, for example, on the playback duration or size. Make sure your file complies with all the channel requirements.

How to use

state: Start
q!: $regex</start>
a: Hi! Do you want to see a funny video?

state: Yes
q!: Yes
random:
video: https://example.com/video1.mp4
video: https://example.com/video2.mp4 || name = Funny-video // This is a video file with a title

state: No
q!: No
a: Whatever.

After executing random, the bot sends one of the two video files.

You can use the <responseData> tag for testing. For example:

<test>
<test-case>
<state>Start</state>
<q>Yes</q>
<responseData field="replies[0]">
{
"type": "video",
"videoUrl": "https://example.com/video1.mp4",
"state": "/Start/Yes"
}
</responseData>
</test-case>

<test-case>
<state>Start</state>
<q>No</q>
<a>Whatever.</a>
</test-case>
</test>

Here are two test cases:

  1. Checks whether the bot switches to the Yes state and the video tag works.
  2. Checks whether the bot switches to the No state.