diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-26 14:12:39 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-26 14:12:50 +0200 |
commit | 9162fdd36300d2478f13d6ad346ec2c323f40faa (patch) | |
tree | dea0ca43f3ea2fb72a73ca77338f5b7c990acdd7 /client/src/app/shared/shared-custom-markup | |
parent | 764b1a14fc494f2cfd7ea590d2f07b01df65c7ad (diff) | |
download | PeerTube-9162fdd36300d2478f13d6ad346ec2c323f40faa.tar.gz PeerTube-9162fdd36300d2478f13d6ad346ec2c323f40faa.tar.zst PeerTube-9162fdd36300d2478f13d6ad346ec2c323f40faa.zip |
Refactor video links building
Diffstat (limited to 'client/src/app/shared/shared-custom-markup')
-rw-r--r-- | client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts index 4462903db..ba8969d5b 100644 --- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts +++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { buildPlaylistLink, buildVideoLink, buildVideoOrPlaylistEmbed } from 'src/assets/player/utils' | 1 | import { buildPlaylistEmbedLink, buildVideoEmbedLink, buildVideoOrPlaylistEmbed } from 'src/assets/player/utils' |
2 | import { environment } from 'src/environments/environment' | 2 | import { environment } from 'src/environments/environment' |
3 | import { Component, ElementRef, Input, OnInit } from '@angular/core' | 3 | import { Component, ElementRef, Input, OnInit } from '@angular/core' |
4 | import { CustomMarkupComponent } from './shared' | 4 | import { CustomMarkupComponent } from './shared' |
@@ -17,8 +17,8 @@ export class EmbedMarkupComponent implements CustomMarkupComponent, OnInit { | |||
17 | 17 | ||
18 | ngOnInit () { | 18 | ngOnInit () { |
19 | const link = this.type === 'video' | 19 | const link = this.type === 'video' |
20 | ? buildVideoLink({ baseUrl: `${environment.originServerUrl}/videos/embed/${this.uuid}` }) | 20 | ? buildVideoEmbedLink({ uuid: this.uuid }, environment.originServerUrl) |
21 | : buildPlaylistLink({ baseUrl: `${environment.originServerUrl}/video-playlists/embed/${this.uuid}` }) | 21 | : buildPlaylistEmbedLink({ uuid: this.uuid }, environment.originServerUrl) |
22 | 22 | ||
23 | this.el.nativeElement.innerHTML = buildVideoOrPlaylistEmbed(link, this.uuid) | 23 | this.el.nativeElement.innerHTML = buildVideoOrPlaylistEmbed(link, this.uuid) |
24 | } | 24 | } |