diff options
Diffstat (limited to 'client/src/app/shared')
3 files changed, 11 insertions, 5 deletions
diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts index 21d2ea47d..c7dc5f4d2 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts +++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as debug from 'debug' | 1 | import * as debug from 'debug' |
2 | import truncate from 'lodash-es/truncate' | 2 | import truncate from 'lodash-es/truncate' |
3 | import { SortMeta } from 'primeng/api' | 3 | import { SortMeta } from 'primeng/api' |
4 | import { buildVideoEmbed, buildVideoLink } from 'src/assets/player/utils' | 4 | import { buildVideoOrPlaylistEmbed, buildVideoLink } from 'src/assets/player/utils' |
5 | import { environment } from 'src/environments/environment' | 5 | import { environment } from 'src/environments/environment' |
6 | import { AfterViewInit, Component, OnInit, ViewChild, Input } from '@angular/core' | 6 | import { AfterViewInit, Component, OnInit, ViewChild, Input } from '@angular/core' |
7 | import { DomSanitizer } from '@angular/platform-browser' | 7 | import { DomSanitizer } from '@angular/platform-browser' |
@@ -141,7 +141,7 @@ export class AbuseListTableComponent extends RestTable implements OnInit, AfterV | |||
141 | } | 141 | } |
142 | 142 | ||
143 | getVideoEmbed (abuse: AdminAbuse) { | 143 | getVideoEmbed (abuse: AdminAbuse) { |
144 | return buildVideoEmbed( | 144 | return buildVideoOrPlaylistEmbed( |
145 | buildVideoLink({ | 145 | buildVideoLink({ |
146 | baseUrl: `${environment.embedUrl}/videos/embed/${abuse.video.uuid}`, | 146 | baseUrl: `${environment.embedUrl}/videos/embed/${abuse.video.uuid}`, |
147 | title: false, | 147 | title: false, |
diff --git a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts index 09ab98dfe..794dd54bb 100644 --- a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts +++ b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { mapValues, pickBy } from 'lodash-es' | 1 | import { mapValues, pickBy } from 'lodash-es' |
2 | import { buildVideoEmbed, buildVideoLink } from 'src/assets/player/utils' | 2 | import { buildVideoOrPlaylistEmbed, buildVideoLink } from 'src/assets/player/utils' |
3 | import { Component, Input, OnInit, ViewChild } from '@angular/core' | 3 | import { Component, Input, OnInit, ViewChild } from '@angular/core' |
4 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' | 4 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' |
5 | import { Notifier } from '@app/core' | 5 | import { Notifier } from '@app/core' |
@@ -58,7 +58,7 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
58 | 58 | ||
59 | getVideoEmbed () { | 59 | getVideoEmbed () { |
60 | return this.sanitizer.bypassSecurityTrustHtml( | 60 | return this.sanitizer.bypassSecurityTrustHtml( |
61 | buildVideoEmbed( | 61 | buildVideoOrPlaylistEmbed( |
62 | buildVideoLink({ | 62 | buildVideoLink({ |
63 | baseUrl: this.video.embedUrl, | 63 | baseUrl: this.video.embedUrl, |
64 | title: false, | 64 | title: false, |
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts index 7de379cdf..3db3b7a2e 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { getAbsoluteAPIUrl } from '@app/helpers' | 1 | import { getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers' |
2 | import { Actor } from '@app/shared/shared-main' | 2 | import { Actor } from '@app/shared/shared-main' |
3 | import { peertubeTranslate } from '@shared/core-utils/i18n' | 3 | import { peertubeTranslate } from '@shared/core-utils/i18n' |
4 | import { | 4 | import { |
@@ -33,6 +33,9 @@ export class VideoPlaylist implements ServerVideoPlaylist { | |||
33 | 33 | ||
34 | thumbnailUrl: string | 34 | thumbnailUrl: string |
35 | 35 | ||
36 | embedPath: string | ||
37 | embedUrl: string | ||
38 | |||
36 | ownerBy: string | 39 | ownerBy: string |
37 | ownerAvatarUrl: string | 40 | ownerAvatarUrl: string |
38 | 41 | ||
@@ -63,6 +66,9 @@ export class VideoPlaylist implements ServerVideoPlaylist { | |||
63 | this.thumbnailUrl = window.location.origin + '/client/assets/images/default-playlist.jpg' | 66 | this.thumbnailUrl = window.location.origin + '/client/assets/images/default-playlist.jpg' |
64 | } | 67 | } |
65 | 68 | ||
69 | this.embedPath = hash.embedPath | ||
70 | this.embedUrl = getAbsoluteEmbedUrl() + hash.embedPath | ||
71 | |||
66 | this.videosLength = hash.videosLength | 72 | this.videosLength = hash.videosLength |
67 | 73 | ||
68 | this.type = hash.type | 74 | this.type = hash.type |