wordpress - YouTube嵌入宽度不能大于740像素吗?

标签 wordpress video youtube embed oembed

我正在尝试使用Youtube's oEmbed functionality以960x580嵌入视频,但由于某种原因,它似乎已达到740的最大值。请参见以下内容:

请求:

http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch%3Fv%3DbDOYN-6gdRE&format=json&maxwidth=960&maxheight=580

响应:
{
    "provider_url": "http:\/\/www.youtube.com\/",
    "title": "1 of 4 Dr. Bill Lands on Cardiovascular Disease: Omega-6 displaces Omega-3",
    "html": "\u003cobject width=\"740\" height=\"580\"\u003e\u003cparam name=\"movie\" value=\"http:\/\/www.youtube.com\/v\/dgU3cNppzO0?version=3\"\u003e\u003c\/param\u003e\u003cparam name=\"allowFullScreen\" value=\"true\"\u003e\u003c\/param\u003e\u003cparam name=\"allowscriptaccess\" value=\"always\"\u003e\u003c\/param\u003e\u003cembed src=\"http:\/\/www.youtube.com\/v\/dgU3cNppzO0?version=3\" type=\"application\/x-shockwave-flash\" width=\"740\" height=\"580\" allowscriptaccess=\"always\" allowfullscreen=\"true\"\u003e\u003c\/embed\u003e\u003c\/object\u003e",
    "author_name": "LatestNutrition",
    "height": 580,
    "thumbnail_width": 480,
    "width": 740,
    "version": "1.0",
    "author_url": "http:\/\/www.youtube.com\/user\/LatestNutrition",
    "provider_name": "YouTube",
    "thumbnail_url": "http:\/\/i1.ytimg.com\/vi\/dgU3cNppzO0\/hqdefault.jpg",
    "type": "video",
    "thumbnail_height": 360
}

除了widthheight,我什至尝试使用maxwidthmaxheight参数代替/,但是我似乎还是不能使它大于740。

有什么办法可以解决这个问题,以便可以按需要的尺寸获得嵌入式视频?

最佳答案

我无法在此处粘贴代码,

我已经使用此代码使用自定义字段在wordpress中插入YouTube视频...

我需要插入与原始尺寸不同的视频。在这里您需要定义您的YouTube ID和所需的宽度

我在最后添加了一些YouTube插入选项

http://pastebin.com/KRwvSzqP

关于wordpress - YouTube嵌入宽度不能大于740像素吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5860784/

相关文章:

php - 无法使用php YouTube API在json中获取对象

javascript - 制作搜索标签输入字段

php - 订单完成时写入 SQL 表

wordpress - 在帖子的永久链接中包含父页面 slug

video - 使用 FFmpeg,如何将帧图像序列转换为视频(视频编解码器 : dvvideo)?

android - ffmpeg concat 视频在 Android 上失败

cocoa - 来自 CVImageBuffer 的原始数据没有渲染?

python - 如何在树莓派上安装 python 3 和 setuptools?

php - 从 wordpress 类别页面的标题标题中删除 ‘category’

css - 需要在 WordPress 中排队才能使用 jQuery-ui ".accordion"函数?