From ad94aeec1daae7e7581afc89d5540ec97ee30b05 Mon Sep 17 00:00:00 2001 From: Ricardo Loureiro Date: Wed, 15 Nov 2023 16:15:14 -0300 Subject: [PATCH] =?UTF-8?q?#51=20-=20Componente=20viewer=20para=20descri?= =?UTF-8?q?=C3=A7=C3=A3o=20no=20video?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Gabriela Tiago Co-authored-by: Diego-Carlito --- src/app/pages/video-viewer/video-viewer.component.html | 8 ++++++-- src/app/pages/video-viewer/video-viewer.component.ts | 9 +++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/app/pages/video-viewer/video-viewer.component.html b/src/app/pages/video-viewer/video-viewer.component.html index fc70fe4a..fc65c614 100644 --- a/src/app/pages/video-viewer/video-viewer.component.html +++ b/src/app/pages/video-viewer/video-viewer.component.html @@ -1,5 +1,5 @@
-
+
-

+

{{ videoTitle }}

+
+
+
+
diff --git a/src/app/pages/video-viewer/video-viewer.component.ts b/src/app/pages/video-viewer/video-viewer.component.ts index 6588b956..89d2d97d 100644 --- a/src/app/pages/video-viewer/video-viewer.component.ts +++ b/src/app/pages/video-viewer/video-viewer.component.ts @@ -22,6 +22,7 @@ export class VideoViewerComponent implements OnInit { videoVersion: IVideoVersion = new VideoVersion(); videoMP4: IVideoDetails = new VideoDetails(); videoTitle: string = ''; + videoDescription: string = ''; constructor( private route: ActivatedRoute, @@ -40,6 +41,14 @@ export class VideoViewerComponent implements OnInit { ); this.videoMP4 = !!videoMP4Found ? videoMP4Found : this.videoMP4; + + if (params['idVideo']) { + this.videoService.findDescriptionByVideoId(params['idVideo']).subscribe( + (descriptionRes: HttpResponse<{description: string}>) => { + this.videoDescription = descriptionRes.body?.description || 'Descrição não disponível'; + } + ); + } }); });