Adding Dynamic Text to Interactive Video

I have tried looking through the XAPI guide and this forum, so apologies if I missed the answer to this question already.

I have created interactive videos with button that work really well, but I would like to also add some text to the video at a certain point - for example "Hello Tony, thanks for completing the tutorial" and be able to replace Tony with either a passed variable, or dynamic field that I can send via the API.

Is this feature available?

Content types: 
otacke's picture


xAPI is a one way street that leads from the H5P content to the host platform.

If you want to dynamically change things, you'll have to do that by either changing the parameters that the content type gets initialized with before they are passed to the content type (would probably mean to patch the plugin) or you add some JavaScript into H5P's iframe (using the alter_scripts hook, see documentation for the respective plugin that you're using) that does this job after the content type was initialized by overwriting the parameters on the H5P.instance object.


There's no built-in way to do it. And as Otacke mentioned, maybe with computer programming.  But I would dissuade you from even trying. That personalized name thing "Hello, username, glad you're here!" was around 40 years ago with video arcade games, for instance, and it's not that impressive to the user. The built-in  'submit screen' gives the user info on how they did on the questions, which is probably the data the user is interested in previewing anyway.

Thanks alco, I appreciate the response.

I will look to see what I can do by altering the h5p_contents table, as that is where the text is stored. I can then create multiple versions of the video, personalised.

If you look at current trends, such as moovly, iDecide and others, you will see that personalised videos are actually a huge market trend right now, so I don't, respectfully, agree with your view that it is 40 years ago. Companies are spending huge amounts of money doing personalised sales & marketing videos to prospects - if we can achieve the same with h5p then it will save us circa $5k per annum in extra software spend.