From 16799a5ed527a59ea1dd75d3f1bf98e2ed614333 Mon Sep 17 00:00:00 2001 From: Kenny <27463495+Frontesque@users.noreply.github.com> Date: Sun, 29 May 2022 22:50:44 -0400 Subject: [PATCH 01/35] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20human=20time?= =?UTF-8?q?=20seconds=20readout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NUXT/plugins/vuetube.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/NUXT/plugins/vuetube.js b/NUXT/plugins/vuetube.js index fc2d008..4558596 100644 --- a/NUXT/plugins/vuetube.js +++ b/NUXT/plugins/vuetube.js @@ -155,7 +155,14 @@ const module = { } else { returntext = returntext.substring(1); } // Prevent Time Starting With 0 (eg. 01:00) - // console.log("Human Time:", returntext); + + if (!returntext.includes(":")) { + if (returntext.length == 1) { + returntext = "0" + returntext; // Make tens digit in seconds always visible (eg. 0:09) + } + returntext = "0:" + returntext; // Make minutes visible as 0 when sub 60 seconds (eg. 0:51) + } + return returntext; }, //--- End Convert Time To Human Readable String ---// From 1817a125c01acfc5a15c4be547edb441daf781aa Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 30 May 2022 17:56:23 +1200 Subject: [PATCH 02/35] perf: optimized humanTime humanTime function improved with a 15% increase in performance. --- NUXT/plugins/vuetube.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/NUXT/plugins/vuetube.js b/NUXT/plugins/vuetube.js index 7b88809..018ef5b 100644 --- a/NUXT/plugins/vuetube.js +++ b/NUXT/plugins/vuetube.js @@ -134,21 +134,21 @@ const module = { humanTime(seconds = 0) { seconds = Math.floor(seconds); // Not doing this seems to break the calculation let levels = [ - Math.floor(seconds / 31536000), //Years - Math.floor((seconds % 31536000) / 86400), //Days - Math.floor(((seconds % 31536000) % 86400) / 3600), //Hours + Math.floor(seconds / 31536000) || null, //Years + Math.floor((seconds % 31536000) / 86400) || null, //Days + Math.floor(((seconds % 31536000) % 86400) / 3600) || null, //Hours Math.floor((((seconds % 31536000) % 86400) % 3600) / 60), //Minutes - (((seconds % 31536000) % 86400) % 3600) % 60, //Seconds + Math.floor((((seconds % 31536000) % 86400) % 3600) % 60), //Seconds ]; + levels = levels.filter((level) => level !== null); - 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 - - returntext += ":" + num; + for (let i = 1; i < levels.length; i++) { + levels[i] = levels[i].toString().padStart(2, "0"); } - 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) + + // join the array into a string with : as a separator + const returntext = levels.join(":"); + console.log("Human Time:", returntext); return returntext; }, From b6666b3b81a253a4cbd4219f36877280a8f904b2 Mon Sep 17 00:00:00 2001 From: Front <27463495+Frontesque@users.noreply.github.com> Date: Mon, 30 May 2022 13:54:29 -0400 Subject: [PATCH 03/35] feat: :sparkles: stage 1 | plugins --- NUXT/pages/mods/plugins.vue | 8 +- NUXT/pages/settings.vue | 4 +- NUXT/plugins/constants.js | 1 + NUXT/plugins/tempPlugins/demoPlugin.js | 2 +- NUXT/plugins/thirdPartyPluginLoader.js | 29 ++---- android/app/src/main/res/xml/config.xml | 4 - .../screenorientation/CDVOrientation.java | 98 ------------------- ios/App/App/config.xml | 4 - ios/App/Podfile | 23 +++-- 9 files changed, 27 insertions(+), 146 deletions(-) delete mode 100644 android/capacitor-cordova-android-plugins/src/main/java/cordova/plugins/screenorientation/CDVOrientation.java diff --git a/NUXT/pages/mods/plugins.vue b/NUXT/pages/mods/plugins.vue index f4ed81f..8ed13e6 100644 --- a/NUXT/pages/mods/plugins.vue +++ b/NUXT/pages/mods/plugins.vue @@ -1,5 +1,11 @@ @@ -176,8 +177,10 @@ import captions from "~/components/Player/captions.vue"; import playpause from "~/components/Player/playpause.vue"; import watchtime from "~/components/Player/watchtime.vue"; import fullscreen from "~/components/Player/fullscreen.vue"; +import sponsorblock from "~/components/Player/sponsorblock.vue"; export default { components: { + sponsorblock, fullscreen, watchtime, playpause, @@ -213,21 +216,6 @@ export default { this.vidSrc = this.sources[this.sources.length - 1].url; // TODO: detect orientation change and enter fullscreen // TODO: detect video loading state and send this.loading to play button :loading = loading - - - this.$youtube.getSponsorBlock(this.$route.query.v, (data) => { - sponsorBlock = data.segment; - }); - - this.$refs.player.ontimeupdate = () => { - let vidTime = this.$refs.player.currentTime; - for (let i = 0; i < sponsorBlock.length; i++) { - if (vidTime > sponsorBlock[i][0] && vidTime < sponsorBlock[0][i]) { - this.$refs.player.currentTime = sponsorBlock[i][0]; - break; - } - } - } }, beforeDestroy() { if (this.isFullscreen) this.exitFullscreen(); diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue new file mode 100644 index 0000000..a300eb2 --- /dev/null +++ b/NUXT/components/Player/sponsorblock.vue @@ -0,0 +1,43 @@ + + + diff --git a/NUXT/plugins/vuetube.js b/NUXT/plugins/vuetube.js index 018ef5b..36437f5 100644 --- a/NUXT/plugins/vuetube.js +++ b/NUXT/plugins/vuetube.js @@ -149,7 +149,7 @@ const module = { // join the array into a string with : as a separator const returntext = levels.join(":"); - console.log("Human Time:", returntext); + // console.log("Human Time:", returntext); return returntext; }, //--- End Convert Time To Human Readable String ---// diff --git a/android/app/src/main/res/xml/config.xml b/android/app/src/main/res/xml/config.xml index 1b1b0e0..0886a47 100644 --- a/android/app/src/main/res/xml/config.xml +++ b/android/app/src/main/res/xml/config.xml @@ -2,5 +2,9 @@ + + + + \ No newline at end of file diff --git a/android/capacitor-cordova-android-plugins/src/main/java/cordova/plugins/screenorientation/CDVOrientation.java b/android/capacitor-cordova-android-plugins/src/main/java/cordova/plugins/screenorientation/CDVOrientation.java new file mode 100644 index 0000000..5dc845e --- /dev/null +++ b/android/capacitor-cordova-android-plugins/src/main/java/cordova/plugins/screenorientation/CDVOrientation.java @@ -0,0 +1,98 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +package cordova.plugins.screenorientation; + +import org.apache.cordova.CallbackContext; +import org.apache.cordova.CordovaPlugin; + +import org.json.JSONArray; +import org.json.JSONException; + +import android.app.Activity; +import android.content.pm.ActivityInfo; +import android.util.Log; + +public class CDVOrientation extends CordovaPlugin { + + private static final String TAG = "YoikScreenOrientation"; + + /** + * Screen Orientation Constants + */ + + private static final String ANY = "any"; + private static final String PORTRAIT_PRIMARY = "portrait-primary"; + private static final String PORTRAIT_SECONDARY = "portrait-secondary"; + private static final String LANDSCAPE_PRIMARY = "landscape-primary"; + private static final String LANDSCAPE_SECONDARY = "landscape-secondary"; + private static final String PORTRAIT = "portrait"; + private static final String LANDSCAPE = "landscape"; + + @Override + public boolean execute(String action, JSONArray args, CallbackContext callbackContext) { + + Log.d(TAG, "execute action: " + action); + + // Route the Action + if (action.equals("screenOrientation")) { + return routeScreenOrientation(args, callbackContext); + } + + // Action not found + callbackContext.error("action not recognised"); + return false; + } + + private boolean routeScreenOrientation(JSONArray args, CallbackContext callbackContext) { + + String action = args.optString(0); + + + + String orientation = args.optString(1); + + Log.d(TAG, "Requested ScreenOrientation: " + orientation); + + Activity activity = cordova.getActivity(); + + if (orientation.equals(ANY)) { + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED); + } else if (orientation.equals(LANDSCAPE_PRIMARY)) { + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); + } else if (orientation.equals(PORTRAIT_PRIMARY)) { + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + } else if (orientation.equals(LANDSCAPE)) { + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE); + } else if (orientation.equals(PORTRAIT)) { + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT); + } else if (orientation.equals(LANDSCAPE_SECONDARY)) { + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE); + } else if (orientation.equals(PORTRAIT_SECONDARY)) { + activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT); + } + + callbackContext.success(); + return true; + + + } +} \ No newline at end of file diff --git a/ios/App/App/config.xml b/ios/App/App/config.xml index 1b1b0e0..b43c248 100644 --- a/ios/App/App/config.xml +++ b/ios/App/App/config.xml @@ -2,5 +2,9 @@ + + + + \ No newline at end of file diff --git a/ios/App/Podfile b/ios/App/Podfile index d3fc14a..323ce86 100644 --- a/ios/App/Podfile +++ b/ios/App/Podfile @@ -9,17 +9,18 @@ install! 'cocoapods', :disable_input_output_paths => true def capacitor_pods pod 'Capacitor', :path => '../../node_modules/@capacitor/ios' pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios' - pod 'CapacitorCommunityHttp', :path => '..\..\node_modules\@capacitor-community\http' - pod 'CapacitorApp', :path => '..\..\node_modules\@capacitor\app' - pod 'CapacitorBrowser', :path => '..\..\node_modules\@capacitor\browser' - pod 'CapacitorDevice', :path => '..\..\node_modules\@capacitor\device' - pod 'CapacitorFilesystem', :path => '..\..\node_modules\@capacitor\filesystem' - pod 'CapacitorHaptics', :path => '..\..\node_modules\@capacitor\haptics' - pod 'CapacitorShare', :path => '..\..\node_modules\@capacitor\share' - pod 'CapacitorSplashScreen', :path => '..\..\node_modules\@capacitor\splash-screen' - pod 'CapacitorStatusBar', :path => '..\..\node_modules\@capacitor\status-bar' - pod 'CapacitorToast', :path => '..\..\node_modules\@capacitor\toast' - pod 'HugotomaziCapacitorNavigationBar', :path => '..\..\node_modules\@hugotomazi\capacitor-navigation-bar' + pod 'CapacitorCommunityHttp', :path => '../../node_modules/@capacitor-community/http' + pod 'CapacitorApp', :path => '../../node_modules/@capacitor/app' + pod 'CapacitorBrowser', :path => '../../node_modules/@capacitor/browser' + pod 'CapacitorDevice', :path => '../../node_modules/@capacitor/device' + pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem' + pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics' + pod 'CapacitorShare', :path => '../../node_modules/@capacitor/share' + pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen' + pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar' + pod 'CapacitorToast', :path => '../../node_modules/@capacitor/toast' + pod 'HugotomaziCapacitorNavigationBar', :path => '../../node_modules/@hugotomazi/capacitor-navigation-bar' + pod 'CordovaPlugins', :path => '../capacitor-cordova-ios-plugins' end target 'App' do From f2d2038fa5d8506f7194d62ea5e148b0538337c6 Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Wed, 1 Jun 2022 00:00:54 -0400 Subject: [PATCH 13/35] videoid prop --- NUXT/components/Player/index.vue | 10 +++++++++- NUXT/components/Player/sponsorblock.vue | 4 ++++ NUXT/pages/watch.vue | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/NUXT/components/Player/index.vue b/NUXT/components/Player/index.vue index dfdcc3f..8426126 100644 --- a/NUXT/components/Player/index.vue +++ b/NUXT/components/Player/index.vue @@ -162,7 +162,11 @@ :controls="controls" @seeking="seeking = !seeking" /> - + @@ -201,6 +205,10 @@ export default { type: Object, required: true, }, + videoid: { + type: String, + required: true, + }, }, data() { return { diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue index a300eb2..f836c0a 100644 --- a/NUXT/components/Player/sponsorblock.vue +++ b/NUXT/components/Player/sponsorblock.vue @@ -9,6 +9,10 @@ export default { type: Object, required: true, }, + videoid: { + type: String, + required: true, + }, }, mounted() { let sponsorBlock = []; diff --git a/NUXT/pages/watch.vue b/NUXT/pages/watch.vue index 6be50c5..17bd3be 100644 --- a/NUXT/pages/watch.vue +++ b/NUXT/pages/watch.vue @@ -8,6 +8,7 @@ ref="player" :video="video" :sources="sources" + :videoid="$route.query.v" /> From f998ce278c2800889b80abd435572ab42b2f56fb Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Wed, 1 Jun 2022 00:01:42 -0400 Subject: [PATCH 14/35] param fix --- NUXT/components/Player/sponsorblock.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue index f836c0a..c876170 100644 --- a/NUXT/components/Player/sponsorblock.vue +++ b/NUXT/components/Player/sponsorblock.vue @@ -16,7 +16,7 @@ export default { }, mounted() { let sponsorBlock = []; - this.$youtube.getSponsorBlock(this.$route.query.v, (data) => { + this.$youtube.getSponsorBlock(this.videoid, (data) => { sponsorBlock = data.segment; }); From e6eef424bb2c4b2d6c207f9be3c8360955935819 Mon Sep 17 00:00:00 2001 From: Sushi Date: Wed, 1 Jun 2022 00:13:16 -0600 Subject: [PATCH 15/35] SPONSORBLOCK WORKS --- NUXT/components/Player/sponsorblock.vue | 39 +++++++++++-------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue index c876170..7456bbf 100644 --- a/NUXT/components/Player/sponsorblock.vue +++ b/NUXT/components/Player/sponsorblock.vue @@ -15,33 +15,28 @@ export default { }, }, mounted() { - let sponsorBlock = []; - this.$youtube.getSponsorBlock(this.videoid, (data) => { - sponsorBlock = data.segment; - }); + let vid = this.video; + let id = this.videoid; - this.$refs.player.addEventListener("loadeddata", (e) => { - console.log("%c loadeddata", "color: #00ff00"); + vid.addEventListener("loadeddata", (e) => { + if (vid.readyState >= 3) { + this.$youtube.getSponsorBlock(id, (data) => { + console.log(data); - if (this.$refs.player.readyState >= 3) { - this.$refs.player.ontimeupdate = () => { - console.log("%c notinsegment", "color: #00ff00"); + // iterate over data.segments array + vid.ontimeupdate = () => { + data.forEach(function(sponsor) { + let vidTime = vid.currentTime; - let vidTime = this.$refs.player.currentTime; - - for (let i = 0; i < sponsorBlock.length; i++) { - console.log("%c loopin", "color: #00ffff"); - - if (vidTime > sponsorBlock[i][0] && vidTime < sponsorBlock[0][i]) { - console.log("%c insegment", "color: #ff0000"); - - this.$refs.player.currentTime = sponsorBlock[i][0]; - break; + if (vidTime >= sponsor.segment[0] && vidTime <= sponsor.segment[1]) { + console.log("Skipping the sponsor"); + vid.currentTime = sponsor.segment[1]; + } + }) } - } - }; + }) } - }); + }) }, }; From 96525a527a752bbbede2220afe21a88fc92954ec Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Wed, 1 Jun 2022 14:06:34 -0400 Subject: [PATCH 16/35] split & fix progressbar, sb error checker --- NUXT/components/Player/index.vue | 10 +- NUXT/components/Player/progressbar.vue | 47 ++++++++++ NUXT/components/Player/seekbar.vue | 119 +++++++++++------------- NUXT/components/Player/sponsorblock.vue | 53 +++++++++-- NUXT/pages/watch.vue | 1 + 5 files changed, 153 insertions(+), 77 deletions(-) create mode 100644 NUXT/components/Player/progressbar.vue diff --git a/NUXT/components/Player/index.vue b/NUXT/components/Player/index.vue index 8426126..a25aa9f 100644 --- a/NUXT/components/Player/index.vue +++ b/NUXT/components/Player/index.vue @@ -152,7 +152,12 @@ @fullscreen="(controls = $refs.player.paused), handleFullscreenChange()" /> - + + + + diff --git a/NUXT/components/Player/seekbar.vue b/NUXT/components/Player/seekbar.vue index 0892d48..f83bec5 100644 --- a/NUXT/components/Player/seekbar.vue +++ b/NUXT/components/Player/seekbar.vue @@ -7,22 +7,6 @@ style="display: none" :src="vidWrs" /> - ({ + scrubbing: false, + progress: 0, + duration: 0, + vidWrs: "", + }), mounted() { - console.log("sources", this.sources); - this.vidSrc = this.sources[this.sources.length - 1].url; - this.vidWrs = this.sources[1].url; - let vid = this.video; - vid.addEventListener("loadeddata", (e) => { - // console.log("%c loadeddata", "color: #00ff00"); - console.log(e); - //Video should now be loaded but we can add a second check - if (vid.readyState >= 3) { - vid.ontimeupdate = () => { - // console.log("%c timeupdate", "color: #aaaaff"); - this.duration = vid.duration; - if (!this.scrubbing) this.progress = vid.currentTime; - this.percent = (vid.currentTime / vid.duration) * 100; - }; - vid.onprogress = () => { - // console.log("%c progress", "color: #ff00ff"); - this.buffered = (vid.buffered.end(0) / vid.duration) * 100; - }; + // this.vidWrs = this.sources[1].url; + this.video.addEventListener("loadeddata", (e) => { + if (this.video.readyState >= 3) { + this.video.addEventListener("timeupdate", () => { + this.duration = this.video.duration; + if (!this.scrubbing) this.progress = this.currentTime; + }); } }); }, methods: { + seek(e) { + // console.log(`scrubbing ${e}`); + let vid = this.$refs.playerfake; + let canvas = this.$refs.preview; + this.$refs.playerfake.currentTime = e; + canvas + .getContext("2d") + .drawImage( + vid, + 0, + 0, + this.video.clientWidth / 3, + this.video.clientHeight / 3 + ); + }, + scrub(e) { + this.video.currentTime = e; + }, // TODO: better scrubbing preview loadVideoFrames() { // Exit loop if desired number of frames have been extracted @@ -228,24 +233,6 @@ export default { console.log(this.frames); }, // TODO: scrubbing preview end - seek(e) { - // console.log(`scrubbing ${e}`); - let vid = this.$refs.playerfake; - let canvas = this.$refs.preview; - this.$refs.playerfake.currentTime = e; - canvas - .getContext("2d") - .drawImage( - vid, - 0, - 0, - this.video.clientWidth / 3, - this.video.clientHeight / 3 - ); - }, - scrub(e) { - this.video.currentTime = e; - }, }, }; diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue index 7456bbf..e056aaa 100644 --- a/NUXT/components/Player/sponsorblock.vue +++ b/NUXT/components/Player/sponsorblock.vue @@ -1,5 +1,22 @@ + + diff --git a/NUXT/pages/watch.vue b/NUXT/pages/watch.vue index 17bd3be..ca4a0ff 100644 --- a/NUXT/pages/watch.vue +++ b/NUXT/pages/watch.vue @@ -228,6 +228,7 @@ hide-overlay persistent no-click-animation + style="z-index: 2 !important" attach="#content-container" > Date: Wed, 1 Jun 2022 14:35:14 -0400 Subject: [PATCH 17/35] sb visual segments, preview fix --- NUXT/components/Player/index.vue | 1 + NUXT/components/Player/seekbar.vue | 2 +- NUXT/components/Player/sponsorblock.vue | 67 +++++++++++++++++++------ 3 files changed, 54 insertions(+), 16 deletions(-) diff --git a/NUXT/components/Player/index.vue b/NUXT/components/Player/index.vue index a25aa9f..f6ba1d4 100644 --- a/NUXT/components/Player/index.vue +++ b/NUXT/components/Player/index.vue @@ -172,6 +172,7 @@ v-if="$refs.player" :video="$refs.player" :videoid="videoid" + :fullscreen="isFullscreen" /> diff --git a/NUXT/components/Player/seekbar.vue b/NUXT/components/Player/seekbar.vue index f83bec5..8e4ad8b 100644 --- a/NUXT/components/Player/seekbar.vue +++ b/NUXT/components/Player/seekbar.vue @@ -83,7 +83,7 @@ export default { vidWrs: "", }), mounted() { - // this.vidWrs = this.sources[1].url; + this.vidWrs = this.sources[1].url; this.video.addEventListener("loadeddata", (e) => { if (this.video.readyState >= 3) { this.video.addEventListener("timeupdate", () => { diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue index e056aaa..8519e64 100644 --- a/NUXT/components/Player/sponsorblock.vue +++ b/NUXT/components/Player/sponsorblock.vue @@ -1,21 +1,26 @@ @@ -30,9 +35,14 @@ export default { type: String, required: true, }, + fullscreen: { + type: Boolean, + required: true, + }, }, data: () => ({ - segments: [], + blocks: [], + skipping: false, }), mounted() { let vid = this.video; @@ -43,20 +53,23 @@ export default { this.$youtube.getSponsorBlock(id, (data) => { console.log("sbreturn", data); if (Array.isArray(data)) { - this.segments = data; + this.blocks = data; // iterate over data.segments array vid.addEventListener("timeupdate", () => { - console.log("sb check", data); + // console.log("sb check", data); data.forEach((sponsor) => { let vidTime = vid.currentTime; if ( vidTime >= sponsor.segment[0] && - vidTime <= sponsor.segment[1] + vidTime <= sponsor.segment[1] && + !this.skipping ) { console.log("Skipping the sponsor"); - vid.currentTime = sponsor.segment[1]; + // to avoid jank and jitters + this.skipping = true; + vid.currentTime = sponsor.segment[1] + 1; } }); }); @@ -72,4 +85,28 @@ export default { .sponsor { color: green; } +.selfpromo { + color: yellow; +} +.exclusive_access { + color: orange; +} +.interaction { + color: blue; +} +.intro { + color: purple; +} +.outro { + color: purple; +} +.music_offtopic { + color: red; +} +.poi_highlight { + color: #ff00ff; +} +.filler { + color: blue; +} From d90b287eef3e639b5a77c74647c9b519b485ade4 Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Wed, 1 Jun 2022 14:47:00 -0400 Subject: [PATCH 18/35] sb bugfix --- NUXT/components/Player/sponsorblock.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue index 8519e64..dc1d39b 100644 --- a/NUXT/components/Player/sponsorblock.vue +++ b/NUXT/components/Player/sponsorblock.vue @@ -42,7 +42,6 @@ export default { }, data: () => ({ blocks: [], - skipping: false, }), mounted() { let vid = this.video; @@ -67,8 +66,6 @@ export default { !this.skipping ) { console.log("Skipping the sponsor"); - // to avoid jank and jitters - this.skipping = true; vid.currentTime = sponsor.segment[1] + 1; } }); From ae4893a53c4b969ad52f898c79abb6f6ee5d552e Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Wed, 1 Jun 2022 14:47:00 -0400 Subject: [PATCH 19/35] sb bugfix --- NUXT/components/Player/sponsorblock.vue | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue index 8519e64..4cbb7f0 100644 --- a/NUXT/components/Player/sponsorblock.vue +++ b/NUXT/components/Player/sponsorblock.vue @@ -42,7 +42,6 @@ export default { }, data: () => ({ blocks: [], - skipping: false, }), mounted() { let vid = this.video; @@ -63,12 +62,9 @@ export default { if ( vidTime >= sponsor.segment[0] && - vidTime <= sponsor.segment[1] && - !this.skipping + vidTime <= sponsor.segment[1] ) { console.log("Skipping the sponsor"); - // to avoid jank and jitters - this.skipping = true; vid.currentTime = sponsor.segment[1] + 1; } }); From 12bad17877548208b0d39f76e83d6d87bdcbda27 Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Wed, 1 Jun 2022 15:02:02 -0400 Subject: [PATCH 20/35] progress fullscreen hide --- NUXT/components/Player/index.vue | 2 ++ NUXT/components/Player/progressbar.vue | 1 + NUXT/components/Player/sponsorblock.vue | 1 + 3 files changed, 4 insertions(+) diff --git a/NUXT/components/Player/index.vue b/NUXT/components/Player/index.vue index f6ba1d4..e631ab4 100644 --- a/NUXT/components/Player/index.vue +++ b/NUXT/components/Player/index.vue @@ -155,6 +155,7 @@ @@ -172,6 +173,7 @@ v-if="$refs.player" :video="$refs.player" :videoid="videoid" + :controls="controls" :fullscreen="isFullscreen" /> diff --git a/NUXT/components/Player/progressbar.vue b/NUXT/components/Player/progressbar.vue index 2695729..63ff2a9 100644 --- a/NUXT/components/Player/progressbar.vue +++ b/NUXT/components/Player/progressbar.vue @@ -5,6 +5,7 @@ background-color="primary" :buffer-value="buffered" :value="(currentTime / video.duration) * 100" + :class="!fullscreen || controls ? '' : 'invisible'" color="primary" height="2" :style=" diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue index 4cbb7f0..31b9aed 100644 --- a/NUXT/components/Player/sponsorblock.vue +++ b/NUXT/components/Player/sponsorblock.vue @@ -11,6 +11,7 @@ background: transparent; pointer-events: none; " + :class="!fullscreen || controls ? '' : 'invisible'" background-color="white" background-opacity="1" color="transparent" From 080f085c5255bdeb5176e0a43d8ad8726dcb255f Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Wed, 1 Jun 2022 15:05:19 -0400 Subject: [PATCH 21/35] bugfix for prev commit --- NUXT/components/Player/progressbar.vue | 4 ++++ NUXT/components/Player/sponsorblock.vue | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/NUXT/components/Player/progressbar.vue b/NUXT/components/Player/progressbar.vue index 63ff2a9..4b117f6 100644 --- a/NUXT/components/Player/progressbar.vue +++ b/NUXT/components/Player/progressbar.vue @@ -30,6 +30,10 @@ export default { type: Number, required: true, }, + controls: { + type: Boolean, + required: true, + }, }, data: () => ({ buffered: 0, diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue index 31b9aed..cd80c74 100644 --- a/NUXT/components/Player/sponsorblock.vue +++ b/NUXT/components/Player/sponsorblock.vue @@ -40,6 +40,10 @@ export default { type: Boolean, required: true, }, + controls: { + type: Boolean, + required: true, + }, }, data: () => ({ blocks: [], From 85018056e3e0f6474640f21ae56134bd88931a27 Mon Sep 17 00:00:00 2001 From: Sushi Date: Wed, 1 Jun 2022 15:12:00 -0600 Subject: [PATCH 22/35] sponsor skip toast --- NUXT/components/Player/sponsorblock.vue | 1 + NUXT/plugins/youtube.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue index cd80c74..3ebe449 100644 --- a/NUXT/components/Player/sponsorblock.vue +++ b/NUXT/components/Player/sponsorblock.vue @@ -70,6 +70,7 @@ export default { vidTime <= sponsor.segment[1] ) { console.log("Skipping the sponsor"); + this.$youtube.showToast("Skipped sponsor") vid.currentTime = sponsor.segment[1] + 1; } }); diff --git a/NUXT/plugins/youtube.js b/NUXT/plugins/youtube.js index f89e4c2..97d3792 100644 --- a/NUXT/plugins/youtube.js +++ b/NUXT/plugins/youtube.js @@ -78,6 +78,9 @@ const searchModule = { logger("codeRun", err, true); callback(err); }); + }, + showToast(text) { + Toast.show({ text: text }); } }; From c65d8527e54ca8e3b1223ea80566ce1e6183e4b6 Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Wed, 1 Jun 2022 21:42:43 -0400 Subject: [PATCH 23/35] watch from url fix --- NUXT/layouts/default.vue | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/NUXT/layouts/default.vue b/NUXT/layouts/default.vue index ed6f57e..6d2a027 100644 --- a/NUXT/layouts/default.vue +++ b/NUXT/layouts/default.vue @@ -159,22 +159,26 @@ export default { return; } // No text found, no point in calling API - //--- Auto Suggest ---// - this.$youtube.autoComplete(text, (res) => { - const data = res.replace(/^.*?\(/, "").replace(/\)$/, ""); //Format Response - this.response = JSON.parse(data)[1]; - }); - - //--- User Pastes Link, Direct Them To Video ---// const isLink = linkParser(text); - if (isLink) { + if (!isLink) { + //--- Auto Suggest ---// + this.$youtube.autoComplete(text, (res) => { + const data = res.replace(/^.*?\(/, "").replace(/\)$/, ""); //Format Response + this.response = JSON.parse(data)[1]; + console.log(this.response); + }); + } else { + //--- User Pastes Link, Direct Them To Video ---// this.response = [ - `Watch Video from ID: ${isLink.searchParams.get("v")}`, - { id: isLink.searchParams.get("v") }, + [ + `Watch Video from ID: ${isLink.searchParams.get("v")}`, + { id: isLink.searchParams.get("v") }, + ], ]; + console.log("this.response: ", this.response); return; + //--- End User Pastes Link, Direct Them To Video ---// } - //--- End User Pastes Link, Direct Them To Video ---// }, youtubeSearch(item) { From 53a1a2353bbef169a51d8caf81574b6254429c53 Mon Sep 17 00:00:00 2001 From: Kenny <27463495+Frontesque@users.noreply.github.com> Date: Thu, 2 Jun 2022 08:34:06 -0400 Subject: [PATCH 24/35] debug iOS build failures --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14b2b3b..0df8975 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,11 +105,12 @@ jobs: CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED="NO" CODE_SIGN_ENTITLEMENTS="" - - name: Make IPA - run: mkdir Payload && mv ~/Library/Developer/Xcode/DerivedData/App-*/Build/Products/Debug-iphoneos/App.app Payload && zip -r Payload.zip Payload && mv Payload.zip VueTube.ipa + # - name: Make IPA + # run: mkdir Payload && mv ~/Library/Developer/Xcode/DerivedData/App-*/Build/Products/Debug-iphoneos/App.app Payload && zip -r Payload.zip Payload && mv Payload.zip VueTube.ipa - name: Upload artifacts uses: actions/upload-artifact@v2 with: name: iOS - path: VueTube.ipa + # path: VueTube.ipa + path: ~/Library/Developer/Xcode/DerivedData/ From ffd23201eaf99b0d69d4b0c39e575b98e58d4c29 Mon Sep 17 00:00:00 2001 From: Kenny <27463495+Frontesque@users.noreply.github.com> Date: Thu, 2 Jun 2022 09:25:31 -0400 Subject: [PATCH 25/35] fix iOS builds? --- .github/workflows/ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0df8975..8899d6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,12 +105,11 @@ jobs: CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED="NO" CODE_SIGN_ENTITLEMENTS="" - # - name: Make IPA - # run: mkdir Payload && mv ~/Library/Developer/Xcode/DerivedData/App-*/Build/Products/Debug-iphoneos/App.app Payload && zip -r Payload.zip Payload && mv Payload.zip VueTube.ipa + - name: Make IPA + run: mkdir Payload && mv ~/Library/Developer/Xcode/DerivedData/App-*/Build/Products/Debug-maccatalyst/App.app/ Payload && zip -r Payload.zip Payload && mv Payload.zip VueTube.ipa - name: Upload artifacts uses: actions/upload-artifact@v2 with: name: iOS - # path: VueTube.ipa - path: ~/Library/Developer/Xcode/DerivedData/ + path: VueTube.ipa From e0869cbf380f39fa6a92d6812380f74e42ec0293 Mon Sep 17 00:00:00 2001 From: Kenny <27463495+Frontesque@users.noreply.github.com> Date: Thu, 2 Jun 2022 10:13:40 -0400 Subject: [PATCH 26/35] remove unused svg file --- NUXT/static/channel_notice.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 NUXT/static/channel_notice.svg diff --git a/NUXT/static/channel_notice.svg b/NUXT/static/channel_notice.svg deleted file mode 100644 index 3cd8367..0000000 --- a/NUXT/static/channel_notice.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From c5164037a482f92a6427f5c65bc8ef9240935646 Mon Sep 17 00:00:00 2001 From: Front <27463495+Frontesque@users.noreply.github.com> Date: Fri, 3 Jun 2022 18:50:48 -0400 Subject: [PATCH 27/35] fix: :bug: Fix title randomly breaking characters to new line (finally) --- NUXT/pages/watch.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NUXT/pages/watch.vue b/NUXT/pages/watch.vue index 6be50c5..2e6a5ff 100644 --- a/NUXT/pages/watch.vue +++ b/NUXT/pages/watch.vue @@ -27,7 +27,7 @@
From c89ad35c80bf4e1ef578dbaf6be2a06bc375bf53 Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Mon, 6 Jun 2022 11:21:40 -0400 Subject: [PATCH 28/35] humantime fix --- NUXT/components/Player/index.vue | 15 --------------- NUXT/plugins/vuetube.js | 28 ++++++++++++++-------------- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/NUXT/components/Player/index.vue b/NUXT/components/Player/index.vue index be57af0..e631ab4 100644 --- a/NUXT/components/Player/index.vue +++ b/NUXT/components/Player/index.vue @@ -235,21 +235,6 @@ export default { this.vidSrc = this.sources[this.sources.length - 1].url; // TODO: detect orientation change and enter fullscreen // TODO: detect video loading state and send this.loading to play button :loading = loading - - - this.$youtube.getSponsorBlock(this.$route.query.v, (data) => { - sponsorBlock = data.segment; - }); - - this.$refs.player.ontimeupdate = () => { - let vidTime = this.$refs.player.currentTime; - for (let i = 0; i < sponsorBlock.length; i++) { - if (vidTime > sponsorBlock[i][0] && vidTime < sponsorBlock[0][i]) { - this.$refs.player.currentTime = sponsorBlock[i][0]; - break; - } - } - } }, beforeDestroy() { if (this.isFullscreen) this.exitFullscreen(); diff --git a/NUXT/plugins/vuetube.js b/NUXT/plugins/vuetube.js index 886a4d8..ba23fdd 100644 --- a/NUXT/plugins/vuetube.js +++ b/NUXT/plugins/vuetube.js @@ -150,21 +150,21 @@ const module = { let returntext = levels.join(":"); console.log("Human Time:", returntext); - 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) - if (!returntext.includes(":")) { - if (returntext.length == 1) { - returntext = "0" + returntext; // Make tens digit in seconds always visible (eg. 0:09) - } - returntext = "0:" + returntext; // Make minutes visible as 0 when sub 60 seconds (eg. 0:51) - } + // if (!returntext.includes(":")) { + // if (returntext.length == 1) { + // returntext = "0" + returntext; // Make tens digit in seconds always visible (eg. 0:09) + // } + // returntext = "0:" + returntext; // Make minutes visible as 0 when sub 60 seconds (eg. 0:51) + // } return returntext; }, From 064ad9cac57f57f88932231f564ac787ec7aead8 Mon Sep 17 00:00:00 2001 From: gayolGate Date: Tue, 7 Jun 2022 14:07:53 +0200 Subject: [PATCH 29/35] Create question.yml --- .github/ISSUE_TEMPLATE/question.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/ISSUE_TEMPLATE/question.yml diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1 @@ + From eb57a7ca432abfce9f1b46e5d090a635c9e3b631 Mon Sep 17 00:00:00 2001 From: gayolGate Date: Tue, 7 Jun 2022 14:29:00 +0200 Subject: [PATCH 30/35] Update question.yml --- .github/ISSUE_TEMPLATE/question.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml index 8b13789..553021c 100644 --- a/.github/ISSUE_TEMPLATE/question.yml +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -1 +1,35 @@ +name: ❓ Question +description: Ask a quesion related to VueTube +labels: [question] +body: + - type: textarea + id: question + attributes: + label: Ask your question + description: What do you want to know? + placeholder: | + Example: + "How do I add a plugin?" + validations: + required: true + + - type: textarea + id: other-details + attributes: + label: Other details + placeholder: | + Additional details and attachments. + + - type: checkboxes + id: acknowledgements + attributes: + label: Acknowledgements + description: Your question will be closed if you haven't done these steps. + options: + - label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open issue. + required: true + - label: I have written a short but informative title. + required: true + - label: I will fill out all of the requested information in this form. + required: true From e019e8ffde88873328530dac03b84291f21daf1c Mon Sep 17 00:00:00 2001 From: gayolGate Date: Tue, 7 Jun 2022 14:31:52 +0200 Subject: [PATCH 31/35] Update question.yml --- .github/ISSUE_TEMPLATE/question.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml index 553021c..2a81b34 100644 --- a/.github/ISSUE_TEMPLATE/question.yml +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -15,11 +15,11 @@ body: required: true - type: textarea - id: other-details + id: aditional-info attributes: - label: Other details + label: Aditional information placeholder: | - Additional details and attachments. + Additional useful information, for example, a screenshot. - type: checkboxes id: acknowledgements @@ -27,7 +27,7 @@ body: label: Acknowledgements description: Your question will be closed if you haven't done these steps. options: - - label: I have searched the existing issues and this is a new ticket, **NOT** a duplicate or related to another open issue. + - label: I have searched the existing issues and this is a new question, **NOT** a duplicate or related to another open issue. required: true - label: I have written a short but informative title. required: true From 825b7ccfeb4a305cace225df7d6fd3cd026cc0b0 Mon Sep 17 00:00:00 2001 From: gayolGate Date: Tue, 7 Jun 2022 14:34:43 +0200 Subject: [PATCH 32/35] Update question.yml --- .github/ISSUE_TEMPLATE/question.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml index 2a81b34..2430db7 100644 --- a/.github/ISSUE_TEMPLATE/question.yml +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -33,3 +33,5 @@ body: required: true - label: I will fill out all of the requested information in this form. required: true + - label: My question isn't asked in FAQ (Frequently Asked Questions). + required: true From 6d4fde2dcc601c86683dfa3b3d8494a469fa7505 Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Tue, 7 Jun 2022 13:16:26 -0400 Subject: [PATCH 33/35] slider improvements --- NUXT/components/Player/index.vue | 2 ++ NUXT/components/Player/progressbar.vue | 19 +++++++++++++----- NUXT/components/Player/seekbar.vue | 6 ++++-- NUXT/components/Player/sponsorblock.vue | 19 +++++++++++------- .../slimVideoDescriptionRenderer.vue | 1 + NUXT/pages/watch.vue | 4 ++-- NUXT/plugins/vuetube.js | 20 ------------------- android/.idea/deploymentTargetDropDown.xml | 12 +++++------ 8 files changed, 41 insertions(+), 42 deletions(-) diff --git a/NUXT/components/Player/index.vue b/NUXT/components/Player/index.vue index e631ab4..0d68411 100644 --- a/NUXT/components/Player/index.vue +++ b/NUXT/components/Player/index.vue @@ -155,6 +155,7 @@ @@ -22,6 +27,10 @@ export default { type: Object, required: true, }, + seeking: { + type: Boolean, + required: true, + }, fullscreen: { type: Boolean, required: true, diff --git a/NUXT/components/Player/seekbar.vue b/NUXT/components/Player/seekbar.vue index 8e4ad8b..cf731fc 100644 --- a/NUXT/components/Player/seekbar.vue +++ b/NUXT/components/Player/seekbar.vue @@ -13,12 +13,14 @@ hide-details height="2" dense + color="transparent" + thumb-color="primary" track-color="transparent" :class="!controls && !fullscreen && !scrubbing ? 'invisible' : ''" - style="position: absolute; z-index: 3" + style="position: absolute; z-index: 4" :style=" fullscreen - ? 'width: calc(100% - 2rem); left: 1rem; bottom: 3rem;' + ? 'width: calc(100% - 2rem); left: 1rem; bottom: 51px;' : 'width: calc(100% - 0.8rem); left: 0.4rem; bottom: 0;' " :thumb-size="0" diff --git a/NUXT/components/Player/sponsorblock.vue b/NUXT/components/Player/sponsorblock.vue index 3ebe449..c2c36df 100644 --- a/NUXT/components/Player/sponsorblock.vue +++ b/NUXT/components/Player/sponsorblock.vue @@ -6,20 +6,21 @@ :buffer-value="(block.segment[1] / video.duration) * 100" :value="(block.segment[0] / video.duration) * 100" style=" - z-index: 4; - width: 100%; - background: transparent; + z-index: 3; + position: absolute; pointer-events: none; + background: transparent; + transform: translateY(50%); " :class="!fullscreen || controls ? '' : 'invisible'" background-color="white" background-opacity="1" color="transparent" - height="2" + :height="seeking ? 4 : 2" :style=" fullscreen - ? 'width: calc(100% - 2rem); left: 1rem; position: absolute; bottom: 3rem;' - : 'width: 100%; left: 0; position: absolute; bottom: 0;' + ? 'width: calc(100% - 2rem); left: 1rem; bottom: 3.25rem;' + : 'width: 100%; left: 0; bottom: 1px;' " />
@@ -32,6 +33,10 @@ export default { type: Object, required: true, }, + seeking: { + type: Boolean, + required: true, + }, videoid: { type: String, required: true, @@ -70,7 +75,7 @@ export default { vidTime <= sponsor.segment[1] ) { console.log("Skipping the sponsor"); - this.$youtube.showToast("Skipped sponsor") + this.$youtube.showToast("Skipped sponsor"); vid.currentTime = sponsor.segment[1] + 1; } }); diff --git a/NUXT/components/UtilRenderers/slimVideoDescriptionRenderer.vue b/NUXT/components/UtilRenderers/slimVideoDescriptionRenderer.vue index 32c7bc9..faf7ecf 100644 --- a/NUXT/components/UtilRenderers/slimVideoDescriptionRenderer.vue +++ b/NUXT/components/UtilRenderers/slimVideoDescriptionRenderer.vue @@ -8,6 +8,7 @@ diff --git a/NUXT/pages/watch.vue b/NUXT/pages/watch.vue index 148c6df..07a5d70 100644 --- a/NUXT/pages/watch.vue +++ b/NUXT/pages/watch.vue @@ -22,7 +22,7 @@
@@ -164,7 +164,7 @@
-
+
diff --git a/NUXT/plugins/vuetube.js b/NUXT/plugins/vuetube.js index ba23fdd..461aef2 100644 --- a/NUXT/plugins/vuetube.js +++ b/NUXT/plugins/vuetube.js @@ -141,31 +141,11 @@ const module = { Math.floor((((seconds % 31536000) % 86400) % 3600) % 60), //Seconds ]; levels = levels.filter((level) => level !== null); - for (let i = 1; i < levels.length; i++) { levels[i] = levels[i].toString().padStart(2, "0"); } - // join the array into a string with : as a separator let returntext = levels.join(":"); - - console.log("Human Time:", returntext); - // 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) - - // if (!returntext.includes(":")) { - // if (returntext.length == 1) { - // returntext = "0" + returntext; // Make tens digit in seconds always visible (eg. 0:09) - // } - // returntext = "0:" + returntext; // Make minutes visible as 0 when sub 60 seconds (eg. 0:51) - // } - return returntext; }, //--- End Convert Time To Human Readable String ---// diff --git a/android/.idea/deploymentTargetDropDown.xml b/android/.idea/deploymentTargetDropDown.xml index 007b8a4..7c97d1b 100644 --- a/android/.idea/deploymentTargetDropDown.xml +++ b/android/.idea/deploymentTargetDropDown.xml @@ -1,17 +1,17 @@ - + - + - - + + - - + + \ No newline at end of file From bee1f4570110b78fadab55ccc4277076cd25e36d Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Tue, 7 Jun 2022 14:29:57 -0400 Subject: [PATCH 34/35] player controls position improvements --- NUXT/components/Player/fullscreen.vue | 7 +- NUXT/components/Player/index.vue | 102 +++++++++++++++++++++++++- NUXT/components/Player/watchtime.vue | 20 +++-- 3 files changed, 117 insertions(+), 12 deletions(-) diff --git a/NUXT/components/Player/fullscreen.vue b/NUXT/components/Player/fullscreen.vue index c4cfdb5..b332d7d 100644 --- a/NUXT/components/Player/fullscreen.vue +++ b/NUXT/components/Player/fullscreen.vue @@ -4,10 +4,13 @@ text small color="white" - style="position: absolute; bottom: 0.25rem; right: 0.25rem" + style="position: absolute; right: 0.25rem" + :style="fullscreen ? 'bottom: 3.5rem' : 'bottom: 0.25rem'" @click.stop="$emit('fullscreen')" > - {{ fullscreen ? "mdi-fullscreen-exit" : "mdi-fullscreen" }} + {{ + fullscreen ? "mdi-fullscreen-exit" : "mdi-fullscreen" + }} diff --git a/NUXT/components/Player/index.vue b/NUXT/components/Player/index.vue index 0d68411..1cfff4a 100644 --- a/NUXT/components/Player/index.vue +++ b/NUXT/components/Player/index.vue @@ -74,7 +74,11 @@
@@ -143,7 +147,89 @@ mdi-fast-forward-5 - + + + mdi-thumb-up-outline + + + mdi-thumb-down-outline + + + mdi-share-outline + + + mdi-plus-box-multiple-outline + + + mdi-comment-text-outline + + + + mdi-cards-outline + @@ -151,6 +237,18 @@ :fullscreen="isFullscreen" @fullscreen="(controls = $refs.player.paused), handleFullscreenChange()" /> + + mdi-cards-outline +
{{ watched }} / {{ duration }} @@ -15,7 +10,16 @@