ฉันต้องการให้ข้อความค้นหาของฉันแสดงเฉพาะในวิดีโอที่สั้นกว่าตัวอย่าง 7 นาที เป็นไปได้ไหม?
ขณะนี้ฉันใช้สิ่งนี้:
$yt = new Zend_Gdata_YouTube();
$yt->setMajorProtocolVersion(2);
$query = $yt->newVideoQuery();
$query->setOrderBy('relevance');
$query->setSafeSearch('none');
$query->setVideoQuery($searchTerms);
// Note that we need to pass the version number to the query URL function
// to ensure backward compatibility with version 1 of the API.
$videoFeed = $yt->getVideoFeed($query->getQueryUrl(2));
เอกสารบอกว่ามีพารามิเตอร์ "duration": https://developers.google.com/youtube/2.0/reference?hl=de#durationsp
แต่น่าเสียดายที่ฉันไม่มีโชคด้วย
$query->setDuration('short');
แต่นั่นก็คงไม่เป็นเช่นนั้นอยู่ดี ในขณะที่มันค้นหาวิดีโอที่สั้นกว่าสี่นาที
มีความคิดอะไรบ้าง?
คริส