当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Gdata_YouTube_VideoEntry::SetVideoDeveloperTags方法代码示例

本文整理汇总了PHP中Zend_Gdata_YouTube_VideoEntry::SetVideoDeveloperTags方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Gdata_YouTube_VideoEntry::SetVideoDeveloperTags方法的具体用法?PHP Zend_Gdata_YouTube_VideoEntry::SetVideoDeveloperTags怎么用?PHP Zend_Gdata_YouTube_VideoEntry::SetVideoDeveloperTags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Gdata_YouTube_VideoEntry的用法示例。


在下文中一共展示了Zend_Gdata_YouTube_VideoEntry::SetVideoDeveloperTags方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: substr

 $vidName = $dom->getElementById("source_video")->getAttribute('value');
 $lectureTitle = $dom->getElementById("title")->getAttribute('value');
 if ($lectureTitle == "CKY Example (21:52)" || $lectureTitle == "CKY Parsing (23:25)" || $lectureTitle == "Charniak's Model (18:23)" || $lectureTitle == "Discriminative Model Features") {
     echo $lectureTitle . ": " . $vidName . "\n";
     $filesource = $yt->newMediaFileSource('../source_videos/' . $vidName);
     $filesource->setContentType('video/mp4');
     $filesource->setSlug($vidName);
     $myVideoEntry->setMediaSource($filesource);
     $myVideoEntry->setVideoTitle($lectureTitle);
     $myVideoEntry->setVideoDescription($lectureTitle);
     // Note that category must be a valid YouTube category !
     $myVideoEntry->setVideoCategory('Education');
     // Set keywords, note that this must be a comma separated string
     // and that each keyword cannot contain whitespace
     $myVideoEntry->SetVideoTags('natural language processing');
     $myVideoEntry->SetVideoDeveloperTags(array('NLPClass', substr($lectureTitle, 0, 16)));
     //Turn off ratings, comments, videoResponses and make video unlisted
     $listElement = new Zend_Gdata_App_Extension_Element('yt:accessControl', 'yt', 'http://gdata.youtube.com/schemas/2007', '');
     $listElement->extensionAttributes = array(array('namespaceUri' => '', 'name' => 'action', 'value' => 'list'), array('namespaceUri' => '', 'name' => 'permission', 'value' => 'denied'));
     $commentElement = new Zend_Gdata_App_Extension_Element('yt:accessControl', 'yt', 'http://gdata.youtube.com/schemas/2007', '');
     $commentElement->extensionAttributes = array(array('namespaceUri' => '', 'name' => 'action', 'value' => 'comment'), array('namespaceUri' => '', 'name' => 'permission', 'value' => 'denied'));
     $videoRespondElement = new Zend_Gdata_App_Extension_Element('yt:accessControl', 'yt', 'http://gdata.youtube.com/schemas/2007', '');
     $videoRespondElement->extensionAttributes = array(array('namespaceUri' => '', 'name' => 'action', 'value' => 'videoRespond'), array('namespaceUri' => '', 'name' => 'permission', 'value' => 'denied'));
     $rateElement = new Zend_Gdata_App_Extension_Element('yt:accessControl', 'yt', 'http://gdata.youtube.com/schemas/2007', '');
     $rateElement->extensionAttributes = array(array('namespaceUri' => '', 'name' => 'action', 'value' => 'rate'), array('namespaceUri' => '', 'name' => 'permission', 'value' => 'denied'));
     $myVideoEntry->extensionElements = array($listElement, $commentElement, $videoRespondElement, $rateElement);
     // Upload URI for the currently authenticated user
     $uploadUrl = 'http://uploads.gdata.youtube.com/feeds/users/default/uploads';
     // Try to upload the video, catching a Zend_Gdata_App_HttpException
     // if availableor just a regular Zend_Gdata_App_Exception
     try {
开发者ID:pushpen,项目名称:class2go,代码行数:31,代码来源:upload_videos.php


注:本文中的Zend_Gdata_YouTube_VideoEntry::SetVideoDeveloperTags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。