feat: 添加硬件编码器支持和修复 janus.js 错误

- 添加 HWENCODER 环境变量支持,支持 vaapi、nvenc、amf、v4l2m2m、mediacodec、videotoolbox 等硬件编码器
- 修复 janus.js 相关错误,添加 adapter.js 支持
- 更新 Docker 构建配置以支持硬件编码
- 优化 ustreamer 配置,支持硬件编码回退机制
This commit is contained in:
mofeng-git
2025-08-22 21:25:13 +08:00
parent bdd97c5ea3
commit 04b13b1215
6 changed files with 3425 additions and 9 deletions

3364
testenv/js/adapter.js Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -24,8 +24,10 @@
OTHER DEALINGS IN THE SOFTWARE.
*/
import "./adapter.js";
// eslint-disable-next-line no-unused-vars
var Janus = (function (factory) {
export var Janus = (function (factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof module === 'object' && module.exports) {
@@ -1893,7 +1895,7 @@ var Janus = (function (factory) {
return;
}
let pc_config = {
iceServers: iceServers,
iceServers: (typeof iceServers === "function" ? iceServers() : iceServers),
iceTransportPolicy: iceTransportPolicy,
bundlePolicy: bundlePolicy
};