flutter_link_preview icon indicating copy to clipboard operation
flutter_link_preview copied to clipboard

Cannot preview Youtube urls

Open imcouri opened this issue 4 years ago • 5 comments

i don't know if it's just me or others have this issue, but I can't fetch info about any video on yt, youtube.com and other websites work, but video urls don't does anyone else have this issue?

imcouri avatar Jan 08 '21 21:01 imcouri

i got a same problem.

jaceshim avatar Feb 05 '21 04:02 jaceshim

@jaceshim did not work i referenced your commit still the image is not being fetched.

sarinupreti avatar Feb 05 '21 12:02 sarinupreti

Short links are not visible

kunalmanocha98 avatar Mar 22 '21 06:03 kunalmanocha98

You can use 'https://www.youtube.com/oembed?url=$link&format=json' to get metadata.

Simulator Screen Shot - iPhone 8 - 2021-05-16 at 23 15 09

jvinicius66 avatar May 17 '21 02:05 jvinicius66

You can convert short links to full ones:

if (urlText.contains("youtu.be/")) {
        urlText = urlText.replaceAll(
                "youtu.be/",
                "youtube.com/watch?v=");
}

asmodeoux avatar Jul 16 '21 07:07 asmodeoux