草庐IT

Youtube_it

全部标签

php - YouTube iframe API 触发所有事件两次

虽然YouTubeAPI使用embedswf工作正常,我的脚本在使用iframes时无法正常工作嵌入播放器。更具体地说,API的iframe版本似乎会触发所有事件两次,从而导致各种问题,例如本例中的问题(hosted):ThisscriptinitializesaYouTubeAPIplayerinaniframewhichcyclesthroughthearrayanvideoIDs.Everytimeavideoends,thenextvideoIDinthearrayisretrievedanditsvideoisplayed.Unfortunately,theplayerrep

php - PHP 中的 Youtube 数据 API v3 帐户服务 : 403 - Forbidden : YoutubeSignupRequired

我为此苦苦思索了4个小时,所以我可能需要一点帮助。我想做的是将视频存储在youtube上,用于我们正在举办的视频比赛。我真的更喜欢通过服务帐户进行2条腿的OAuth访问(我希望即使没有gmail帐户的用户也能够向我们发送视频,并且我想将这些视频设为私有(private)或不在我们的youtube帐户中列出)。但是好像不行。我现在的代码是这样的:functiongo(){require_once'googleClient/Google_Client.php';require_once'googleClient/contrib/Google_YoutubeService.php';defi

php - JMS DI 额外 bundle : How do I inject a dependency only if it exists

我正在使用JMSDI注入(inject)带有注解的服务:useJMS\DiExtraBundle\AnnotationasDI;/***@DI\Service("foo.bar.service")*/classmyClass{/***@DI\Inject("debug.stopwatch")*@var$stopWatch\Symfony\Component\Stopwatch\Stopwatch*/public$stopWatch;/***@DI\Inject("serializer")*@var$serializer\JMS\Serializer\Serializer*/public

php - 如何获取整个 YouTube 视频说明、php、gdata

我有使用YouTubeapi正确检索标题、视频url、观看次数、视频日期、最后评论日期和描述的前160个字符的php代码。我似乎无法弄清楚如何获得完整的描述。我知道它在检索到的xml中,因为我已经丢弃了它。那我怎么只得到160个字符呢?整个描述被截断为157个字符,并添加了“...”,因此当我echo或var_dump时,它是160个字符。这是我的完整测试代码(没有标题、视频网址等)。10000]&start-index=1&max-results=1';$sxml=simplexml_load_file($feedURL);foreach($sxml->entryas$entry){

php - youtube-api 3.0 更新视频描述和/或标题

谁能告诉我如何使用youtube-api3.0版本更新视频描述。我看到这段代码用于添加/更新标签https://code.google.com/p/youtube-api-samples/source/browse/#git/samples/php但不知道用于描述和/或标题的协议(protocol)是什么。 最佳答案 就像那个例子:https://github.com/youtube/api-samples/blob/master/php/update_video.php而不是添加标签intheselines,您可以像这样设置标题和

php - PHP 中的 YouTube 分析 API : I keep getting "Insufficient permissions" while authenticated

我正在尝试使用OAUTH2在PHP中访问YouTubeAnalyticsAPI。在我的场景中,我首先检索channel数据,它工作正常(即使使用经过身份验证的段)。然后我在我的Analytics-call中解析channel-id。YouTubeAnalyticsAPI在我的GoogleDeveloperConsole中激活。我最终遇到以下错误:Anclienterroroccurred:ErrorcallingGEThttps://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3D##MY_CHANNEL

Php 序列号 : No stty available -- cant seem to get it working

我正在从事一个项目,该项目涉及使用我的RaspberryPi上的UART引脚读取和写入串口板。但是,我已经碰壁了。每当我尝试使用PhpSerial时,我总是会收到错误消息:Fatalerror:Nosttyavailable,unabletorun.in/var/www/PHP-Serial/examples/PhpSerial.phponline56我尝试了多种输入配置://Firstwemustspecifythedevice.Thisworksonbothlinuxandwindows(if//yourlinuxserialdeviceis/dev/ttyS0forCOM1,et

php - 使用 PHP for 和 foreach 循环从 JSON 数据中检索视频信息时遇到问题 - YouTube API 3

基本上我想列出YouTubechannel的最后上传,但我在使用for循环时遇到了问题,或者我也缺少foreach的使用。我尝试了以下方法:functionlast_uploads(){for($i=0;$iitems[0]->id->videoId;echo'';}$i++;break;}提要url($url)的输出如下:{"kind":"youtube#searchListResponse","etag":"\"IHLB7Mi__JPvvG2zLQWAg8l36UU/sa0AWnsYjVk9MPM3sjMlLcrfFxU\"","nextPageToken":"CAMQAA","p

php - 从 YouTube API v3 中的播放列表获取所有视频信息

我在通过APIv3获取YouuTbe中的播放列表信息时遇到问题。我只需要将JSON传递给值。我在v2中尝试过这个,但它没有用,而且我不知道如何使用v3代码或者我可以从中获取JSON的链接是什么。$playlist_id="AD954BCB770DB285";$url="https://gdata.youtube.com/feeds/api/playlists/".$playlist_id."?v=2&alt=json";$data=json_decode(file_get_contents($url),true);echo$data; 最佳答案

javascript - 如何使用 API 获取 YouTube 视频缩略图?

关闭。这个问题需要detailsorclarity.它目前不接受答案。想改进这个问题吗?通过editingthispost添加细节并澄清问题.关闭6年前。Improvethisquestion我需要在我的站点中放置一个YouTube视频。这是视频网址:https://www.youtube.com/watch?list=PLx0NuvoQ5jfdEvOCFa8kRnfg5S7F3t_93&v=I-tBhNwVa7w如何使用API获取缩略图?