Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Merge branch 'develop' into pr/1217

Chocobozzz88108880bbdb
diff --cc client/src/app/shared/video/video-details.model.ts
index 5ff3926c47,f44b4138b2..3883573436
--- a/client/src/app/shared/video/video-details.model.ts
+++ b/client/src/app/shared/video/video-details.model.ts
@@@ -30,8 -35,10 +36,11 @@@ export class VideoDetails extends Vide
this.tags = hash.tags
this.support = hash.support
this.commentsEnabled = hash.commentsEnabled
+ this.downloadEnabled = hash.downloadEnabled
+ this.trackerUrls = hash.trackerUrls
+ this.streamingPlaylists = hash.streamingPlaylists
+
this.buildLikeAndDislikePercents()
}
diff --cc client/src/app/videos/+video-edit/shared/video-edit.component.html
index 8c74a1ca6f,092c0e8622..7fd9af208e
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.html
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.html
@@@ -125,12 -125,8 +125,13 @@@
i18n-labelText labelText="Enable video comments"
></my-peertube-checkbox>
+ <my-peertube-checkbox
+ inputName="downloadEnabled" formControlName="downloadEnabled"
- i18n-labelText labelText="Disable downloading"
++ i18n-labelText labelText="Download enabled"
+ ></my-peertube-checkbox>
+
<my-peertube-checkbox
+ *ngIf="waitTranscodingEnabled"
inputName="waitTranscoding" formControlName="waitTranscoding"
i18n-labelText labelText="Wait transcoding before publishing the video"
i18n-helpHtml helpHtml="If you decide not to wait for transcoding before publishing the video, it could be unplayable until transcoding ends."
diff --cc client/src/app/videos/+video-edit/shared/video-edit.component.ts
index 1dae931e2b,85e0159010..3ed7a4a107
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts
@@@ -77,10 -78,9 +78,10 @@@ export class VideoEditComponent impleme
}
updateForm () {
- const defaultValues = {
+ const defaultValues: any = {
nsfw: 'false',
commentsEnabled: 'true',
+ downloadEnabled: 'true',
waitTranscoding: 'true',
tags: []
}
diff --cc client/src/app/videos/+video-watch/video-watch.component.html
index ba04d638f6,709eb91a87..1875230d84
--- a/client/src/app/videos/+video-watch/video-watch.component.html
+++ b/client/src/app/videos/+video-watch/video-watch.component.html
@@@ -80,8 -82,8 +82,8 @@@
</div>
<div ngbDropdownMenu>
- <a class="dropdown-item" i18n-title title="Download the video" href="#" (click)="showDownloadModal($event)">
+ <a *ngIf="isVideoDownloadable()" class="dropdown-item" i18n-title title="Download the video" href="#" (click)="showDownloadModal($event)">
- <span class="icon icon-download"></span> <ng-container i18n>Download</ng-container>
+ <my-global-icon iconName="download"></my-global-icon> <ng-container i18n>Download</ng-container>
</a>
<a *ngIf="isUserLoggedIn()" class="dropdown-item" i18n-title title="Report this video" href="#" (click)="showReportModal($event)">
diff --cc server/helpers/activitypub.ts
index 2469b37b1f,eba552524d..62d78373ef
--- a/server/helpers/activitypub.ts
+++ b/server/helpers/activitypub.ts
@@@ -14,25 -15,25 +15,26 @@@ function activityPubContextify <T> (dat
'https://w3id.org/security/v1',
{
RsaSignature2017: 'https://w3id.org/security#RsaSignature2017',
- pt: 'https://joinpeertube.org/ns',
- schema: 'http://schema.org#',
+ pt: 'https://joinpeertube.org/ns#',
+ sc: 'http://schema.org#',
Hashtag: 'as:Hashtag',
- uuid: 'schema:identifier',
- category: 'schema:category',
- licence: 'schema:license',
- subtitleLanguage: 'schema:subtitleLanguage',
+ uuid: 'sc:identifier',
+ category: 'sc:category',
+ licence: 'sc:license',
+ subtitleLanguage: 'sc:subtitleLanguage',
sensitive: 'as:sensitive',
- language: 'schema:inLanguage',
- views: 'schema:Number',
- stats: 'schema:Number',
- size: 'schema:Number',
- fps: 'schema:Number',
- commentsEnabled: 'schema:Boolean',
- downloadEnabled: 'schema:Boolean',
- waitTranscoding: 'schema:Boolean',
- expires: 'schema:expires',
- support: 'schema:Text',
- CacheFile: 'pt:CacheFile'
+ language: 'sc:inLanguage',
+ views: 'sc:Number',
+ state: 'sc:Number',
+ size: 'sc:Number',
+ fps: 'sc:Number',
+ commentsEnabled: 'sc:Boolean',
++ downloadEnabled: 'sc:Boolean',
+ waitTranscoding: 'sc:Boolean',
+ expires: 'sc:expires',
+ support: 'sc:Text',
+ CacheFile: 'pt:CacheFile',
+ Infohash: 'pt:Infohash'
},
{
likes: {