6 Replies
Melissa Milloway

For anyone looking to add Closed Captions after publishing you can do it with this code. You will need to inspect the video element in your console to grab the video's ID or you can alter the code to do it another way.

 Add the code to your published file at the top of the index.html page. After the following tags: 
<script type="text/javascript" src="tc-config.js"></script>
<script type="text/javascript" src="lib/tincan.js"></script>
<script type="text/javascript" src="lib/lms.js"></script>

<script>

setTimeout(function() {

var videoScript = '<track id="enTrack" src="PUT YOUR CAPTION SOURCE FILE URL HERE" label="English" kind="subtitles" srclang="en" default="">'; //replace the src with your caption location
document.getElementById("PUT THE VIDEO'S ID HERE").innerHTML = videoScript; //replace the element ID with whatever your video's element ID is

}, 1000);

</script>
Patricia Raymond

So excited that this is available now!!! Thank you thank you thank you!

Patty Raymond
Technical Curriculum Developer, Training & Certification
e: patray@amazon.com
Free serverless training:
Internal link to Architecting Serverless Solutions
External link

[cid:image001.png@01D32C71.1BB35320]

[/Users/thkll/Library/Containers/com.microsoft.Outlook/Data/Library/Caches/Signatures/signature