Forum Discussion
BrettAmstutz
7 days agoCommunity Member
Have Closed Captions generate as a variable
I am working on a project, where I have a character who is talking to the user and going into scenarios. Rather than create caption shapes and then typing all of the speaking points out and matching ...
Nedim
4 days agoCommunity Member
As Phil mentioned, the recommended approach is to create your own custom text variable in Storyline and then extract the captions directly from the caption container in real time as they appear.
At the moment, there isn’t a built-in Storyline variable that exposes caption text (as far as I know). However, you can ensure captions are enabled either through the player settings or by using a trigger such as “Set Player.DisplayCaptions to True” when the timeline starts.
From there, the remaining part can be handled with JavaScript. By observing the caption container in the DOM, you can capture the caption text whenever it appears or changes and pass it into a Storyline variable.
Here’s an example: