From 136ed86afa245a7d5f5ac0b1d33e1314bcff765f Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Sat, 28 May 2022 01:16:27 -0400 Subject: [PATCH] player split --- NUXT/components/Player/captions.vue | 5 + NUXT/components/Player/controls.vue | 116 ---------- NUXT/components/Player/fullscreen.vue | 17 ++ NUXT/components/Player/index.vue | 320 +++----------------------- NUXT/components/Player/loop.vue | 5 + NUXT/components/Player/playpause.vue | 32 +++ NUXT/components/Player/quality.vue | 5 + NUXT/components/Player/seekbar.vue | 245 ++++++++++++++++++-- NUXT/components/Player/speed.vue | 5 + NUXT/components/Player/watchtime.vue | 31 +++ NUXT/pages/watch.vue | 1 + NUXT/plugins/vuetube.js | 14 +- 12 files changed, 373 insertions(+), 423 deletions(-) create mode 100644 NUXT/components/Player/captions.vue delete mode 100644 NUXT/components/Player/controls.vue create mode 100644 NUXT/components/Player/fullscreen.vue create mode 100644 NUXT/components/Player/loop.vue create mode 100644 NUXT/components/Player/playpause.vue create mode 100644 NUXT/components/Player/quality.vue create mode 100644 NUXT/components/Player/speed.vue create mode 100644 NUXT/components/Player/watchtime.vue diff --git a/NUXT/components/Player/captions.vue b/NUXT/components/Player/captions.vue new file mode 100644 index 0000000..962611c --- /dev/null +++ b/NUXT/components/Player/captions.vue @@ -0,0 +1,5 @@ + diff --git a/NUXT/components/Player/controls.vue b/NUXT/components/Player/controls.vue deleted file mode 100644 index 00b2318..0000000 --- a/NUXT/components/Player/controls.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - diff --git a/NUXT/components/Player/fullscreen.vue b/NUXT/components/Player/fullscreen.vue new file mode 100644 index 0000000..7ce07bf --- /dev/null +++ b/NUXT/components/Player/fullscreen.vue @@ -0,0 +1,17 @@ + + + diff --git a/NUXT/components/Player/index.vue b/NUXT/components/Player/index.vue index abc230d..60fe2a3 100644 --- a/NUXT/components/Player/index.vue +++ b/NUXT/components/Player/index.vue @@ -39,7 +39,7 @@ height: 100%; opacity: 0; " - @doubleclick.stop="$refs.player.currentTime -= $refs.player.duration / 10" + @dbclick.stop="$refs.player.currentTime -= $refs.player.duration / 10" > mdi-rewind @@ -55,7 +55,7 @@ height: 100%; opacity: 0; " - @doubleclick.stop="$refs.player.currentTime += $refs.player.duration / 10" + @dbclick.stop="$refs.player.currentTime += $refs.player.duration / 10" > mdi-fast-forward @@ -67,318 +67,68 @@ mdi-chevron-down - - mdi-sync - - - mdi-closed-caption-outline - + + mdi-close - - - + :video="$refs.player" + @close="controls = false" + /> -
- {{ watched }} - / {{ total }} -
- - - {{ - isFullscreen ? "mdi-fullscreen-exit" : "mdi-fullscreen" - }} - - -
-
+ diff --git a/NUXT/components/Player/quality.vue b/NUXT/components/Player/quality.vue new file mode 100644 index 0000000..7edf15a --- /dev/null +++ b/NUXT/components/Player/quality.vue @@ -0,0 +1,5 @@ + diff --git a/NUXT/components/Player/seekbar.vue b/NUXT/components/Player/seekbar.vue index 305c207..719f267 100644 --- a/NUXT/components/Player/seekbar.vue +++ b/NUXT/components/Player/seekbar.vue @@ -1,34 +1,243 @@ diff --git a/NUXT/components/Player/speed.vue b/NUXT/components/Player/speed.vue new file mode 100644 index 0000000..854ea72 --- /dev/null +++ b/NUXT/components/Player/speed.vue @@ -0,0 +1,5 @@ + diff --git a/NUXT/components/Player/watchtime.vue b/NUXT/components/Player/watchtime.vue new file mode 100644 index 0000000..9f0c7d5 --- /dev/null +++ b/NUXT/components/Player/watchtime.vue @@ -0,0 +1,31 @@ + + + diff --git a/NUXT/pages/watch.vue b/NUXT/pages/watch.vue index 7a7ed9f..df95a7d 100644 --- a/NUXT/pages/watch.vue +++ b/NUXT/pages/watch.vue @@ -51,6 +51,7 @@ :key="index" text fab + no-caps class="vertical-button mx-1" elevation="0" style="width: 4.2rem !important; height: 4.2rem !important" diff --git a/NUXT/plugins/vuetube.js b/NUXT/plugins/vuetube.js index 015eb44..fc2d008 100644 --- a/NUXT/plugins/vuetube.js +++ b/NUXT/plugins/vuetube.js @@ -143,12 +143,18 @@ const module = { let returntext = new String(); for (const i in levels) { - const num = levels[i].toString().length == 1 ? "0" + levels[i] : levels[i]; // If Number Is Single Digit, Add 0 In Front - + const num = + levels[i].toString().length == 1 ? "0" + levels[i] : levels[i]; // If Number Is Single Digit, Add 0 In Front returntext += ":" + num; } - while (returntext.startsWith(":00")) { returntext = returntext.substring(3); } // Remove Prepending 0s (eg. 00:00:00:01:00) - if (returntext.startsWith(":0")) { returntext = returntext.substring(2); } else { returntext = returntext.substring(1); } // Prevent Time Starting With 0 (eg. 01:00) + while (returntext.startsWith(":00")) { + returntext = returntext.substring(3); + } // Remove Prepending 0s (eg. 00:00:00:01:00) + if (returntext.startsWith(":0")) { + returntext = returntext.substring(2); + } else { + returntext = returntext.substring(1); + } // Prevent Time Starting With 0 (eg. 01:00) // console.log("Human Time:", returntext); return returntext; },