2021-10-27 11:42:05 +02:00
|
|
|
<h1>
|
|
|
|
<my-global-icon iconName="videos" aria-hidden="true"></my-global-icon>
|
|
|
|
<ng-container i18n>Videos</ng-container>
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
<p-table
|
2022-07-12 10:19:33 +02:00
|
|
|
[value]="videos" [paginator]="totalRecords > 0" [totalRecords]="totalRecords" [rows]="rowsPerPage" [first]="pagination.start"
|
|
|
|
[rowsPerPageOptions]="rowsPerPageOptions" [sortField]="sort.field" [sortOrder]="sort.order" dataKey="id" [resizableColumns]="true"
|
2023-01-20 14:58:05 +01:00
|
|
|
[(selection)]="selectedRows" [lazy]="true" (onLazyLoad)="loadLazy($event)" [lazyLoadOnInit]="false" [selectionPageOnly]="true"
|
2021-10-27 11:42:05 +02:00
|
|
|
[showCurrentPageReport]="true" i18n-currentPageReportTemplate
|
|
|
|
currentPageReportTemplate="Showing {{'{first}'}} to {{'{last}'}} of {{'{totalRecords}'}} videos"
|
2021-12-24 15:37:42 +01:00
|
|
|
[expandedRowKeys]="expandedRows" [ngClass]="{ loading: loading }"
|
2021-10-27 11:42:05 +02:00
|
|
|
>
|
|
|
|
<ng-template pTemplate="caption">
|
|
|
|
<div class="caption">
|
|
|
|
<div class="left-buttons">
|
|
|
|
<my-action-dropdown
|
|
|
|
*ngIf="isInSelectionMode()" i18n-label label="Batch actions" theme="orange"
|
2023-01-20 14:58:05 +01:00
|
|
|
[actions]="bulkActions" [entry]="selectedRows"
|
2021-10-27 11:42:05 +02:00
|
|
|
>
|
|
|
|
</my-action-dropdown>
|
|
|
|
</div>
|
|
|
|
|
2022-06-08 16:14:24 +02:00
|
|
|
<div class="ms-auto right-form">
|
2021-10-27 11:42:05 +02:00
|
|
|
<my-advanced-input-filter [filters]="inputFilters" (search)="onSearch($event)"></my-advanced-input-filter>
|
2022-02-01 14:47:36 +01:00
|
|
|
|
2022-02-28 16:37:31 +01:00
|
|
|
<my-button i18n-label label="Refresh" icon="refresh" (click)="reloadData()"></my-button>
|
2021-10-27 11:42:05 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template pTemplate="header">
|
|
|
|
<tr>
|
|
|
|
<th style="width: 40px">
|
|
|
|
<p-tableHeaderCheckbox ariaLabel="Select all rows" i18n-ariaLabel></p-tableHeaderCheckbox>
|
|
|
|
</th>
|
|
|
|
<th style="width: 40px"></th>
|
2023-03-14 11:33:10 +01:00
|
|
|
<th style="width: 70px;"></th>
|
2021-10-27 11:42:05 +02:00
|
|
|
<th i18n>Video</th>
|
|
|
|
<th i18n>Info</th>
|
2021-10-29 10:54:27 +02:00
|
|
|
<th i18n>Files</th>
|
2021-10-27 11:42:05 +02:00
|
|
|
<th style="width: 150px;" i18n pSortableColumn="publishedAt">Published <p-sortIcon field="publishedAt"></p-sortIcon></th>
|
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template pTemplate="body" let-expanded="expanded" let-video>
|
|
|
|
|
|
|
|
<tr [pSelectableRow]="video">
|
|
|
|
<td class="checkbox-cell">
|
|
|
|
<p-tableCheckbox [value]="video" ariaLabel="Select this row" i18n-ariaLabel></p-tableCheckbox>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="expand-cell" [pRowToggler]="video">
|
|
|
|
<my-table-expander-icon [expanded]="expanded"></my-table-expander-icon>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="action-cell">
|
|
|
|
<my-video-actions-dropdown
|
2021-11-18 14:35:08 +01:00
|
|
|
placement="bottom auto" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" [displayOptions]="videoActionsOptions"
|
|
|
|
(videoRemoved)="reloadData()" (videoFilesRemoved)="reloadData()" (transcodingCreated)="reloadData()"
|
2021-10-27 11:42:05 +02:00
|
|
|
></my-video-actions-dropdown>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
<my-video-cell [video]="video"></my-video-cell>
|
|
|
|
</td>
|
|
|
|
|
2021-10-29 10:54:27 +02:00
|
|
|
<td>
|
2022-06-08 16:14:24 +02:00
|
|
|
<span class="pt-badge badge-blue" *ngIf="video.isLocal">Local</span>
|
|
|
|
<span class="pt-badge badge-purple" *ngIf="!video.isLocal">Remote</span>
|
2021-11-17 10:18:57 +01:00
|
|
|
|
2022-06-08 16:14:24 +02:00
|
|
|
<span [ngClass]="getPrivacyBadgeClass(video)" class="pt-badge">{{ video.privacy.label }}</span>
|
2021-10-27 14:37:04 +02:00
|
|
|
|
2022-06-08 16:14:24 +02:00
|
|
|
<span *ngIf="video.nsfw" class="pt-badge badge-red" i18n>NSFW</span>
|
2021-10-27 14:37:04 +02:00
|
|
|
|
2022-06-08 16:14:24 +02:00
|
|
|
<span *ngIf="isUnpublished(video)" class="pt-badge badge-yellow" i18n>{{ video.state.label }}</span>
|
2021-10-27 14:37:04 +02:00
|
|
|
|
2022-06-08 16:14:24 +02:00
|
|
|
<span *ngIf="isAccountBlocked(video)" class="pt-badge badge-red" i18n>Account muted</span>
|
|
|
|
<span *ngIf="isServerBlocked(video)" class="pt-badge badge-red" i18n>Server muted</span>
|
2021-10-27 14:37:04 +02:00
|
|
|
|
2022-06-08 16:14:24 +02:00
|
|
|
<span *ngIf="isVideoBlocked(video)" class="pt-badge badge-red" i18n>Blocked</span>
|
2021-10-27 11:42:05 +02:00
|
|
|
</td>
|
|
|
|
|
2021-10-29 10:54:27 +02:00
|
|
|
<td>
|
2022-06-08 16:14:24 +02:00
|
|
|
<span *ngIf="isHLS(video)" class="pt-badge badge-blue">HLS</span>
|
|
|
|
<span *ngIf="isWebTorrent(video)" class="pt-badge badge-blue">WebTorrent ({{ video.files.length }})</span>
|
2022-10-10 14:42:51 +02:00
|
|
|
<span i18n *ngIf="video.isLive" class="pt-badge badge-blue">Live</span>
|
|
|
|
<span i18n *ngIf="hasObjectStorage(video)" class="pt-badge badge-purple">Object storage</span>
|
2021-10-29 10:54:27 +02:00
|
|
|
|
2021-11-03 11:32:41 +01:00
|
|
|
<span *ngIf="!isImport(video) && !video.isLive && video.isLocal">{{ getFilesSize(video) | bytes: 1 }}</span>
|
2021-10-29 10:54:27 +02:00
|
|
|
</td>
|
|
|
|
|
2021-10-27 11:42:05 +02:00
|
|
|
<td>
|
|
|
|
{{ video.publishedAt | date: 'short' }}
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
<ng-template pTemplate="rowexpansion" let-video>
|
|
|
|
<tr>
|
2023-05-26 10:27:02 +02:00
|
|
|
<td class="video-info expand-cell" myAutoColspan>
|
2021-10-29 10:54:27 +02:00
|
|
|
<div>
|
|
|
|
<div *ngIf="isWebTorrent(video)">
|
|
|
|
WebTorrent:
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li *ngFor="let file of video.files">
|
2022-10-10 14:44:51 +02:00
|
|
|
<a target="_blank" rel="noopener noreferrer" [href]="file.fileUrl">{{ file.resolution.label }}</a>: {{ file.size | bytes: 1 }}
|
2022-07-29 14:50:41 +02:00
|
|
|
|
|
|
|
<my-global-icon
|
2022-09-13 12:00:13 +02:00
|
|
|
*ngIf="canRemoveOneFile(video)"
|
2022-07-29 14:50:41 +02:00
|
|
|
i18n-ngbTooltip ngbTooltip="Delete this file" iconName="delete" role="button"
|
|
|
|
(click)="removeVideoFile(video, file, 'webtorrent')"
|
|
|
|
></my-global-icon>
|
2021-10-29 10:54:27 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div *ngIf="isHLS(video)">
|
|
|
|
HLS:
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li *ngFor="let file of video.streamingPlaylists[0].files">
|
2022-10-10 14:44:51 +02:00
|
|
|
<a target="_blank" rel="noopener noreferrer" [href]="file.fileUrl">{{ file.resolution.label }}</a>: {{ file.size | bytes: 1 }}
|
2022-07-29 14:50:41 +02:00
|
|
|
|
|
|
|
<my-global-icon
|
2022-09-13 12:00:13 +02:00
|
|
|
*ngIf="canRemoveOneFile(video)"
|
2022-07-29 14:50:41 +02:00
|
|
|
i18n-ngbTooltip ngbTooltip="Delete this file" iconName="delete" role="button"
|
|
|
|
(click)="removeVideoFile(video, file, 'hls')"
|
|
|
|
></my-global-icon>
|
2021-10-29 10:54:27 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
|
2022-06-08 16:14:24 +02:00
|
|
|
<my-embed class="ms-auto" [video]="video"></my-embed>
|
2021-10-29 10:54:27 +02:00
|
|
|
</div>
|
2021-10-27 11:42:05 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</ng-template>
|
|
|
|
</p-table>
|
2021-11-17 11:18:49 +01:00
|
|
|
|
2021-11-17 16:04:53 +01:00
|
|
|
<my-video-block #videoBlockModal (videoBlocked)="reloadData()"></my-video-block>
|