fixtiktok
fixtiktok copied to clipboard
Doesn't embed the video player
I'm not sure if I'm doing it wrong, but while fixtiktok does provide an embed, it only contains a preview of the video, sometimes with a play button which is just part of the image, but no media player, both on desktop and on mobile (I don't think this works on mobile anyway).
this is a really good program idea and I would love to see it work!
So, the repo used to work but a few months ago but my guess is Discord changed the way they deal with redirects and it stopped following more than 1 redirect for opengraph resources for whatever reason.
Based on digging around the API, it seems the only way to display videos on discord embeds is to link a url that ends with .mp4
. But because tiktok's video urls don't have that extension, fixtiktok creates a temporary url like /_video/[something].mp4
that it sets for the og:video
property. But like I mentioned, Discord no longer wants to follow that redirect to embed the video even though the link that's being redirected to works as expected outside of the Discord unfurler.
An alternative fix could be to stream the video directly without a redirect, but that's going to be expensive on cloudflare workers. 😔
I'll take another look at it later when I have time though. Maybe I just missed something.
ooh, I see… sounds messy :<
maybe I'm wrong, but maybe there's something to learn from twitfix? the website isn't around anymore since a few weeks, but the source code is still up, and vxtwitter now works the same way
Sadly twitter's video urls end with the proper .mp4
extension so twitfix doesn't have to do any sort of hacks to make that work 😢
Seems like your site is down but if this is the reason, I haven't tested it but I assume Discord is just doing a naive string check, how about adding ?.mp4
(or &.mp4
or #.mp4
as appropriate) to the end of the official TikTok URL?
Seems like your site is down but if this is the reason, I haven't tested it but I assume Discord is just doing a naive string check, how about adding
?.mp4
(or&.mp4
or#.mp4
as appropriate) to the end of the official TikTok URL?
This or maybe running it through a converter? Not sure if any exist, but that could work. You would just need to host the converted videos somewhere. A Discord channel maybe?
As the website is still offline, I am assuming this project is abandoned. It would just be nice if websites had proper working embeds to begin with.