强制 youtube 嵌入以 720p 开始 [英] Force youtube embed to start in 720p

查看:17
本文介绍了强制 youtube 嵌入以 720p 开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网上有几种方法可以做到这一点,但似乎都不起作用.

There are a few methods suggested for doing this online, but none of them seem to work.

例如:

http://blog.makezine.com/archive/2008/11/youtube-in-720p-hd-viewin.html

那篇文章是关于让它以 720p 开始,但它甚至不适用于他们自己的视频.

That article is about making it start in 720p, but it doesn't even work on their own video.

这里有人知道怎么做吗?

Does anyone here know how to do it?

推荐答案

(此答案已更新,因为之前使用 vq 的方法不再被识别.)

(This answer was updated, as the previous method using vq isn't recognized anymore.)

指定视频的高度会相应地改变质量.html 5 示例;

Specifying the height of the video will change the quality accordingly. example for html 5;

<iframe style='width:100%; height:800px;' src='https://www.youtube.com/embed/xxxxxxxx'></iframe>

如果您不想对宽度和高度进行硬编码,您可以为 css 媒体查询向 iframe 添加一个类.

If you don't want to hardcode the width and height you can add a class to the iframe for css media queries.

在工作服务器上测试 + 通过 w3.org nuhtml 验证器.

Tested on a working server + passes the w3.org nuhtml validator.

这篇关于强制 youtube 嵌入以 720p 开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