From 8884ea1040e079adc72b2c46aa88eba1192b4445 Mon Sep 17 00:00:00 2001 From: axolotle Date: Thu, 24 Oct 2024 11:55:26 +0200 Subject: [PATCH] fix(EmbedVideo): override type if embed --- src/components/globals/EmbedVideo.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/globals/EmbedVideo.vue b/src/components/globals/EmbedVideo.vue index a2f5ec0..269cc39 100644 --- a/src/components/globals/EmbedVideo.vue +++ b/src/components/globals/EmbedVideo.vue @@ -56,10 +56,11 @@ export default { item () { const embed = this.embed + const type_ = embed ? 'iframe' : this.type let src = this.src - const attrs = this.type === 'iframe' ? { allowfullscreen: true } : { controls: true } + const attrs = type_ === 'iframe' ? { allowfullscreen: true } : { controls: true } - if (this.full && this.type === 'iframe') { + if (this.full && type_ === 'iframe') { attrs.width = '100%' attrs.height = '100%' } @@ -72,7 +73,7 @@ export default { } } - return { type: this.type, src, attrs } + return { type: type_, src, attrs } } } }