The YouTube API v3 allows you to request information about a video, such as its title, description, etc.
Is there a way to determine whether the video supports HD resolution?
A workaround could be to look for a maxres
thumbnail:
var checkURL = "https://www.googleapis.com/youtube/v3/videos?key=XYZ&part=snippet&fields=items(snippet(thumbnails))&id=" + uid;
$.getJSON(checkURL, function(data) {
if (data.items.length > 0) {
/* Verify this video is HD */
if (data.items[0].snippet.thumbnails.maxres == undefined) {
alert("This video does not support HD")
}
}
});
but is there a better approach?