Files
web-Iot/public/js/jswebrtcnew.js

17 lines
551 B
JavaScript
Raw Normal View History

2026-05-12 11:11:30 +08:00
// 覆盖 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);
};
})();