diff options
author | Chocobozzz <me@florianbigard.com> | 2021-05-31 11:33:49 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-05-31 11:33:49 +0200 |
commit | 8ee25e17b88b970703f4df9e74cb4726bbffd837 (patch) | |
tree | 450d73715c747c82efe6c919ebeda6411c01c5e0 /client/src/app/shared/shared-custom-markup/embed-markup.component.ts | |
parent | 15f35256af15b97d2298cc44e76ffcafe73a1c88 (diff) | |
download | PeerTube-8ee25e17b88b970703f4df9e74cb4726bbffd837.tar.gz PeerTube-8ee25e17b88b970703f4df9e74cb4726bbffd837.tar.zst PeerTube-8ee25e17b88b970703f4df9e74cb4726bbffd837.zip |
Add ability to set custom markdown in description
Diffstat (limited to 'client/src/app/shared/shared-custom-markup/embed-markup.component.ts')
-rw-r--r-- | client/src/app/shared/shared-custom-markup/embed-markup.component.ts | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/client/src/app/shared/shared-custom-markup/embed-markup.component.ts b/client/src/app/shared/shared-custom-markup/embed-markup.component.ts deleted file mode 100644 index a854d89f6..000000000 --- a/client/src/app/shared/shared-custom-markup/embed-markup.component.ts +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | import { buildPlaylistLink, buildVideoLink, buildVideoOrPlaylistEmbed } from 'src/assets/player/utils' | ||
2 | import { environment } from 'src/environments/environment' | ||
3 | import { Component, ElementRef, Input, OnInit } from '@angular/core' | ||
4 | |||
5 | @Component({ | ||
6 | selector: 'my-embed-markup', | ||
7 | template: '' | ||
8 | }) | ||
9 | export class EmbedMarkupComponent implements OnInit { | ||
10 | @Input() uuid: string | ||
11 | @Input() type: 'video' | 'playlist' = 'video' | ||
12 | |||
13 | constructor (private el: ElementRef) { } | ||
14 | |||
15 | ngOnInit () { | ||
16 | const link = this.type === 'video' | ||
17 | ? buildVideoLink({ baseUrl: `${environment.originServerUrl}/videos/embed/${this.uuid}` }) | ||
18 | : buildPlaylistLink({ baseUrl: `${environment.originServerUrl}/video-playlists/embed/${this.uuid}` }) | ||
19 | |||
20 | this.el.nativeElement.innerHTML = buildVideoOrPlaylistEmbed(link, this.uuid) | ||
21 | } | ||
22 | } | ||