X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fvideo%2Fabstract-video-list.ts;h=c18ebcf5463d5c893b853c337ba67aa8ff79df00;hb=d414207f07f47307947d86d5bc5c5fc0ae73be18;hp=4a220c93d246ce0c2d066686ae59c421f62e72b1;hpb=c1dd9b0734336a769f5dce9800b447c3d0e58bb1;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/video/abstract-video-list.ts b/client/src/app/shared/video/abstract-video-list.ts index 4a220c93d..c18ebcf54 100644 --- a/client/src/app/shared/video/abstract-video-list.ts +++ b/client/src/app/shared/video/abstract-video-list.ts @@ -13,9 +13,9 @@ import { SortField } from './sort-field.type' import { Video } from './video.model' export abstract class AbstractVideoList implements OnInit, OnDestroy { - private static LINES_PER_PAGE = 3 + private static LINES_PER_PAGE = 4 - @ViewChild('videoElement') videosElement: ElementRef + @ViewChild('videosElement') videosElement: ElementRef @ViewChild(InfiniteScrollerDirective) infiniteScroller: InfiniteScrollerDirective pagination: ComponentPagination = { @@ -183,6 +183,8 @@ export abstract class AbstractVideoList implements OnInit, OnDestroy { // Video takes all the width this.videoWidth = -1 + // Same ratios than base width/height + this.videoHeight = this.videosElement.nativeElement.offsetWidth * (this.baseVideoHeight / this.baseVideoWidth) this.pageHeight = this.pagination.itemsPerPage * this.videoHeight } else { this.videoWidth = this.baseVideoWidth