[*] 日常优化

This commit is contained in:
acgist
2023-06-14 07:50:56 +08:00
parent ebda8b0bbd
commit 4731c53d9d
4 changed files with 29 additions and 0 deletions

View File

@@ -11,12 +11,23 @@ import java.util.List;
/** /**
* WebRTC配置 * WebRTC配置
* *
* 注意:完全拷贝信令模块`WebrtcProperties`代码
*
* @author acgist * @author acgist
*/ */
public class WebrtcProperties { public class WebrtcProperties {
/**
* 是否加密
*/
private Boolean encrypt; private Boolean encrypt;
/**
* STUN服务器
*/
private WebrtcStunProperties[] stun; private WebrtcStunProperties[] stun;
/**
* TURN服务器
*/
private WebrtcTurnProperties[] turn; private WebrtcTurnProperties[] turn;
@JsonIgnore @JsonIgnore

View File

@@ -3,11 +3,19 @@ package com.acgist.taoyao.media.config;
/** /**
* WebRTC STUN配置 * WebRTC STUN配置
* *
* 注意:完全拷贝信令模块`WebrtcStunProperties`代码
*
* @author acgist * @author acgist
*/ */
public class WebrtcStunProperties { public class WebrtcStunProperties {
/**
* 主机
*/
protected String host; protected String host;
/**
* 端口
*/
protected Integer port; protected Integer port;
public String getHost() { public String getHost() {

View File

@@ -3,11 +3,19 @@ package com.acgist.taoyao.media.config;
/** /**
* WebRTC TURN配置 * WebRTC TURN配置
* *
* 注意:完全拷贝信令模块`WebrtcTurnProperties`代码
*
* @author acgist * @author acgist
*/ */
public class WebrtcTurnProperties extends WebrtcStunProperties { public class WebrtcTurnProperties extends WebrtcStunProperties {
/**
* 帐号
*/
private String username; private String username;
/**
* 密码
*/
private String password; private String password;
public String getUsername() { public String getUsername() {
@@ -26,6 +34,7 @@ public class WebrtcTurnProperties extends WebrtcStunProperties {
this.password = password; this.password = password;
} }
@Override
public String getAddress() { public String getAddress() {
return "turn:" + this.host + ":" + this.port; return "turn:" + this.host + ":" + this.port;
} }

View File

@@ -21,6 +21,7 @@ public class WebrtcTurnProperties extends WebrtcStunProperties {
@Schema(title = "密码", description = "密码") @Schema(title = "密码", description = "密码")
private String password; private String password;
@Override
@Schema(title = "完整地址", description = "完整地址") @Schema(title = "完整地址", description = "完整地址")
public String getAddress() { public String getAddress() {
return "turn:" + this.host + ":" + this.port; return "turn:" + this.host + ":" + this.port;