<div class="video-info-date-views">
<ng-container i18n>Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle></ng-container>
- <span i18n class="views">
+ <span i18n
+ title="{{ getExactNumberOfViews() }}"
+ class="views">
• {{ video.views | myNumberFormatter }}
<ng-container *ngIf="!video.isLive">views</ng-container>
<ng-container *ngIf="video.isLive">viewers</ng-container>
<div class="d-none d-md-block video-info-date-views">
<ng-container i18n>Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle></ng-container>
- <span i18n class="views">
+ <span i18n
+ title="{{ getExactNumberOfViews() }}"
+ class="views">
• {{ video.views | myNumberFormatter }}
<ng-container *ngIf="!video.isLive">views</ng-container>
<ng-container *ngIf="video.isLive">viewers</ng-container>
return $localize`You need to be <a href="/login">logged in</a> to rate this video.`
}
+ getExactNumberOfViews () {
+ return (this.video.views >= 1000)
+ ? `${this.video.views} ${this.video.isLive ? $localize`viewers` : $localize`views`}`
+ : ''
+ }
+
showMoreDescription () {
if (this.completeVideoDescription === undefined) {
return this.loadCompleteDescription()
<span class="video-miniature-created-at-views">
<my-date-toggle *ngIf="displayOptions.date" [date]="video.publishedAt"></my-date-toggle>
- <span class="views">
+ <span class="views" title="{{ getExactNumberOfViews() }}">
<ng-container *ngIf="displayOptions.date && displayOptions.views"> • </ng-container>
- <ng-container i18n *ngIf="displayOptions.views">{video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}}</ng-container>
+ <ng-container i18n *ngIf="displayOptions.views">
+ {video.views, plural, =1 {1 view} other {{{ video.views | myNumberFormatter }} views}}
+ </ng-container>
</span>
</span>
return this.video.videoChannelAvatarUrl
}
+ getExactNumberOfViews () {
+ return (this.video.views >= 1000 && this.displayOptions.views)
+ ? `${this.video.views} ${this.video.isLive ? $localize`viewers` : $localize`views`}`
+ : ''
+ }
+
loadActions () {
if (this.displayVideoActions) this.showActions = true