quill icon indicating copy to clipboard operation
quill copied to clipboard

Add support for more video URLs

Open ataylor32 opened this issue 1 year ago • 0 comments

Looking at the extractVideoUrl function, I see that it only supports YouTube and Vimeo. I think Facebook, Instagram, TikTok, and Dailymotion are all popular enough that their video URLs should be supported.

Facebook

Examples of URLs users might paste:

  1. https://www.facebook.com/tastyjunior/videos/371340857814381
  2. https://www.facebook.com/watch/?v=371340857814381
  3. https://fb.watch/7B5q25xnSb/

Example of what a URL should be transformed into:

https://www.facebook.com/plugins/video.php?height=476&href=https%3A%2F%2Fwww.facebook.com%2Ftastyjunior%2Fvideos%2F371340857814381%2F&show_text=false&width=380&t=0

Instagram

Examples of URLs users might paste:

  1. https://www.instagram.com/p/BBGUSrjP1fW/
  2. https://www.instagram.com/tv/CS9wEBUl103/?utm_medium=copy_link
  3. https://www.instagram.com/reel/CS7qvUFlKYl/?igsh=d24tbzcyNmO6zXt6

Example of what a URL should be transformed into:

https://www.instagram.com/p/BBGUSrjP1fW/embed/

TikTok

Examples of URLs users might paste:

  1. https://www.tiktok.com/@cloud9pethotel/video/6993643918827080962?is_copy_url=1&is_from_webapp=v1
  2. https://vm.tiktok.com/ZMRjQcmdX/

Example of what a URL should be transformed into:

https://www.tiktok.com/embed/6993643918827080962

Dailymotion

Examples of URLs users might paste:

  1. https://www.dailymotion.com/video/x1b191p
  2. https://dai.ly/x1b191p

Example of what a URL should be transformed into:

https://www.dailymotion.com/embed/video/x1b191p?autoplay=1

ataylor32 avatar Jul 11 '24 00:07 ataylor32