mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Fix embed url
This commit is contained in:
parent
1fdf8edb77
commit
72493e44e9
6 changed files with 17 additions and 7 deletions
|
@ -45,6 +45,16 @@ function getAbsoluteAPIUrl () {
|
|||
return absoluteAPIUrl
|
||||
}
|
||||
|
||||
function getAbsoluteEmbedUrl () {
|
||||
let absoluteEmbedUrl = environment.embedUrl
|
||||
if (!absoluteEmbedUrl) {
|
||||
// The Embed is on the same domain
|
||||
absoluteEmbedUrl = window.location.origin
|
||||
}
|
||||
|
||||
return absoluteEmbedUrl
|
||||
}
|
||||
|
||||
const datePipe = new DatePipe('en')
|
||||
function dateToHuman (date: string) {
|
||||
return datePipe.transform(date, 'medium')
|
||||
|
@ -201,6 +211,7 @@ export {
|
|||
dateToHuman,
|
||||
immutableAssign,
|
||||
objectToFormData,
|
||||
getAbsoluteEmbedUrl,
|
||||
objectLineFeedToHtml,
|
||||
removeElementFromArray,
|
||||
importModule,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue