Files
web-Iot/public/js/jswebrtcnew.js
2026-05-12 11:11:30 +08:00

17 lines
551 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 覆盖 startLoading,强制 HTTPS + 域名,不用 1985
(function() {
const oldStartLoading = JSWebrtc.Player.prototype.startLoading;
JSWebrtc.Player.prototype.startLoading = function() {
// 强制域名
this.urlParams.server = "ri.satabot.com";
// 使用 HTTPS 默认端口(内部拼接会自动处理)
delete this.urlParams.port;
// this.urlParams.port = 443;
// 强制 play API 路径
this.urlParams.user_query.play = "/rtc/rtc/v1/play/";
return oldStartLoading.apply(this, arguments);
};
})();