Skip to content

Commit b1c6241

Browse files
committed
feat: socket heartbeat
feat: video face mode feat: change nickname feat: update self connect css feat: docker-compose inner env fix: some lang error
1 parent 52ad9eb commit b1c6241

File tree

19 files changed

+604
-41
lines changed

19 files changed

+604
-41
lines changed

docker-compose-with-all-env.yml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
## !!!!!!用于docker-compose部署并启动官方镜像!!!!!!
2+
## !!!!!!内置配置的形式启动!!!!!!!!!!!!!!!!!!!!!!!
3+
4+
version: '3'
5+
6+
################## 按需修改好配置
7+
x-tlrtcfile-env: &tlrtcfile-env
8+
## api服务端口
9+
tl_rtc_file_api_port: 9092
10+
## websocket服务端口
11+
tl_rtc_file_socket_port: 8444
12+
## websocket服务地址
13+
tl_rtc_file_socket_host: 127.0.0.1:8444
14+
## webrtc-stun中继服务地址
15+
tl_rtc_file_webrtc_stun_host: stun:127.0.0.1:3478
16+
## webrtc-turn中继服务地址
17+
tl_rtc_file_webrtc_turn_host: turn:127.0.0.1:3478?transport=udp
18+
## webrtc中继服务用户名
19+
tl_rtc_file_webrtc_turn_username: tlrtcfile
20+
## webrtc中继服务密码
21+
tl_rtc_file_webrtc_turn_credential: tlrtcfile
22+
## webrtc中继服务Secret
23+
tl_rtc_file_webrtc_turn_secret: tlrtcfile
24+
## webrtc中继服务帐号过期时间 (毫秒)
25+
tl_rtc_file_webrtc_turn_expire: 86400000
26+
## 是否开启数据库
27+
tl_rtc_file_db_open: true
28+
## 数据库地址
29+
tl_rtc_file_db_mysql_host: mysql
30+
## 数据库端口
31+
tl_rtc_file_db_mysql_port: 3306
32+
## 数据库名称
33+
tl_rtc_file_db_mysql_dbName: webchat
34+
## 数据库用户名
35+
tl_rtc_file_db_mysql_user: tlrtcfile
36+
## 数据库密码
37+
tl_rtc_file_db_mysql_password: tlrtcfile
38+
## oss-seafile存储库ID
39+
tl_rtc_file_oss_seafile_repoid:
40+
## oss-seafile地址
41+
tl_rtc_file_oss_seafile_host:
42+
## oss-seafile用户名
43+
tl_rtc_file_oss_seafile_username:
44+
## oss-seafile密码
45+
tl_rtc_file_oss_seafile_password:
46+
## oss-alyun存储accessKey
47+
tl_rtc_file_oss_alyun_AccessKey:
48+
## oss-aly存储SecretKey
49+
tl_rtc_file_oss_alyun_Secretkey:
50+
## oss-aly存储bucket
51+
tl_rtc_file_oss_alyun_bucket:
52+
## oss-txyun存储accessKey
53+
tl_rtc_file_oss_txyun_AccessKey:
54+
## oss-txyunt存储SecretKey
55+
tl_rtc_file_oss_txyun_Secretkey:
56+
## oss-txyun存储bucket
57+
tl_rtc_file_oss_txyun_bucket:
58+
## oss-qiniuyun存储accessKey
59+
tl_rtc_file_oss_qiniuyun_AccessKey:
60+
## oss-qiniuyunt存储SecretKey
61+
tl_rtc_file_oss_qiniuyun_Secretkey:
62+
## oss-qiniuyun存储bucket
63+
tl_rtc_file_oss_qiniuyun_bucket:
64+
## 管理后台房间号
65+
tl_rtc_file_manage_room: tlrtcfile
66+
## 管理后台密码
67+
tl_rtc_file_manage_password: tlrtcfile
68+
## openai-key,如果有多个key,逗号分隔
69+
tl_rtc_file_openai_keys:
70+
## 企业微信通知开关
71+
tl_rtc_file_notify_open: false
72+
## 企业微信通知机器人KEY,正常通知,如果有多个key,逗号分隔
73+
tl_rtc_file_notify_qiwei_normal:
74+
## 企业微信通知机器人KEY,错误通知,如果有多个key,逗号分隔
75+
tl_rtc_file_notify_qiwei_error:
76+
77+
78+
services:
79+
80+
#http模式启动api服务
81+
api-http:
82+
profiles: ['http']
83+
image: iamtsm/tl-rtc-file-api
84+
container_name: api
85+
environment:
86+
<<: *tlrtcfile-env
87+
tl_rtc_file_env_mode: http
88+
command:
89+
- tlapi
90+
ports:
91+
- 9092:9092
92+
links:
93+
- mysql
94+
depends_on:
95+
- mysql
96+
- coturn
97+
98+
#https模式启动api服务
99+
api-https:
100+
profiles: ['https']
101+
image: iamtsm/tl-rtc-file-api
102+
container_name: api
103+
environment:
104+
<<: *tlrtcfile-env
105+
tl_rtc_file_env_mode: https
106+
command:
107+
- tlapi
108+
ports:
109+
- 9092:9092
110+
links:
111+
- mysql
112+
depends_on:
113+
- mysql
114+
- coturn
115+
116+
#http模式启动socket服务
117+
socket-http:
118+
profiles: ['http']
119+
image: iamtsm/tl-rtc-file-socket
120+
container_name: socket
121+
command:
122+
- tlsocket
123+
environment:
124+
<<: *tlrtcfile-env
125+
tl_rtc_file_env_mode: http
126+
ports:
127+
- 8444:8444
128+
links:
129+
- mysql
130+
depends_on:
131+
- mysql
132+
- coturn
133+
134+
#https模式启动socket服务
135+
socket-https:
136+
profiles: ['https']
137+
image: iamtsm/tl-rtc-file-socket
138+
container_name: socket
139+
command:
140+
- tlsocket
141+
environment:
142+
<<: *tlrtcfile-env
143+
tl_rtc_file_env_mode: https
144+
ports:
145+
- 8444:8444
146+
links:
147+
- mysql
148+
depends_on:
149+
- mysql
150+
- coturn
151+
152+
#mysql服务
153+
mysql:
154+
profiles: ['http','https']
155+
image: iamtsm/tl-rtc-file-mysql
156+
container_name: mysql
157+
restart: always
158+
environment:
159+
#设置root密码
160+
MYSQL_ROOT_PASSWORD: tlrtcfile
161+
#设置数据库
162+
MYSQL_DATABASE: webchat
163+
#设置用户
164+
MYSQL_USER: tlrtcfile
165+
#设置用户密码
166+
MYSQL_PASSWORD: tlrtcfile
167+
ports:
168+
- 3306:3306
169+
volumes:
170+
- ./db:/var/lib/mysql
171+
- ./my.cnf:/etc/mysql/conf.d/my.cnf
172+
- ./log:/var/log/mysql
173+
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
174+
175+
#coturn服务
176+
coturn:
177+
profiles: ['http','https']
178+
image: iamtsm/tl-rtc-file-coturn
179+
container_name: coturn
180+
ports:
181+
- "3478:3478/udp"
182+
- "3478:3478/tcp"
183+
volumes:
184+
- ./turnserver-with-secret-user.conf:/etc/turnserver.conf

