aboutsummaryrefslogtreecommitdiffstats
path: root/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md41
1 files changed, 39 insertions, 2 deletions
diff --git a/readme.md b/readme.md
index 6110b57a..c417c6cc 100644
--- a/readme.md
+++ b/readme.md
@@ -390,7 +390,7 @@ Note the single quotes encapsulating the JSON and double quotes on the object ke
<td><code>captions</code></td>
<td>Object</td>
<td>&mdash;</td>
- <td>One property <code>defaultActive</code> which toggles if captions should be on by default. The default value is <code>false</code>.</td>
+ <td>Two properties: <code>defaultActive</code> which toggles if captions should be on by default. The default value is <code>false</code>. The <code>selectedIndex</code> property sets the default starting index for the caption tracks.</td>
</tr>
<tr>
<td><code>fullscreen</code></td>
@@ -404,6 +404,18 @@ Note the single quotes encapsulating the JSON and double quotes on the object ke
<td>&mdash;</td>
<td>Two properties; <code>enabled</code> which toggles if local storage should be enabled (if the browser supports it). The default value is `true`. This enables storing user settings, currently it only stores volume but more will be added later. The second property <code>key</code> is the key used for the local storage. The default is <code>plyr_volume</code> until more settings are stored.</td>
</tr>
+ <tr>
+ <td><code>speeds</code></td>
+ <td>Array</td>
+ <td>[1.0, 1.5, 2.0, 0.5]</td>
+ <td>Playback speed list.</td>
+ </tr>
+ <tr>
+ <td><code>loops</code></td>
+ <td>Array</td>
+ <td>[Loop All, Loop in, Loop out, No Loop]</td>
+ <td>Playback loop list.</td>
+ </tr>
</tbody>
</table>
@@ -596,6 +608,11 @@ Here's a list of the methods supported:
<td>Toggles whether captions are enabled.</td>
</tr>
<tr>
+ <td><code>setCaptionIndex()</code></td>
+ <td>Number</td>
+ <td>Set the active track to the provided number. Index starts with 0.</td>
+ </tr>
+ <tr>
<td><code>toggleFullscreen()</code></td>
<td>Event</td>
<td>Toggles fullscreen. This can only be initiated by a user gesture due to browser security, i.e. a user event such as click.</td>
@@ -663,7 +680,12 @@ player.source({
srclang:'en',
src: '/path/to/captions.vtt',
default: true
- }]
+ }],
+ loopKeyEvents: {
+ toggleLoop: 76,
+ loopin: 73,
+ loopout: 79
+ }
});
```
@@ -979,6 +1001,21 @@ By default, a player will bind the following keyboard shortcuts when it has focu
<td>✔</td>
<td>Toggle captions</td>
</tr>
+ <tr>
+ <td><code>l</code></td>
+ <td></td>
+ <td>Toggle Loop All/No Loop</td>
+ </tr>
+ <tr>
+ <td><code>i</code></td>
+ <td></td>
+ <td>Set the start marker of the loop</td>
+ </tr>
+ <tr>
+ <td><code>o</code></td>
+ <td></td>
+ <td>Set the end marker of the loop</td>
+ </tr>
</tbody>
</table>