Call to Action
Last updated
Last updated
Our CtA (Call-to-Action) interface is an amazing tool to create interactive videos for marketing, quizzing, shopping and everything else you can imagine.
The CtA interface creates a bridge between the player and your frontend. You only have to define the Call-to-Action element by using JavaScript’s native object and HTML.
The Call-to-Action element is configured with the following parameters (JavaScript native object):
time
Integer
The position (in seconds) of the audio/video playback when the CtA should start
html
String
The html you want to place. Please read the description below carefully.
btnCallback
Function
This parameter is optional. If you use forms or inputs in the CtA element, you will receive them in the function you define or reference.
skippable
Boolean
If true, the CtA can be skipped.
autoplay
Boolean
If false, the CtA element is only displayed when triggered manually.
In this example we create a CtA with a form for subscribing to a newsletter. To receive the e-mail address from the user, you have to create an input field for the address: <input required id="email" placeholder="e-mail address" type="email"/>
and a buttonElement: <button ctacallback resume>Subscribe</button>
.
The attribute ctacallback
means that when the button is pressed, the btnCallback
function is triggered. resume
says that the video is now continuing. For example, if you want to intercept a failure scenario or use a multi-level Call-to-Action element for quizzing, you can use another attribute of next = '1'
(1 being the ID of the CtA) to call that element.
If the CtA element is not skippable (skippable:false
), the playback is blocked while the CtA element is being displayed as long the CtA element is not submitted.
The example above provides the following data
during the btnCallback
:
The ctaId
key is the identifier which CtA element is used.
As described above, you can also create multi-level CtA. Below you find a simple quizzing:
callcta
Integer
callctaObject
CtA Object
closecta
cta.displaying
cta.closed