cooncesean
cooncesean

Reputation: 1294

YouTube API: Get the quality of a video via the API?

Is there any way to tell when a video has been fully encoded at its highest definition via the API?

As far as I can tell, the YouTube API provides the 'state' of a video (processing, restricted, deleted, rejected and failed). However, I can't tell if the API also provides the encoding qualities of the video (240p, 360p, 720i, etc...).

Does anyone know how to get this information?

Upvotes: 4

Views: 3021

Answers (1)

Martti Laine
Martti Laine

Reputation: 12985

Taken directly from the docs:

player.getPlaybackQuality():String

This function retrieves the actual video quality of the current video. It returns undefined if there is no current video. Possible return values are highres, hd1080, hd720, large, medium and small.

Upvotes: 2

Related Questions