Skip to content

Videobot Custom Trigger Documentation ​

Installation ​

There are a few options on how to include/import Videobot into your project:

CDN ​

html
<script src="https://embed-iframe.videobot.com/video-bot.js"></script>

<script>
  var videobot = new Videobot('#videobot', {...} );
</script>

NPM (to do) ​

bash
npm install videobot
js
// import Videobot
import Videobot from 'videobot';

// initialize Videobot
const videobot = new Videobot('#videobot', {...} );

Options ​

ParameterTypeDefaultDescription
iframeUrlstringnullVideobot URL (Required).
widgetComponentWidgetDefault | WidgetCustomWidgetCustomType of Videobot trigger button.
mobileBreakpointnumber768Mobile breakpoint value (in pixels).
autoopennumber0Time to autoopen Videobot (0 to disable).
zIndexnumber1000Videobot z-index property.
alignright | leftrightOpen Videobot position on the screen.
positionabsolute | fixedfixedVideobot trigger position type.
customPositionobjectnullCustom open video position on desktop (WidgetCustom only).
loopLimitstring15Chat icon video loop limit per session (WidgetDefault only).
colorstring#351DDAChat icon color accent (WidgetDefault only).
avatarVideostring | nullnullURL to video icon (WidgetDefault only).
avatarPosterstring | nullnullURL to image / video poster icon (WidgetDefault only).
labelstring | nullnullType of widget component (WidgetDefault only).

Examples ​

Custom Trigger ​

js
new Videobot('#custom-element', {
  iframeUrl: 'http://embed.videobot.com/?id=videobot',
  widgetComponent: 'WidgetCustom'
});

Default Trigger Aligned to the Left Side ​

js
new Videobot('#custom-element', {
  iframeUrl: 'http://embed.videobot.com/?id=videobot',
  widgetComponent: 'WidgetCustom'
});

Basic Styling for Custom Triggers ​

It’s recommended to add basic styling when using widgetComponent: 'WidgetCustom':

html
<link
  rel="stylesheet"
  href="https://embed-iframe.videobot.com/styles.css"
/>
js
import 'videobot/styles.css';

Initializing Videobot Without Setup ​

It is also possible to initialize Videobot without any setup by using the #video-bot object and proper attributes.

html
<div
  id="video-bot"
  data-url="https://embed.videobot.com/?id=videobot_demo"
  data-color="#351DDA"
  data-label="Aloita virtuaaliesittely"
  data-avatar-video="https://cloudflarestream.com/ecc2bad415c5796dfc104a53c43e927c/manifest/video.m3u8"
  data-avatar-poster="https://cloudflarestream.com/ecc2bad415c5796dfc104a53c43e927c/thumbnails/thumbnail.jpg?height=150&time=2s"
></div>