+ @if (playMovie === "") {
-
+
+ } @else {
+
+
+
+
+ }
diff --git a/frontend/src/app/components/home/browse/browse.component.scss b/frontend/src/app/components/home/browse/browse.component.scss
index 0dc1050..c8ec50a 100644
--- a/frontend/src/app/components/home/browse/browse.component.scss
+++ b/frontend/src/app/components/home/browse/browse.component.scss
@@ -5,3 +5,66 @@ section {
width: 100vw;
background-color: $black;
}
+
+.video-overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: rgba(0, 0, 0, 0.8);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ z-index: 1000;
+ overflow: hidden; /* Verhindert, dass das Video aus dem Overlay herausragt */
+ position: relative;
+}
+
+.video-header {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 24px 48px;
+ background: rgba(0, 0, 0, 0.5);
+ z-index: 1001;
+ opacity: 0;
+ transition: opacity 300ms ease-in-out;
+}
+
+.video-overlay:hover .video-header {
+ opacity: 1;
+}
+
+.back-button {
+ cursor: pointer;
+ background: none;
+ border: none;
+ padding: 0;
+ img {
+ width: 24px;
+ height: 24px;
+ filter: brightness(0) saturate(100%) invert(100%) sepia(6%) saturate(312%)
+ hue-rotate(234deg) brightness(113%) contrast(100%);
+ transition: filter 300ms ease-in-out;
+ &:hover {
+ filter: brightness(0) saturate(100%) invert(13%) sepia(90%)
+ saturate(7329%) hue-rotate(344deg) brightness(105%) contrast(117%);
+ }
+ }
+}
+
+.logo img {
+ width: 32px;
+ height: auto;
+}
+
+.video-overlay video {
+ width: 100%;
+ height: 100%;
+}
diff --git a/frontend/src/app/components/home/browse/browse.component.ts b/frontend/src/app/components/home/browse/browse.component.ts
index 5bfb9e8..8f49671 100644
--- a/frontend/src/app/components/home/browse/browse.component.ts
+++ b/frontend/src/app/components/home/browse/browse.component.ts
@@ -35,11 +35,20 @@ export class BrowseComponent implements OnInit {
];
currentMovie: any[] = [];
+ playMovie: string = '';
ngOnInit(): void {
this.currentMovie.length === 0 ? this.loadRandomMovie() : null;
}
+ closeVideo(): void {
+ this.playMovie = '';
+ }
+
+ playVideo(videoPath: string) {
+ this.playMovie = videoPath;
+ }
+
loadRandomMovie(): void {
const randomIndex = Math.floor(Math.random() * this.movies.length);
this.currentMovie = [this.movies[randomIndex]];
diff --git a/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.html b/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.html
index 085ca82..8bce778 100644
--- a/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.html
+++ b/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.html
@@ -12,6 +12,7 @@
[value]="'Play'"
[imgPath]="'play'"
[imgReverse]="true"
+ (click)="playMovieId(currentMovie[0].videoPath)"
>
}
diff --git a/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.ts b/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.ts
index bdc3d3f..3f4034f 100644
--- a/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.ts
+++ b/frontend/src/app/components/home/browse/hero-banner/hero-banner.component.ts
@@ -1,5 +1,11 @@
import { CommonModule } from '@angular/common';
-import { Component, ElementRef, Input } from '@angular/core';
+import {
+ Component,
+ ElementRef,
+ EventEmitter,
+ Input,
+ Output,
+} from '@angular/core';
import { BtnLargeComponent } from '../../../../shared/components/btn-large/btn-large.component';
@Component({
@@ -11,12 +17,18 @@ import { BtnLargeComponent } from '../../../../shared/components/btn-large/btn-l
})
export class HeroBannerComponent {
@Input() currentMovie: any[] = [];
+ @Output() playMovie = new EventEmitter