gpt4 book ai didi

html - EDGE 浏览器中的 VP9 WEBM 视频支持

转载 作者:行者123 更新时间:2023-11-28 02:41:44 25 4
gpt4 key购买 nike

我看到 EDGE 通过在其浏览器配置中启用 MSE 中的 VP9,声称在最新版本中支持 VP9 编解码器。

我试过这样做,但它仍然不起作用,并且会抛出一条错误消息,指出不支持这种类型的视频文件。

我启动了 https://html5test.com/compare/browser/mybrowser.html EDGE 浏览器中的 URL,这表明浏览器不支持 VP9,同时 youtube 视频在 WebM vp9 编解码器中流式传输( Nerd 使用统计数据来检查这一点)。

我在我的 HTML 文件中使用它

<video>
<source src="http:/url/123.webm" type="video/webm"/>
</video>

Youtube 的 https://www.youtube.com/html5声称它可以播放 MSE & WEBM vp9,并且它能够播放 vp9 视频,服务器为 vp9 和 MSE & vp9 提供请求的方式有什么不同吗?

我可以毫无问题地在 chrome 和 firefox 中播放 VP9 视频。预先感谢您的帮助。

最佳答案

自 EdgeHTML 15.15063 起,WebM + VP9 仅在使用 MSE(媒体源扩展)时受支持。您正在使用的标签:

<video>
<source src="http:/url/123.webm" type="video/webm"/>
</video>

没有使用 MSE。为此,您需要在 JavaScript 中创建一个 MediaSource 对象并将您的视频内容流式传输到 SourceBuffer。 Microsoft's streaming player example 中的一个示例说明了这一点。 :

To use the MSE API, follow these steps:

  1. Define an HTML5 video element in the HTML section of a page.
  2. Create a MediaSource object in JavaScript.
  3. Create a virtual URL using createObjectURL with the MediaSource object as the source.
  4. Assign the virtual URL to the video element's src property.
  5. Create a SourceBuffer using addSourceBuffer, with the mime type of the video you're adding.
  6. Get the video initialization segment from the media file online and add it to the SourceBuffer with appendBuffer.
  7. Get the segments of video data from the media file, append them to the SourceBuffer with appendBuffer.
  8. Call the play method on the video element.
  9. Repeat step 7 until done.
  10. Clean up.

根据 this Edge platform issue , Microsoft 仅声称有限的 WebM + VP9 支持,如果没有社区通过 Windows 10 反馈中心和/或 Microsoft Edge UserVoice 的大力插入,这不太可能改变。 .

Chrome 和 Firefox 支持不带 MSE 的 WebM + VP9,这就是它在这些浏览器中工作的原因。

关于html - EDGE 浏览器中的 VP9 WEBM 视频支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43916914/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com