修复工作

This commit is contained in:
2025-09-30 20:48:14 +08:00
parent 1f22d777e9
commit 6dba13713f
5 changed files with 26 additions and 21 deletions

View File

@@ -36,6 +36,9 @@ public class InitServer implements CommandLineRunner {
// 注入mediasServer.port的值
@Value("${mediasServer.port}")
private int port;
// 注入mediasServer.address的值默认127.0.0.1,只监听本地)
@Value("${mediasServer.address:127.0.0.1}")
private String address;
// 注入MediaServer对象
@Autowired
private MediaServer mediaServer;
@@ -100,8 +103,8 @@ public class InitServer implements CommandLineRunner {
ip, port,
ip, httpPort,
ip, httpPort);
// 启动MediaServer
this.mediaServer.start(new InetSocketAddress("0.0.0.0", this.port));
// 启动MediaServer只监听配置的地址默认127.0.0.1
this.mediaServer.start(new InetSocketAddress(this.address, this.port));
}
// 初始化自动播放