ActivityPub-federated video streaming platform using P2P directly in your web browser
Add possibility to share origin URL to video if it's not local
Jeenadd1e2f2f96d7
diff --git a/client/src/app/shared/shared-share-modal/video-share.component.html b/client/src/app/shared/shared-share-modal/video-share.component.htmlindex 4174458b54..3222dc5a68 100644--- a/client/src/app/shared/shared-share-modal/video-share.component.html+++ b/client/src/app/shared/shared-share-modal/video-share.component.html@@ -173,6 +173,13 @@i18n-labelText labelText="Loop"></my-peertube-checkbox></div>++ <div *ngIf="!isLocalVideo() && !isVideoInEmbedTab()" class="form-group">+ <my-peertube-checkbox+ inputName="originUrl" [(ngModel)]="customizations.originUrl"+ i18n-labelText labelText="Use origin instance URL"+ ></my-peertube-checkbox>+ </div></div><ng-container *ngIf="isVideoInEmbedTab()">diff --git a/client/src/app/shared/shared-share-modal/video-share.component.ts b/client/src/app/shared/shared-share-modal/video-share.component.tsindex f57a50770a..b06ff37511 100644--- a/client/src/app/shared/shared-share-modal/video-share.component.ts+++ b/client/src/app/shared/shared-share-modal/video-share.component.ts@@ -16,6 +16,7 @@ type Customizations = {subtitle: stringloop: boolean+ originUrl: booleanautoplay: booleanmuted: booleantitle: boolean@@ -65,6 +66,7 @@ export class VideoShareComponent {subtitle,loop: false,+ originUrl: false,autoplay: false,muted: false,@@ -95,7 +97,8 @@ export class VideoShareComponent {}getVideoUrl () {- const baseUrl = window.location.origin + '/videos/watch/' + this.video.uuid+ let baseUrl = this.customizations.originUrl ? this.video.originInstanceUrl : window.location.origin+ baseUrl += '/videos/watch/' + this.video.uuidconst options = this.getVideoOptions(baseUrl)return buildVideoLink(options)@@ -117,6 +120,10 @@ export class VideoShareComponent {return this.activeVideoId === 'embed'}+ isLocalVideo () {+ return this.video.isLocal+ }+private getPlaylistOptions (baseUrl?: string) {return {baseUrl,