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 class=
"peertube-select-container title-select" *
ngIf=
"hasCaptions()">
7 <select id=
"type" name=
"type" [(ngModel)]=
"type" class=
"form-control">
8 <option value=
"video" i18n
>Video
</option>
9 <option value=
"subtitles" i18n
>Subtitles
</option>
14 <my-global-icon iconName=
"cross" aria-label=
"Close" role=
"button" (click)=
"hide()"></my-global-icon>
17 <div class=
"modal-body">
18 <div class=
"alert alert-warning" *
ngIf=
"isConfidentialVideo()" i18n
>
19 The following link contains a private token and should not be shared with anyone.
23 <ng-container *
ngIf=
"type === 'subtitles'">
24 <div ngbNav #
subtitleNav=
"ngbNav" class=
"nav-tabs" [activeId]=
"subtitleLanguageId" (activeIdChange)=
"onSubtitleIdChange($event)">
26 <ng-container *
ngFor=
"let caption of getCaptions()" [ngbNavItem]=
"caption.language.id">
27 <a ngbNavLink i18n
>{{ caption.language.label }}
</a>
29 <ng-template ngbNavContent
>
30 <div class=
"nav-content">
31 <div class=
"input-group input-group-sm">
32 <input #urlInput (click)=
"urlInput.select()" type=
"text" class=
"form-control input-sm readonly" readonly [value]=
"getLink()" />
34 <div class=
"input-group-append" *
ngIf=
"!isConfidentialVideo()">
35 <button [cdkCopyToClipboard]=
"urlInput.value" (click)=
"activateCopiedMessage()" type=
"button" class=
"btn btn-outline-secondary">
36 <span class=
"glyphicon glyphicon-duplicate"></span>
45 <div [ngbNavOutlet]=
"subtitleNav"></div>
49 <ng-container *
ngIf=
"type === 'video'">
50 <div ngbNav #
resolutionNav=
"ngbNav" class=
"nav-tabs" [activeId]=
"resolutionId" (activeIdChange)=
"onResolutionIdChange($event)">
51 <ng-container *
ngFor=
"let file of getVideoFiles()" [ngbNavItem]=
"file.resolution.id">
52 <a ngbNavLink i18n
>{{ file.resolution.label }}
</a>
54 <ng-template ngbNavContent
>
55 <div class=
"nav-content">
56 <div class=
"input-group input-group-sm">
57 <input #urlInput (click)=
"urlInput.select()" type=
"text" class=
"form-control input-sm readonly" readonly [value]=
"getLink()" />
58 <div class=
"input-group-append" *
ngIf=
"!isConfidentialVideo()">
59 <button [cdkCopyToClipboard]=
"urlInput.value" (click)=
"activateCopiedMessage()" type=
"button" class=
"btn btn-outline-secondary">
60 <span class=
"glyphicon glyphicon-duplicate"></span>
69 <div [ngbNavOutlet]=
"resolutionNav"></div>
71 <div class=
"advanced-filters collapse-transition" [ngbCollapse]=
"isAdvancedCustomizationCollapsed">
72 <div ngbNav #
navMetadata=
"ngbNav" class=
"nav-tabs nav-metadata">
73 <ng-container ngbNavItem
>
74 <a ngbNavLink i18n
>Format
</a>
75 <ng-template ngbNavContent
>
76 <div class=
"file-metadata">
77 <div class=
"metadata-attribute metadata-attribute-tags" *
ngFor=
"let item of videoFileMetadataFormat | keyvalue">
78 <span i18n
class=
"metadata-attribute-label">{{ item.value.label }}
</span>
79 <span class=
"metadata-attribute-value">{{ item.value.value }}
</span>
84 <ng-container ngbNavItem [disabled]=
"videoFileMetadataVideoStream === undefined">
85 <a ngbNavLink i18n
>Video stream
</a>
86 <ng-template ngbNavContent
>
87 <div class=
"file-metadata">
88 <div class=
"metadata-attribute metadata-attribute-tags" *
ngFor=
"let item of videoFileMetadataVideoStream | keyvalue">
89 <span i18n
class=
"metadata-attribute-label">{{ item.value.label }}
</span>
90 <span class=
"metadata-attribute-value">{{ item.value.value }}
</span>
96 <ng-container ngbNavItem [disabled]=
"videoFileMetadataAudioStream === undefined">
97 <a ngbNavLink i18n
>Audio stream
</a>
98 <ng-template ngbNavContent
>
99 <div class=
"file-metadata">
100 <div class=
"metadata-attribute metadata-attribute-tags" *
ngFor=
"let item of videoFileMetadataAudioStream | keyvalue">
101 <span i18n
class=
"metadata-attribute-label">{{ item.value.label }}
</span>
102 <span class=
"metadata-attribute-value">{{ item.value.value }}
</span>
111 <div *
ngIf=
"getFileMetadata()" [ngbNavOutlet]=
"navMetadata"></div>
113 <div class=
"download-type">
114 <div class=
"peertube-radio-container">
115 <input type=
"radio" name=
"download" id=
"download-direct" [(ngModel)]=
"downloadType" value=
"direct">
116 <label i18n
for=
"download-direct">Direct download
</label>
119 <div class=
"peertube-radio-container">
120 <input type=
"radio" name=
"download" id=
"download-torrent" [(ngModel)]=
"downloadType" value=
"torrent">
121 <label i18n
for=
"download-torrent">Torrent (.torrent file)
</label>
127 (click)=
"isAdvancedCustomizationCollapsed = !isAdvancedCustomizationCollapsed"
128 role=
"button" class=
"advanced-filters-button"
129 [attr.aria-expanded]=
"!isAdvancedCustomizationCollapsed" aria-controls=
"collapseBasic"
131 <ng-container *
ngIf=
"isAdvancedCustomizationCollapsed">
132 <span class=
"glyphicon glyphicon-menu-down"></span>
139 <ng-container *
ngIf=
"!isAdvancedCustomizationCollapsed">
140 <span class=
"glyphicon glyphicon-menu-up"></span>
150 <div class=
"modal-footer inputs">
152 type=
"button" role=
"button" i18n-value
value=
"Cancel" class=
"peertube-button grey-button"
153 (click)=
"hide()" (key.enter)=
"hide()"
156 <input type=
"submit" i18n-value
value=
"Download" class=
"peertube-button orange-button" (click)=
"download()" />