js和css使用本地相对路径
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>监控大屏 - 4路直播</title>
|
||||
<link href="https://vjs.zencdn.net/7.20.3/video-js.css" rel="stylesheet" />
|
||||
<link href="static/video-js.css" rel="stylesheet" />
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
@@ -375,7 +375,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://vjs.zencdn.net/7.20.3/video.min.js"></script>
|
||||
<script src="static/video.min.js"></script>
|
||||
<script>
|
||||
// 配置直播流地址 - 请根据实际情况修改这些URL
|
||||
const streamConfigs = {
|
||||
@@ -489,7 +489,7 @@
|
||||
// 加载直播流
|
||||
function loadStream(screenId) {
|
||||
const config = streamConfigs[screenId];
|
||||
if (!config || !config.url || config.url === 'http://example.com/stream3.m3u8' || config.url === 'http://example.com/stream4.m3u8') {
|
||||
if (!config || !config.url) {
|
||||
console.error(`屏幕 ${screenId} 未配置有效的直播流地址`);
|
||||
showError(screenId);
|
||||
updateStatus(screenId, '未配置');
|
||||
|
||||
55
web_page/nginx.conf
Normal file
55
web_page/nginx.conf
Normal file
@@ -0,0 +1,55 @@
|
||||
# Nginx配置文件 - 监控大屏系统
|
||||
server {
|
||||
listen 8093;
|
||||
server_name localhost;
|
||||
|
||||
# 设置字符编码
|
||||
charset utf-8;
|
||||
|
||||
# 设置根目录
|
||||
root /path/to/your/FaceRecognitionWithInsightFace/web_page;
|
||||
|
||||
# 默认首页
|
||||
index index.html monitor_dashboard.html;
|
||||
|
||||
# 主页面服务
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
|
||||
# 设置MIME类型
|
||||
types {
|
||||
text/html html htm;
|
||||
text/css css;
|
||||
application/javascript js;
|
||||
image/png png;
|
||||
image/jpeg jpg jpeg;
|
||||
image/gif gif;
|
||||
image/svg+xml svg;
|
||||
}
|
||||
|
||||
# 启用gzip压缩
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# 缓存设置
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
|
||||
# 静态资源目录(如果有的话)
|
||||
location /static/ {
|
||||
alias /path/to/your/FaceRecognitionWithInsightFace/web_page/static/;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# 错误页面
|
||||
error_page 404 /404.html;
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
|
||||
# 日志设置
|
||||
access_log /var/log/nginx/monitor_dashboard_access.log;
|
||||
error_log /var/log/nginx/monitor_dashboard_error.log;
|
||||
}
|
||||
1770
web_page/static/video-js.css
Normal file
1770
web_page/static/video-js.css
Normal file
File diff suppressed because one or more lines are too long
26
web_page/static/video.min.js
vendored
Normal file
26
web_page/static/video.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user