From be6a4802326b1748e85c0d6fdadf06e70e6ecbb0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 5 Dec 2017 10:44:11 +0100 Subject: Design video player --- .../app/videos/+video-watch/video-watch.component.html | 11 ++--------- .../app/videos/+video-watch/video-watch.component.scss | 18 ++++++++---------- .../app/videos/+video-watch/video-watch.component.ts | 11 +---------- 3 files changed, 11 insertions(+), 29 deletions(-) (limited to 'client/src/app/videos/+video-watch') diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index f528d73c3..aa1f2f77e 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html @@ -15,20 +15,13 @@
-
- +
+
Video not found :'(
- -
-
Download: {{ downloadSpeed | bytes }}/s
-
Upload: {{ uploadSpeed | bytes }}/s
-
Number of peers: {{ numPeers }}
-
-
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index cad21dd18..06c2de7c6 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss @@ -1,6 +1,12 @@ #video-container { - width: 100%; - height: 100%; + background-color: #000; + display: flex; + justify-content: center; + + #video-element { + width: 888px; + height: 500px; + } } #video-not-found { @@ -11,14 +17,6 @@ font-weight: bold; } -.embed-responsive { - height: 500px; - - @media screen and (max-width: 600px) { - height: 300px; - } -} - #torrent-info { font-size: 10px; margin-top: 10px; diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index eac676be8..48842602e 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -26,13 +26,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { @ViewChild('videoShareModal') videoShareModal: VideoShareComponent @ViewChild('videoReportModal') videoReportModal: VideoReportComponent - downloadSpeed: number error = false loading = false - numPeers: number player: videojs.Player playerElement: HTMLMediaElement - uploadSpeed: number userRating: UserVideoRateType = null video: VideoDetails = null videoPlayerLoaded = false @@ -283,7 +280,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { return this.router.navigate([ '/videos/list' ]) } - this.playerElement = this.elementRef.nativeElement.querySelector('#video-container') + this.playerElement = this.elementRef.nativeElement.querySelector('#video-element') const videojsOptions = { controls: true, @@ -306,12 +303,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy { this.on('customError', (event, data) => { self.handleError(data.err) }) - - this.on('torrentInfo', (event, data) => { - self.downloadSpeed = data.downloadSpeed - self.numPeers = data.numPeers - self.uploadSpeed = data.uploadSpeed - }) }) this.setVideoDescriptionHTML() -- cgit v1.2.3