I have some URLs to play content from, but I have to identify whether the given URL contains video or audio. How can I do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The only way to tell what kind of content a URL references is to send a HEAD request and check the Content-Type returned. Or you could just start retrieving the resource and decide what to do with it when you get the headers. That’s the approach web browsers take.