svr/conf/cfg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "10.4.5",
2+
"version": "10.4.6",
33
"socket": {
44
"port": "请到 tlrtcfile.env 中进行配置",
55
"host": "请到 tlrtcfile.env 中进行配置"

svr/res/css/index.css

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@ body {
258258
.tl-rtc-file-user {
259259
padding: 10px 20px 0px 10px;
260260
cursor: pointer;
261-
background-color: rgb(248, 253, 255);
262261
border-radius: 10px;
263262
box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 3px;
264263
transition: box-shadow 0.3s;
@@ -1081,7 +1080,6 @@ body {
10811080
user-select: none;
10821081
}
10831082

1084-
10851083
.chating_input_body{
10861084
bottom: 0px;
10871085
position: absolute;
@@ -1111,7 +1109,6 @@ body {
11111109
border-radius: 5px;
11121110
}
11131111

1114-
11151112
.remote_user_info{
11161113
text-align: left;
11171114
padding: 20px 20px 0 20px;
@@ -1142,7 +1139,7 @@ body {
11421139
max-width: 40px;
11431140
width: 5% !important;
11441141
margin-left: 50% !important;
1145-
}
1142+
}
11461143

11471144
.tl-rtc-file-tool-mobile {
11481145
padding: 5px !important;
@@ -1157,7 +1154,7 @@ body {
11571154
word-break: keep-all !important;
11581155
margin: 0 !important;
11591156
bottom: 0 !important;
1160-
-webkit-transform-origin-x: 0 !important;
1157+
-webkit-transform-origin-x: 0 !important;
11611158
transform: scale(0.6) !important;
11621159
-webkit-transform: scale(0.6) !important;
11631160
}
@@ -1167,18 +1164,18 @@ body {
11671164
margin: 10px 20px;
11681165
border-radius: 8px;
11691166
cursor: pointer;
1170-
transition: all 0.5s;
1167+
transition: all 0.3s;
11711168
font-weight: bold;
1172-
color: #595252e3;
1169+
color: black;
11731170
}
11741171

11751172
.tl-rtc-file-live-user-choose svg{
1176-
font-size: 3rem;
1173+
font-size: 2rem;
11771174
margin-bottom: 5px;
11781175
}
11791176

11801177
.tl-rtc-file-live-user-choose:hover{
1181-
color: black;
1178+
color: #79b0e8;
11821179
}
11831180

11841181
/* 500px以下 */

svr/res/index.html

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,13 @@
330330
<!-- 自己 -->
331331
<div class="layui-row" style="margin-top: 30px;" v-show="socketId !== 0">
332332
<div class="layui-col-xs12 tl-rtc-file-user-list">
333-
<div class="tl-rtc-file-user">
334-
<div class="tl-rtc-file-user-body">
335-
<svg class="icon" aria-hidden="true" style="width: 32px;height: 32px;">
336-
<use xlink:href="#icon-rtc-file-icon-test"></use>
337-
</svg>
333+
<div class="tl-rtc-file-user" style="background: #f6fdff;">
334+
<div class="tl-rtc-file-user-body" @click="changeNickName()">
335+
<div>
336+
<svg class="icon" aria-hidden="true" style="width: 32px;height: 32px;">
337+
<use xlink:href="#icon-rtc-file-jiangbei-"></use>
338+
</svg>
339+
</div>
338340
<div class="tl-rtc-file-user-body-left">
339341
<b class="tl-rtc-file-user-body-left-nick">
340342
<b v-show="owner" style="color: #51d788;">【{{roomTypeName}}】-</b>
@@ -1035,13 +1037,18 @@
10351037
</svg>
10361038
</div>
10371039
<div class="tl-rtc-file-mask-media-video-tool">
1038-
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStream('video','video')">
1040+
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeVideoShareMediaTrackAndStream()">
1041+
<svg class="icon" aria-hidden="true" style="width: 18px;height: 18px;">
1042+
<use xlink:href="#icon-rtc-file-xiangjifanzhuan"></use>
1043+
</svg>
1044+
</div>
1045+
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStreamSwitch('video','video')">
10391046
<svg class="icon" aria-hidden="true" style="width: 18px;height: 18px;">
10401047
<use v-if="isCameraEnabled" xlink:href="#icon-rtc-file-shexiangtou"></use>
10411048
<use v-else xlink:href="#icon-rtc-file-shexiangtou_guanbi"></use>
10421049
</svg>
10431050
</div>
1044-
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStream('video','audio')">
1051+
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStreamSwitch('video','audio')">
10451052
<svg class="icon" aria-hidden="true" style="width: 18px;height: 18px;">
10461053
<use v-if="isAudioEnabled" xlink:href="#icon-rtc-file-maikefeng-XDY"></use>
10471054
<use v-else xlink:href="#icon-rtc-file-guanbimaikefeng"></use>
@@ -1083,7 +1090,7 @@
10831090
</svg>
10841091
</div>
10851092
<div class="tl-rtc-file-mask-media-video-tool">
1086-
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStream('screen','video')">
1093+
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStreamSwitch('screen','video')">
10871094
<svg class="icon" aria-hidden="true" style="width: 18px;height: 18px;">
10881095
<use v-if="isCameraEnabled" xlink:href="#icon-rtc-file-pingmugongxiang"></use>
10891096
<use v-else xlink:href="#icon-rtc-file-guanbipingmu"></use>
@@ -1126,6 +1133,11 @@
11261133
</svg>
11271134
</div>
11281135
<div class="tl-rtc-file-mask-media-video-tool" v-show="owner">
1136+
<div v-show="liveShareMode === 'video'" class="tl-rtc-file-mask-media-video-tool-item" @click="changeLiveVideoShareMediaTrackAndStream()">
1137+
<svg class="icon" aria-hidden="true" style="width: 18px;height: 18px;">
1138+
<use xlink:href="#icon-rtc-file-xiangjifanzhuan"></use>
1139+
</svg>
1140+
</div>
11291141
<div v-show="changeLiveShareMediaTrackAndStreamTime === 0" class="tl-rtc-file-mask-media-video-tool-item" @click="changeLiveShareMediaTrackAndStream()">
11301142
<svg class="icon" aria-hidden="true" style="width: 18px;height: 18px;">
11311143
<use xlink:href="#icon-rtc-file-fanzhuanjingtou"></use>
@@ -1134,7 +1146,7 @@
11341146
<div v-show="changeLiveShareMediaTrackAndStreamTime > 0" class="tl-rtc-file-mask-media-video-tool-item layui-disabled" style="padding: 2px 10px 2px 10px">
11351147
{{changeLiveShareMediaTrackAndStreamTime}}
11361148
</div>
1137-
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStream('live', 'video')">
1149+
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStreamSwitch('live', 'video')">
11381150
<svg v-if="liveShareMode === 'video'" class="icon" aria-hidden="true" style="width: 18px;height: 18px;">
11391151
<use v-if="isCameraEnabled" xlink:href="#icon-rtc-file-shexiangtou"></use>
11401152
<use v-else xlink:href="#icon-rtc-file-shexiangtou_guanbi"></use>
@@ -1144,7 +1156,7 @@
11441156
<use v-else xlink:href="#icon-rtc-file-guanbipingmu"></use>
11451157
</svg>
11461158
</div>
1147-
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStream('live','audio')">
1159+
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStreamSwitch('live','audio')">
11481160
<svg class="icon" aria-hidden="true" style="width: 18px;height: 18px;">
11491161
<use v-if="isAudioEnabled" xlink:href="#icon-rtc-file-maikefeng-XDY"></use>
11501162
<use v-else xlink:href="#icon-rtc-file-guanbimaikefeng"></use>
@@ -1189,7 +1201,7 @@
11891201
</svg>
11901202
</div>
11911203
<div class="tl-rtc-file-mask-media-video-tool">
1192-
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStream('audio','audio')">
1204+
<div class="tl-rtc-file-mask-media-video-tool-item" @click="changeShareStreamSwitch('audio','audio')">
11931205
<svg class="icon" aria-hidden="true" style="width: 18px;height: 18px;">
11941206
<use v-if="isAudioEnabled" xlink:href="#icon-rtc-file-maikefeng-XDY"></use>
11951207
<use v-else xlink:href="#icon-rtc-file-guanbimaikefeng"></use>

0 commit comments

Comments
 (0)