Skip to content

isabella232/videojs-captions-toggle

 
 

Repository files navigation

Video.js Captions Toggle

A button that toggles captions for a specified language.

Getting Started

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.

Documentation

Plugin Options

You may pass in an options object to the plugin upon initialization. This object may contain any of the following properties:

language

Type: string Default: 'en'

The two-letter BCP-47 language code. The default specifies English captions to be used.

Release History

  • 0.1.0: Initial release

About

A button that toggles captions for a specified language.

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 91.3%
  • CSS 8.7%