从 API 调用获取 Flickr 视频播放器 url?
我正在尝试从 flickr.photos.getInfo API 调用构建 Flickr 视频播放器 url,但非常挣扎。其一,我找不到任何对“v=xxxxx”部分的引用(如视频播放器网址中所示,如下所示:http://www.flickr.com/apps/video/stewart.swf?v=71377&intl_lang=en-us&photo_secret=xxxx&photo_id=xxxx)
其次, oyu 大家对“stewart.swf”文件有了解吗?这个文件名可以更改吗?这似乎是一种非常规(但肯定是友好的)调用视频播放器的方式。
有人有这方面的经验吗?
I'm trying to build the Flickr video player url from the flickr.photos.getInfo API call, but struggling very harshly. For one, I can't find any reference to the "v=xxxxx" part (as seen in the video player url, like so: http://www.flickr.com/apps/video/stewart.swf?v=71377&intl_lang=en-us&photo_secret=xxxx&photo_id=xxxx)
Second of all, do oyu guys have an idea about the 'stewart.swf' file? is this filename subject to change? it seems like an unconventional (but most certainly friendly) way to call your video player.
Anyone have any experience with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过调用 flickr.photos.getSizes 获取播放器网址在视频上。返回的尺寸之一是
Video Player
,其source
属性是您想要的 url。其他尺寸,例如
Site MP4
、Mobile MP4
和HD MP4
也可能出现。更多信息请参见 http://code.flickr .com/blog/2008/05/01/videos-in-the-flickr-api/
You can get the player url by calling flickr.photos.getSizes on a video. One of the sizes returned will be
Video Player
and itssource
attribute is the url you want.Others sizes such as
Site MP4
,Mobile MP4
andHD MP4
may also appear.More info on http://code.flickr.com/blog/2008/05/01/videos-in-the-flickr-api/
再次回答我自己的问题以供将来参考:
stewart.swf 自(至少)2010 年 5 月以来就已存在。我们可能怀疑该文件暂时将保持不变。然而,“v=71377”早在 2010 年 5 月就是“1.1xxx”。因此,这个可能会发生变化。
换句话说,我将对 Stewart.swf 进行硬编码,然后将 v=xxxxx 值放入配置文件中。
希望这能在某个时候对某人有所帮助。
Once again, to answer my own question for future reference:
The stewart.swf has been around since (atleast) may 2010. We might suspect that this file will stay the same for the time being. However, the "v=71377" was "1.1xxx" back in may 2010. Therefor, this one is subject to change.
In other words, I will be hardcoding the stewart.swf and subsequently putting the v=xxxxx value in a config file.
Hope this helps somebody at some point.