Pregunta

I am trying to filter out 'long' videos from the response of a YouTube V3 API request.

I have:

var relatedVideoInformationRequest = gapi.client.youtube.search.list({
    part: 'snippet',
    relatedToVideoId: 'oqrxjeDIWPs',
    maxResults: 10,
    //  If the relatedToVideoId parameter has been supplied, type must be video.
    type: 'video',
    videoDuration: 'medium'
});

relatedVideoInformationRequest.execute(function (relatedVideoInformationResponse) {
    console.log(relatedVideoInformationResponse);
});

The first result is longer than 20 minutes and the videoDuration parameter does not seem to have been applied. This happens in my code along with the YouTube API playground.

Am I doing something wrong or is this a bug?

¿Fue útil?

Solución

You are right, I filed a bug internally. Feel free to file a bug in public issue tracker to track.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top