Skip to content

Commit

Permalink
Added rewind and forward button
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhinpal committed Apr 10, 2022
1 parent fe36e99 commit 3bfd67e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This project is made possible with [Plyr](https://github.com/sampotts/plyr), [Hl
1. Put the tplayer.js script tag in the `<head>` of your HTML document.

```html
<script src="https://cdn.jsdelivr.net/npm/tplayer.js@1.0.7/dist/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tplayer.js@1.0.9/dist/index.js"></script>
```

2. Put the video element in the `<body>` of your HTML document.
Expand Down
2 changes: 1 addition & 1 deletion example/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Player</title>
<!-- <script src="https://cdn.jsdelivr.net/npm/tplayer.js@1.0.7/dist/index.js"></script> -->
<!-- <script src="https://cdn.jsdelivr.net/npm/tplayer.js@1.0.9/dist/index.js"></script> -->
<script src="/dist/index.js"></script>
</head>
<body>
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tplayer.js",
"version": "1.0.8",
"version": "1.0.9",
"description": "Flexible and easy Dash/HLS/DRM integration for HTML5 video.",
"main": "index.js",
"scripts": {
Expand Down
13 changes: 13 additions & 0 deletions src/helpers/plyrOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ export default function plyrOptions(configs) {
invertTime: true,
seekTime: 10,
storage: { enabled: true, key: "tplayerjs" },
controls: [
"play-large", // The large play button in the center
"rewind", // Rewind by the seek time (default 10 seconds)
"play", // Play/pause playback
"fast-forward", // Fast forward by the seek time (default 10 seconds)
"progress", // The progress bar and scrubber for playback and buffering
"current-time", // The current time of playback
"mute", // Toggle mute
"volume", // Volume control
"captions", // Toggle captions
"settings", // Settings menu
"fullscreen", // Toggle fullscreen
],
};

return options;
Expand Down

0 comments on commit 3bfd67e

Please sign in to comment.