Youtube api v3 duration

278 views Asked by At

I have problem getting duration from json. I defined item.contentDetails.duration but doesn't work every time (Error says undefined). I don't know what is bad.

FIDDLE

1

There are 1 answers

0
North On BEST ANSWER

https://www.googleapis.com/youtube/v3/playlistItems only responses contentDetails with videoId, so you cannot retrieve the duration attribute.

In your example, check again with this json