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

Link Preview for Youtube Video #23

Open
ahmadkeren opened this issue Dec 27, 2024 · 0 comments
Open

Link Preview for Youtube Video #23

ahmadkeren opened this issue Dec 27, 2024 · 0 comments

Comments

@ahmadkeren
Copy link

Excuse me sir, I want to ask.. does anyone know how to create a video preview link from YouTube so that it can be played directly in WhatsApp without having to be redirected to a web browser?

Expected:
Untitled

Currently my code;

const linkPreview = await getUrlInfo(urlYt, {
            thumbnailWidth: 1024,
            fetchOpts: {
                timeout: 30 * 1000,
            },
            uploadImage: paimon.waUploadToServer,
        });
        return await paimon.sendMessage(m.from,
            {
                text: `${urlYt}`,
                linkPreview,
            }, { quoted: m, previewType: 1 }
        );

my code result (no play button):
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant