aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-share-modal
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-share-modal')
-rw-r--r--client/src/app/shared/shared-share-modal/video-share.component.html7
-rw-r--r--client/src/app/shared/shared-share-modal/video-share.component.ts9
2 files changed, 15 insertions, 1 deletions
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.html
index 4174458b5..3222dc5a6 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 @@
173 i18n-labelText labelText="Loop" 173 i18n-labelText labelText="Loop"
174 ></my-peertube-checkbox> 174 ></my-peertube-checkbox>
175 </div> 175 </div>
176
177 <div *ngIf="!isLocalVideo() && !isVideoInEmbedTab()" class="form-group">
178 <my-peertube-checkbox
179 inputName="originUrl" [(ngModel)]="customizations.originUrl"
180 i18n-labelText labelText="Use origin instance URL"
181 ></my-peertube-checkbox>
182 </div>
176 </div> 183 </div>
177 184
178 <ng-container *ngIf="isVideoInEmbedTab()"> 185 <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.ts
index f57a50770..b06ff3751 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 = {
16 subtitle: string 16 subtitle: string
17 17
18 loop: boolean 18 loop: boolean
19 originUrl: boolean
19 autoplay: boolean 20 autoplay: boolean
20 muted: boolean 21 muted: boolean
21 title: boolean 22 title: boolean
@@ -65,6 +66,7 @@ export class VideoShareComponent {
65 subtitle, 66 subtitle,
66 67
67 loop: false, 68 loop: false,
69 originUrl: false,
68 autoplay: false, 70 autoplay: false,
69 muted: false, 71 muted: false,
70 72
@@ -95,7 +97,8 @@ export class VideoShareComponent {
95 } 97 }
96 98
97 getVideoUrl () { 99 getVideoUrl () {
98 const baseUrl = window.location.origin + '/videos/watch/' + this.video.uuid 100 let baseUrl = this.customizations.originUrl ? this.video.originInstanceUrl : window.location.origin
101 baseUrl += '/videos/watch/' + this.video.uuid
99 const options = this.getVideoOptions(baseUrl) 102 const options = this.getVideoOptions(baseUrl)
100 103
101 return buildVideoLink(options) 104 return buildVideoLink(options)
@@ -117,6 +120,10 @@ export class VideoShareComponent {
117 return this.activeVideoId === 'embed' 120 return this.activeVideoId === 'embed'
118 } 121 }
119 122
123 isLocalVideo () {
124 return this.video.isLocal
125 }
126
120 private getPlaylistOptions (baseUrl?: string) { 127 private getPlaylistOptions (baseUrl?: string) {
121 return { 128 return {
122 baseUrl, 129 baseUrl,