aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/abstract-video-list.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/video/abstract-video-list.ts')
-rw-r--r--client/src/app/shared/video/abstract-video-list.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts
index 90a88544a..021c285c0 100644
--- a/client/src/app/shared/video/abstract-video-list.ts
+++ b/client/src/app/shared/video/abstract-video-list.ts
@@ -169,6 +169,11 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
169 this.videoPages = Object.values(this.loadedPages) 169 this.videoPages = Object.values(this.loadedPages)
170 } 170 }
171 171
172 protected buildVideoHeight () {
173 // Same ratios than base width/height
174 return this.videosElement.nativeElement.offsetWidth * (this.baseVideoHeight / this.baseVideoWidth)
175 }
176
172 private minPageLoaded () { 177 private minPageLoaded () {
173 return Math.min(...Object.keys(this.loadedPages).map(e => parseInt(e, 10))) 178 return Math.min(...Object.keys(this.loadedPages).map(e => parseInt(e, 10)))
174 } 179 }
@@ -183,8 +188,7 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy {
183 188
184 // Video takes all the width 189 // Video takes all the width
185 this.videoWidth = -1 190 this.videoWidth = -1
186 // Same ratios than base width/height 191 this.videoHeight = this.buildVideoHeight()
187 this.videoHeight = this.videosElement.nativeElement.offsetWidth * (this.baseVideoHeight / this.baseVideoWidth)
188 this.pageHeight = this.pagination.itemsPerPage * this.videoHeight 192 this.pageHeight = this.pagination.itemsPerPage * this.videoHeight
189 } else { 193 } else {
190 this.videoWidth = this.baseVideoWidth 194 this.videoWidth = this.baseVideoWidth