1 import { VideoChannel as ServerVideoChannel } from '../../../../../shared/models/videos'
2 import { Actor } from '../actor/actor.model'
3 import { Account } from '../../../../../shared/models/actors'
5 export class VideoChannel extends Actor implements ServerVideoChannel {
11 ownerAccount?: Account
13 ownerAvatarUrl?: string
15 constructor (hash: ServerVideoChannel) {
18 this.displayName = hash.displayName
19 this.description = hash.description
20 this.support = hash.support
21 this.isLocal = hash.isLocal
22 this.nameWithHost = Actor.CREATE_BY_STRING(this.name, this.host)
24 if (hash.ownerAccount) {
25 this.ownerAccount = hash.ownerAccount
26 this.ownerBy = Actor.CREATE_BY_STRING(hash.ownerAccount.name, hash.ownerAccount.host)
27 this.ownerAvatarUrl = Actor.GET_ACTOR_AVATAR_URL(this.ownerAccount)