+ static GET_ACTOR_AVATAR_URL (actor: { avatars: { width: number, url?: string, path: string }[] }, size: number) {
+ return Actor.GET_ACTOR_AVATAR_URL(actor, size)
+ }
+
+ static GET_ACTOR_BANNER_URL (channel: ServerVideoChannel) {
+ if (!channel || channel.banners.length === 0) {
+ return ''
+ }
+
+ const banner = channel.banners[0]
+ if (!banner) return ''
+
+ if (banner.url) return banner.url
+ return getAbsoluteAPIUrl() + banner.path
+ }
+
+ static GET_DEFAULT_AVATAR_URL (size: number) {
+ if (size <= 48) {
+ return `${window.location.origin}/client/assets/images/default-avatar-video-channel-48x48.png`
+ }
+
+ return `${window.location.origin}/client/assets/images/default-avatar-video-channel.png`
+ }
+
+ constructor (hash: Partial<ServerVideoChannel>) {