From 8536b4a9f333f46b50a8aae0d53e5da0f3f5dfb7 Mon Sep 17 00:00:00 2001
From: FireMasterK <20838718+FireMasterK@users.noreply.github.com>
Date: Wed, 26 May 2021 13:40:22 +0530
Subject: [PATCH] Responsive widths + Continuations.
---
src/components/WatchVideo.vue | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue
index 77bfac33..f77154e0 100644
--- a/src/components/WatchVideo.vue
+++ b/src/components/WatchVideo.vue
@@ -36,7 +36,7 @@
-
+
-
+
(this.comments = data));
},
+ handleScroll() {
+ if (this.loading || !this.comments || !this.comments.nextpage) return;
+ if (window.innerHeight + window.scrollY >= document.body.offsetHeight - window.innerHeight) {
+ this.loading = true;
+ this.fetchJson(
+ Constants.BASE_URL +
+ "/nextpage/comments/" +
+ this.$route.query.v +
+ "?url=" +
+ encodeURIComponent(this.comments.nextpage),
+ ).then(json => {
+ this.comments.nextpage = json.nextpage;
+ this.loading = false;
+ json.comments.map(comment => this.comments.comments.push(comment));
+ });
+ }
+ },
},
components: {
Player,