aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/video/video.model.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-29 19:10:13 +0100
committerChocobozzz <me@florianbigard.com>2017-12-29 19:10:13 +0100
commitc5911fd347c76e8bdc05ea9f3ee9efed4a58c236 (patch)
treeb8d287daca6c45305090cbec9da97d1155f275bd /client/src/app/shared/video/video.model.ts
parent8b0d42ee372de6589796be26b83e5bffb1b69cdf (diff)
downloadPeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.tar.gz
PeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.tar.zst
PeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.zip
Begin to add avatar to actors
Diffstat (limited to 'client/src/app/shared/video/video.model.ts')
-rw-r--r--client/src/app/shared/video/video.model.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/client/src/app/shared/video/video.model.ts b/client/src/app/shared/video/video.model.ts
index f159464c5..060bf933f 100644
--- a/client/src/app/shared/video/video.model.ts
+++ b/client/src/app/shared/video/video.model.ts
@@ -2,6 +2,7 @@ import { User } from '../'
2import { Video as VideoServerModel } from '../../../../../shared' 2import { Video as VideoServerModel } from '../../../../../shared'
3import { Account } from '../../../../../shared/models/actors' 3import { Account } from '../../../../../shared/models/actors'
4import { environment } from '../../../environments/environment' 4import { environment } from '../../../environments/environment'
5import { getAbsoluteAPIUrl } from '../misc/utils'
5 6
6export class Video implements VideoServerModel { 7export class Video implements VideoServerModel {
7 accountName: string 8 accountName: string
@@ -48,11 +49,7 @@ export class Video implements VideoServerModel {
48 } 49 }
49 50
50 constructor (hash: VideoServerModel) { 51 constructor (hash: VideoServerModel) {
51 let absoluteAPIUrl = environment.apiUrl 52 const absoluteAPIUrl = getAbsoluteAPIUrl()
52 if (!absoluteAPIUrl) {
53 // The API is on the same domain
54 absoluteAPIUrl = window.location.origin
55 }
56 53
57 this.accountName = hash.accountName 54 this.accountName = hash.accountName
58 this.createdAt = new Date(hash.createdAt.toString()) 55 this.createdAt = new Date(hash.createdAt.toString())