HTML5 视频标签宽度/高度
我正在尝试创建一个仅用于 Chrome 的视频标签。我并不总是知道视频的尺寸,但我希望它是窗口的尺寸。我以为我可以通过使用“width=100%”和“height=100%”来实现这一点,但我发现内置控件很难看到。我把身高降低到98%。我目前尝试播放的大多数视频都是 720p MP4。我尝试播放 1080p(实际尺寸为 1920x1040),但它不起作用(视频播放器表现得好像我的来源错误,但我可以右键单击并成功下载文件)。文件大小超过3G,我不确定这是否与此有关。
编辑:我还检查了编解码器是否完全相同,并且它们位于较小和较大的视频之间。
还有其他人有相同或类似的问题吗?
I'm trying to create a video tag for use with Chrome only. I don't always know the dimensions of the video, but I would like to have it be the size of the window. I thought I could accomplish this by using "width=100%" and "height=100%", but I found that the built-in controls were hard to see. I reduced height to 98%. Most of the videos I am currently trying to play are 720p MP4's. I tried playing a 1080p (actual dimensions being 1920x1040), and it wouldn't work (the video player acted as if my source was wrong, but I could right click and successfully download the file). The file size was more than 3 gig, I'm not sure if that had anything to do with it.
Edit: I also checked that the codecs were the exact same, and they are between the smaller and larger videos.
Anybody else having the same or like issues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
既然我已经解决了这个问题,我只想在这里发帖。问题是文件大小信息显然位于普通 MP4 的末尾。对于流媒体,我们希望这些信息位于文件的前面,以便播放器可以决定如何缓冲和不缓冲。如果 Chrome 在开始时没有找到文件大小信息,则必须执行某种快速文件大小检查。我使用了一个名为 QT-Faststart 的程序,它将文件大小信息移动到文件的前面。从而解决问题。
I just wanted to post on here now that I've fixed this issue. The issue was the file size information is apparently at the end of normal MP4's. For streaming, we want this information at the front of the file so the player can decide how to buffer and what-not. Chrome must do some sort of quick file size check if it doesn't find the file size information at the beginning. I used a program called QT-Faststart which moves the file size information to the front of the file. Thus solving the issue.