How do I check if a video exists on YouTube, in client side

后端 未结 6 1933
攒了一身酷
攒了一身酷 2021-01-12 16:45

I am doing validation for my Youtube url text field.

I need to check, if the Youtube url does not exist I should throw error, I followed this answer an

6条回答
  •  醉话见心
    2021-01-12 17:07

    somebody already had the same problem as you, you cannot check for a 404 error when doing cross-domain requests. You should handle it via a timeout.

    JSONP request error handling

提交回复
热议问题