Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some videos aren't embedded on Discord #23

Closed
Kyrela opened this issue Dec 28, 2024 · 1 comment
Closed

Some videos aren't embedded on Discord #23

Kyrela opened this issue Dec 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Kyrela
Copy link

Kyrela commented Dec 28, 2024

Some specific videos aren't embedding correclty, despite fxTikTok correctly responding.

Example:
https://tnktok.com/@liverpoolfc/video/7451559717123427616 is returning the following:

<html lang="en">
    <head>
        <meta property="og:title" content="❤️ 1.9M 💬 14.6k  🔁 98.6k"/>
        <meta property="theme-color" content="#ff0050"/>
        <meta property="twitter:site" content="@liverpoolfc"/>
        <meta property="twitter:creator" content="@liverpoolfc"/>
        <meta property="twitter:title" content="Liverpool FC (@liverpoolfc)"/>
        <meta property="og:url" content="https://www.tiktok.com/@liverpoolfc/video/7451559717123427616"/>
        <meta property="og:description" content="The six-year-old singing Kopite that captured our hearts ♥️   Virgil van Dijk and Mo Salah surprised Isaac at his school and made sure he created unforgettable memories… including a special appearance at Anfield 🥰 #lfc #Salah #vanDijk"/>
        <meta property="og:video" content="https://fxtiktok-rewrite.dargy.workers.dev/generate/video/7451559717123427616"/>
        <meta property="og:video:secure_url" content="https://fxtiktok-rewrite.dargy.workers.dev/generate/video/7451559717123427616"/>
        <meta property="og:video:type" content="video/mp4"/>
        <meta property="og:video:width" content="1024"/>
        <meta property="og:video:height" content="576"/>
        <meta property="og:type" content="video"/>
        <meta property="og:video:type" content="video/mp4"/>
        <meta property="twitter:card" content="player"/>
        <meta property="twitter:player:height" content="576"/>
        <meta property="twitter:player:width" content="1024"/>
        <meta property="twitter:player" content="https://fxtiktok-rewrite.dargy.workers.dev/generate/video/7451559717123427616"/>
        <meta property="twitter:player:stream" content="https://fxtiktok-rewrite.dargy.workers.dev/generate/video/7451559717123427616"/>
        <meta property="twitter:player:stream:content_type" content="video/mp4"/>
        <link rel="alternate" href="https://fxtiktok-rewrite.dargy.workers.dev/generate/alternate?unique_id=liverpoolfc&amp;nickname=Liverpool%2520FC" type="application/json+oembed"/>
    </head>
</html>

But isn't embedded on Discord.
image

@Kyrela Kyrela changed the title Some specific videos aren't embedding on Discord Some videos aren't embedding on Discord Dec 28, 2024
@Kyrela Kyrela changed the title Some videos aren't embedding on Discord Some videos aren't embedded on Discord Dec 28, 2024
okdargy added a commit that referenced this issue Dec 28, 2024
since usually tiktok has a response time of 200ms, there really isnt any noticeable performance change with this patch
@okdargy okdargy added the bug Something isn't working label Dec 28, 2024
@okdargy
Copy link
Owner

okdargy commented Dec 28, 2024

For some reason, when TikTok fails, it still responds 200 and by our rules we cache it for a long time which causes this issue. As a patch, I've disabled caching since the request usually takes anywhere from 250-600ms and there shouldn't be any performance issues.

Thanks for reporting this issue!

@okdargy okdargy closed this as completed Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants