diff options
Diffstat (limited to 'client/src/app/shared/shared-share-modal/video-share.component.ts')
-rw-r--r-- | client/src/app/shared/shared-share-modal/video-share.component.ts | 9 |
1 files changed, 8 insertions, 1 deletions
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, |