-import { buildPlaylistLink, buildVideoLink, buildVideoOrPlaylistEmbed } from 'src/assets/player/utils'
import { environment } from 'src/environments/environment'
import { Component, ElementRef, Input, OnInit } from '@angular/core'
+import { buildVideoOrPlaylistEmbed } from '@root-helpers/video'
+import { buildPlaylistEmbedLink, buildVideoEmbedLink } from '@shared/core-utils'
import { CustomMarkupComponent } from './shared'
@Component({
ngOnInit () {
const link = this.type === 'video'
- ? buildVideoLink({ baseUrl: `${environment.originServerUrl}/videos/embed/${this.uuid}` })
- : buildPlaylistLink({ baseUrl: `${environment.originServerUrl}/video-playlists/embed/${this.uuid}` })
+ ? buildVideoEmbedLink({ uuid: this.uuid }, environment.originServerUrl)
+ : buildPlaylistEmbedLink({ uuid: this.uuid }, environment.originServerUrl)
- this.el.nativeElement.innerHTML = buildVideoOrPlaylistEmbed(link, this.uuid)
+ this.el.nativeElement.innerHTML = buildVideoOrPlaylistEmbed({ embedUrl: link, embedTitle: this.uuid })
}
}