aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-06-02 15:00:35 +0700
committerFactiven <[email protected]>2023-06-02 15:00:35 +0700
commitc2d8edb3ead89f564adfdaa81c6fc76b556ee995 (patch)
tree272903ac0d73c617b1384878bd6eed51574d7997 /lib
parentUpdate [...info].js (diff)
downloadmoopa-c2d8edb3ead89f564adfdaa81c6fc76b556ee995.tar.xz
moopa-c2d8edb3ead89f564adfdaa81c6fc76b556ee995.zip
Added forward/backward button to player
Diffstat (limited to 'lib')
-rw-r--r--lib/Artplayer.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/Artplayer.js b/lib/Artplayer.js
index 64b5c4d..6e3123c 100644
--- a/lib/Artplayer.js
+++ b/lib/Artplayer.js
@@ -46,6 +46,26 @@ export default function Player({
autoOrientation: true,
pip: true,
theme: "#f97316",
+ controls: [
+ {
+ name: "fast-rewind",
+ position: "right",
+ html: '<svg class="hi-solid hi-rewind inline-block w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path d="M8.445 14.832A1 1 0 0010 14v-2.798l5.445 3.63A1 1 0 0017 14V6a1 1 0 00-1.555-.832L10 8.798V6a1 1 0 00-1.555-.832l-6 4a1 1 0 000 1.664l6 4z"/></svg>',
+ tooltip: "Backward 5s",
+ click: function () {
+ art.backward = 5;
+ },
+ },
+ {
+ name: "fast-forward",
+ position: "right",
+ html: '<svg class="hi-solid hi-fast-forward inline-block w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path d="M4.555 5.168A1 1 0 003 6v8a1 1 0 001.555.832L10 11.202V14a1 1 0 001.555.832l6-4a1 1 0 000-1.664l-6-4A1 1 0 0010 6v2.798l-5.445-3.63z"/></svg>',
+ tooltip: "Forward 5s",
+ click: function () {
+ art.forward = 5;
+ },
+ },
+ ],
settings: [
provider === "zoro" && {
html: "Subtitle",