Qt Multimedia 在 WebAssembly 上

本页介绍了Qt Multimedia 功能在 WebAssembly 上的可用性。

限制

  • 由于其异步性质,某些功能(如获取QMediaDevices 的列表)将无法立即使用,可能需要一些时间来请求权限和收集设备列表。QMediaDevices 类的 audioInputsChanged、audioOutputsChanged 和 videoInputChanged 信号将在可用时发出。
  • 摄像头和麦克风输入需要用户权限,并且只能在安全的 https 环境下使用。
  • 播放视频目前使用 html 2d 上下文,因此所有操作都在 CPU 上进行。
  • 虽然每帧都有一个拷贝,因此在播放高清视频时,性能可能不如桌面平台,但还可以接受。
  • 目前还不支持使用和选择不同的编解码器/视频格式。
  • 目前不支持从流中播放数据(使用setSourceDevice(QIODevice*) ),而不是获取 URL。
  • 目前不支持某些高级功能,如空间音频、编解码器、屏幕和窗口录制。
  • 文件可以分别从CORS 的任何网络服务器提供。
  • 虽然可以播放存储在应用程序文件系统中的本地文件,但由于本地文件存储空间有限,因此不建议播放。
  • 无法选择编码解码器。
  • 在任何平台上使用 Firefox 浏览器时都可能存在问题。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.