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
source
share