Qt Multimedia 从源构建
本页介绍了Qt Multimedia 在 WebAssembly 上的可用性。
限制
由于 javascript 的异步性质,某些功能(如获取QMediaDevices 的列表)将无法立即使用,可能需要一些时间来请求权限和收集设备列表。QMediaDevices 类的 audioInputsChanged、audioOutputsChanged 和 videoInputChanged 信号将在可用时发出。
播放视频目前使用 html 2d 上下文,因此所有操作都在 CPU 上进行。
虽然每帧都有一个拷贝,因此在播放高清视频时,性能可能不如桌面平台,但性能是可以接受的。
使用和选择不同的编解码器/视频格式尚未经过测试,但浏览器支持的任何视频格式都能正常工作。
不支持从流中播放数据(使用setSourceDevice(QIODevice*)
),而不是获取 URL。
某些高级功能目前可能有效,也可能无效。
文件可以分别从CORS 的任何网络服务器提供。由于本地文件存储空间有限,不建议播放本地文件。
© 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.