aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-17 16:22:14 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-17 16:22:14 +0200
commitc6e0bfbf582205410bf166118956a368f6a4cbaa (patch)
tree7a3c256471daa2981c50276a82fc366a55b75d91 /client
parent031094f7992366d8d1f6583b205f984ffadf637a (diff)
downloadPeerTube-c6e0bfbf582205410bf166118956a368f6a4cbaa.tar.gz
PeerTube-c6e0bfbf582205410bf166118956a368f6a4cbaa.tar.zst
PeerTube-c6e0bfbf582205410bf166118956a368f6a4cbaa.zip
Fix share embed iframe link
Diffstat (limited to 'client')
-rw-r--r--client/src/app/videos/shared/video.model.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/client/src/app/videos/shared/video.model.ts b/client/src/app/videos/shared/video.model.ts
index 51c5319ea..6e8dfaa6f 100644
--- a/client/src/app/videos/shared/video.model.ts
+++ b/client/src/app/videos/shared/video.model.ts
@@ -73,6 +73,12 @@ export class Video implements VideoServerModel {
73 nsfw: boolean, 73 nsfw: boolean,
74 files: VideoFile[] 74 files: VideoFile[]
75 }) { 75 }) {
76 let absoluteAPIUrl = API_URL
77 if (!absoluteAPIUrl) {
78 // The API is on the same domain
79 absoluteAPIUrl = window.location.origin
80 }
81
76 this.author = hash.author 82 this.author = hash.author
77 this.createdAt = new Date(hash.createdAt.toString()) 83 this.createdAt = new Date(hash.createdAt.toString())
78 this.categoryLabel = hash.categoryLabel 84 this.categoryLabel = hash.categoryLabel
@@ -91,11 +97,11 @@ export class Video implements VideoServerModel {
91 this.podHost = hash.podHost 97 this.podHost = hash.podHost
92 this.tags = hash.tags 98 this.tags = hash.tags
93 this.thumbnailPath = hash.thumbnailPath 99 this.thumbnailPath = hash.thumbnailPath
94 this.thumbnailUrl = API_URL + hash.thumbnailPath 100 this.thumbnailUrl = absoluteAPIUrl + hash.thumbnailPath
95 this.previewPath = hash.previewPath 101 this.previewPath = hash.previewPath
96 this.previewUrl = API_URL + hash.previewPath 102 this.previewUrl = absoluteAPIUrl + hash.previewPath
97 this.embedPath = hash.embedPath 103 this.embedPath = hash.embedPath
98 this.embedUrl = API_URL + hash.embedPath 104 this.embedUrl = absoluteAPIUrl + hash.embedPath
99 this.views = hash.views 105 this.views = hash.views
100 this.likes = hash.likes 106 this.likes = hash.likes
101 this.dislikes = hash.dislikes 107 this.dislikes = hash.dislikes