From 1b15c6236cd506d8d7b8644d561358c55f0bfb48 Mon Sep 17 00:00:00 2001 From: Georgiy Date: Wed, 3 May 2023 15:10:09 +0300 Subject: [PATCH] feat(recommends): Changed type of recommends in index.vue --- NUXT/components/Player/index.vue | 5 +++-- NUXT/pages/home.vue | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NUXT/components/Player/index.vue b/NUXT/components/Player/index.vue index 832a902..57eda1a 100644 --- a/NUXT/components/Player/index.vue +++ b/NUXT/components/Player/index.vue @@ -380,7 +380,7 @@ export default { required: true, }, recommends: { - type: Array, + type: Object, default: () => { return []; }, @@ -416,6 +416,7 @@ export default { mounted() { console.log("sources", this.sources); console.log("recommends", this.recommends); + console.log("video", this.video); this.vid = this.$refs.player; // TODO: this.$store.state.player.quality, check if exists and select the closest one @@ -535,7 +536,7 @@ export default { if (this.xhr) this.xhr.abort(); if (this.isFullscreen) this.exitFullscreen(); if (this.bufferingDetected) clearTimeout(this.bufferingDetected); - screen.orientation.removeEventListener("change"); + // screen.orientation.removeEventListener("change"); this.$refs.player.removeEventListener("loadeddata", this.loadedDataEvent); this.$refs.player.removeEventListener("timeupdate", this.timeUpdateEvent); this.$refs.player.removeEventListener("progress", this.progressEvent); diff --git a/NUXT/pages/home.vue b/NUXT/pages/home.vue index a5bd0fb..50d75e2 100644 --- a/NUXT/pages/home.vue +++ b/NUXT/pages/home.vue @@ -68,7 +68,9 @@ export default { .then((result) => { if (result) this.recommends = [result]; }) - .catch(error => {}); + .catch((error) => { + console.error(error); + }); } }, };