From 1bd0855516e3fa498090b5614713df32694c1057 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 11 Oct 2020 23:51:50 +0200 Subject: [PATCH] Massive cleanup of the player --- src/app/app.module.ts | 6 +- src/app/pages/player/player.component.html | 33 +- src/app/pages/player/player.component.ts | 619 +++++++++------------ 3 files changed, 300 insertions(+), 358 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index ddfb0e2f..9fb122c3 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -19,7 +19,7 @@ import {CollectionComponent} from './pages/collection/collection.component'; import {EpisodesListComponent} from './components/episodes-list/episodes-list.component'; import {NotFoundComponent} from './pages/not-found/not-found.component'; import {PeopleListComponent} from './components/people-list/people-list.component'; -import {PlayerComponent} from './pages/player/player.component'; +import { BufferToWidthPipe, FormatTimePipe, PlayerComponent } from "./pages/player/player.component"; import {SearchComponent} from './pages/search/search.component'; import {ShowDetailsComponent} from './pages/show-details/show-details.component'; import {FormsModule, ReactiveFormsModule} from "@angular/forms"; @@ -59,7 +59,9 @@ import {MatBadgeModule} from "@angular/material/badge"; TrailerDialogComponent, ItemsListComponent, MetadataEditComponent, - ShowGridComponent + ShowGridComponent, + FormatTimePipe, + BufferToWidthPipe ], imports: [ BrowserModule, diff --git a/src/app/pages/player/player.component.html b/src/app/pages/player/player.component.html index 3419ebc7..a22dca84 100644 --- a/src/app/pages/player/player.component.html +++ b/src/app/pages/player/player.component.html @@ -1,6 +1,6 @@
-
-
+
@@ -71,17 +74,27 @@

S{{this.item.seasonNumber}}:E{{this.item.episodeNumber}} - {{this.item.title}}

{{this.item.title}}

-
+
-
-
+
+
+
+
+
+
-
- -

{{this.hours | number: '2.0-0'}}:{{this.minutes | number: '2.0-0'}}:{{this.seconds | number: '2.0-0'}} / {{this.maxHours | number: '2.0-0'}}:{{this.maxMinutes | number: '2.0-0'}}:{{this.maxSeconds | number: '2.0-0'}}

-

{{this.minutes | number: '2.0-0'}}:{{this.seconds | number: '2.0-0'}} / {{this.maxMinutes | number: '2.0-0'}}:{{this.maxSeconds | number: '2.0-0'}}

+

{{player.currentTime | formatTime: player.duration}} / {{player.duration | formatTime}}