Hello, I have a forum on which youtube/dailymotion links display an embed code that allow users to watch the video without leaving the page.
I have issues embedding peertube cause it’s not a common format.
Let’s say I have that js code:
embed.getSrcFramatube = function(url) {
if (!url.includes("/videos/"))
return;
var videoId = url.split("/")[4];
if (!videoId)
return;
return "https://framatube.org/videos/embed/" + videoId;
};
It doesn’t work with https://framatube.org/videos/watch/4ebfa3d2-b871-4f29-a8b5-b5d23535c8e3
But if I remove the /watch it works well : https://framatube.org/videos/4ebfa3d2-b871-4f29-a8b5-b5d23535c8e3
Any ideas of how I could fix this?