diff --git a/src/components/CommentItem.vue b/src/components/CommentItem.vue
index ff06ac6b..56519794 100644
--- a/src/components/CommentItem.vue
+++ b/src/components/CommentItem.vue
@@ -34,7 +34,7 @@
diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue
index f80ba97c..eaa8e226 100644
--- a/src/components/WatchVideo.vue
+++ b/src/components/WatchVideo.vue
@@ -648,6 +648,12 @@ export default {
}
},
getVideoId() {
+ if (this.$route.query.video_ids) {
+ const videos_list = this.$route.query.video_ids.split(",");
+ this.index = Number(this.$route.query.index ?? 0);
+ return videos_list[this.index];
+ }
+
return this.$route.query.v || this.$route.params.v;
},
navigate(time) {
@@ -687,7 +693,15 @@ export default {
},
navigateNext() {
const params = this.$route.query;
- let url = this.playlist?.relatedStreams?.[this.index]?.url ?? this.video.relatedStreams[0].url;
+ const video_ids = this.$route.query.video_ids?.split(",") ?? [];
+ let url;
+ if (this.playlist) {
+ url = this.playlist?.relatedStreams?.[this.index]?.url ?? this.video.relatedStreams[0].url;
+ } else if (video_ids.length > this.index + 1) {
+ url = `${this.$route.path}?index=${this.index + 1}`;
+ } else {
+ url = this.video.relatedStreams[0].url;
+ }
const searchParams = new URLSearchParams();
for (var param in params)
switch (param) {
@@ -695,7 +709,8 @@ export default {
case "t":
break;
case "index":
- if (this.index < this.playlist.relatedStreams.length) searchParams.set("index", this.index + 1);
+ if (this.playlist && this.index < this.playlist.relatedStreams.length)
+ searchParams.set("index", this.index + 1);
break;
case "list":
if (this.index < this.playlist.relatedStreams.length) searchParams.set("list", params.list);
diff --git a/src/router/router.js b/src/router/router.js
index 26cfa9f0..3d0be255 100644
--- a/src/router/router.js
+++ b/src/router/router.js
@@ -31,6 +31,11 @@ const routes = [
name: "WatchVideo",
component: () => import("../components/WatchVideo.vue"),
},
+ {
+ path: "/watch_videos",
+ name: "WatchVideos",
+ component: () => import("../components/WatchVideo.vue"),
+ },
{
path: "/clip/:clipId",
name: "Clips",