Check if YouTube videos are available on YouTube using JavaScript

How can I check if a YouTube video is available or inaccessible by the URL or video ID using JavaScript on the html website.

eg:

this link refers to a video that is available https://www.youtube.com/watch?v=3aY1Z15vTw0

this link refers to a video that is not available https://www.youtube.com/watch?v=FMbz0444444

I want to make it do something else depending on whether the video is available from the link or not.

if a YouTube link is available: do something

more: do something else

+4
source share
1 answer

list uploadStatus.

:

+1

Source: https://habr.com/ru/post/1679763/


All Articles