A button that toggles captions for a specified language.
Once you've added the plugin script to your page, you can use it with any video:
<link href="videojs-captions-toggle.css" rel="stylesheet">
<script src="video.js"></script>
<script src="videojs-captions-toggle.js"></script>
<script>
videojs(document.querySelector('video')).captionsToggle();
</script>
There's also a working example of the plugin you can check out if you're having trouble.
You may pass in an options object to the plugin upon initialization. This object may contain any of the following properties:
Type: string
Default: 'en'
The two-letter BCP-47 language code. The default specifies English captions to be used.
- 0.1.0: Initial release