1 <ng-template #modal
let-hide=
"close">
2 <div class=
"modal-header">
3 <h4 class=
"modal-title">
4 <ng-container i18n
>Download
</ng-container>
6 <div *
ngIf=
"videoCaptions" ngbDropdown
class=
"d-inline-block ml-1">
7 <span id=
"dropdownDownloadType" ngbDropdownToggle
>
10 <div ngbDropdownMenu
aria-labelledby=
"dropdownDownloadType">
11 <button *
ngIf=
"type === 'video'" (click)=
"switchToType('subtitles')" ngbDropdownItem i18n
>subtitles
</button>
12 <button *
ngIf=
"type === 'subtitles'" (click)=
"switchToType('video')" ngbDropdownItem i18n
>video
</button>
16 <my-global-icon iconName=
"cross" aria-label=
"Close" role=
"button" (click)=
"hide()"></my-global-icon>
19 <div class=
"modal-body">
20 <div class=
"form-group">
21 <div class=
"alert alert-warning" *
ngIf=
"isConfidentialVideo()" i18n
>
22 The following link contains a private token and should not be shared with anyone.
25 <div class=
"input-group input-group-sm">
26 <div class=
"input-group-prepend peertube-select-container">
27 <select *
ngIf=
"type === 'video'" [(ngModel)]=
"resolutionId" (ngModelChange)=
"onResolutionIdChange()">
28 <option *
ngFor=
"let file of getVideoFiles()" [value]=
"file.resolution.id">{{ file.resolution.label }}
</option>
31 <select *
ngIf=
"type === 'subtitles'" [(ngModel)]=
"subtitleLanguageId">
32 <option *
ngFor=
"let caption of videoCaptions" [value]=
"caption.language.id">{{ caption.language.label }}
</option>
36 <input #urlInput (click)=
"urlInput.select()" type=
"text" class=
"form-control input-sm readonly" readonly [value]=
"getLink()" />
37 <div class=
"input-group-append" *
ngIf=
"!isConfidentialVideo()">
38 <button [cdkCopyToClipboard]=
"urlInput.value" (click)=
"activateCopiedMessage()" type=
"button" class=
"btn btn-outline-secondary">
39 <span class=
"glyphicon glyphicon-copy"></span>
45 <ng-container *
ngIf=
"type === 'video' && videoFile?.metadata">
46 <div ngbNav #
nav=
"ngbNav" class=
"nav-tabs">
48 <ng-container ngbNavItem
>
49 <a ngbNavLink i18n
>Format
</a>
50 <ng-template ngbNavContent
>
51 <div class=
"file-metadata">
52 <div class=
"metadata-attribute metadata-attribute-tags" *
ngFor=
"let item of videoFileMetadataFormat | keyvalue">
53 <span i18n
class=
"metadata-attribute-label">{{ item.value.label }}
</span>
54 <span class=
"metadata-attribute-value">{{ item.value.value }}
</span>
60 <ng-container ngbNavItem [disabled]=
"videoFileMetadataVideoStream === undefined">
61 <a ngbNavLink i18n
>Video stream
</a>
62 <ng-template ngbNavContent
>
63 <div class=
"file-metadata">
64 <div class=
"metadata-attribute metadata-attribute-tags" *
ngFor=
"let item of videoFileMetadataVideoStream | keyvalue">
65 <span i18n
class=
"metadata-attribute-label">{{ item.value.label }}
</span>
66 <span class=
"metadata-attribute-value">{{ item.value.value }}
</span>
72 <ng-container ngbNavItem [disabled]=
"videoFileMetadataAudioStream === undefined">
73 <a ngbNavLink i18n
>Audio stream
</a>
74 <ng-template ngbNavContent
>
75 <div class=
"file-metadata">
76 <div class=
"metadata-attribute metadata-attribute-tags" *
ngFor=
"let item of videoFileMetadataAudioStream | keyvalue">
77 <span i18n
class=
"metadata-attribute-label">{{ item.value.label }}
</span>
78 <span class=
"metadata-attribute-value">{{ item.value.value }}
</span>
85 <div [ngbNavOutlet]=
"nav"></div>
88 <div class=
"download-type" *
ngIf=
"type === 'video'">
89 <div class=
"peertube-radio-container">
90 <input type=
"radio" name=
"download" id=
"download-direct" [(ngModel)]=
"downloadType" value=
"direct">
91 <label i18n
for=
"download-direct">Direct download
</label>
94 <div class=
"peertube-radio-container">
95 <input type=
"radio" name=
"download" id=
"download-torrent" [(ngModel)]=
"downloadType" value=
"torrent">
96 <label i18n
for=
"download-torrent">Torrent (.torrent file)
</label>
101 <div class=
"modal-footer inputs">
103 type=
"button" role=
"button" i18n-value
value=
"Cancel" class=
"action-button action-button-cancel"
104 (click)=
"hide()" (key.enter)=
"hide()"
108 type=
"submit" i18n-value
value=
"Download" class=
"action-button-submit"