diff --git a/README.md b/README.md index 85b9f71..2953534 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ By default, these buttons are hidden. If you want to show them, just add the `Sh ``` -**Settings Menu** - `SettingsMenu` +**Settings Menu** - `SettingsMenu` [``] @@ -211,6 +211,23 @@ If you need to add an addition attribute to either the video and/or audio source ``` +**Subtitles** - `Subtitles` [``] + +![Native HTML5 Subtitles (Firefox)](https://md.sudovanilla.org/images/subtitles-example-native-html5.png) + +To apply subtitles to the video player, add a slot for tracks and insert HTML5 [`textTracks`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/textTracks). Make sure to set the `label` and `srclang`. + +```jsx + + + + + + +``` + +When the `Subtitles` option is enabled, a subtitles button will appear automatically in the control on the right side and a menu will be generated for you. + **Milieu** - `Milieu` The Milieu option is an attempt to copy YouTube's ambient player feature. Where it adds a blurry glow around the player. This uses two ``s behind the player to make a smooth transition when it changes.