mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化bug
This commit is contained in:
parent
bfc1c0708b
commit
e7629b79e1
3
app.js
3
app.js
@ -1,5 +1,6 @@
|
||||
var createError = require('http-errors');
|
||||
var express = require('express');
|
||||
const cors = require('cors');
|
||||
var path = require('path');
|
||||
var cookieParser = require('cookie-parser');
|
||||
var logger = require('morgan');
|
||||
@ -25,6 +26,8 @@ app.set('views', path.join(__dirname, 'views'));
|
||||
app.set('view engine', 'jade');
|
||||
|
||||
app.use(logger('dev'));
|
||||
// 使用cors中间件
|
||||
app.use(cors());
|
||||
// 反向代理(这里把需要进行反代的路径配置到这里即可)
|
||||
let opts = {
|
||||
preserveHostHdr: true,
|
||||
|
||||
628
package-lock.json
generated
628
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -8,6 +8,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"cookie-parser": "~1.4.4",
|
||||
"cors": "^2.8.5",
|
||||
"debug": "~2.6.9",
|
||||
"express": "~4.16.1",
|
||||
"express-http-proxy": "^1.6.0",
|
||||
|
||||
@ -44,11 +44,9 @@
|
||||
<div class="col-sm-2">
|
||||
<select class="custom-select" v-model="carInoutManageInfo.conditions.carType">
|
||||
<option selected value="">{{vc.i18n('请选择车牌类型','carInoutManage')}}</option>
|
||||
<option value="T">{{vc.i18n('临时车','carInoutManage')}}</option>
|
||||
<option value="1003">{{vc.i18n('临时车','carInoutManage')}}</option>
|
||||
<option value="S">{{vc.i18n('出售车辆','carInoutManage')}}</option>
|
||||
<option value="H">{{vc.i18n('月租车','carInoutManage')}}</option>
|
||||
<option value="W">{{vc.i18n('白名单','carInoutManage')}}</option>
|
||||
<option value="B">{{vc.i18n('黑名单','carInoutManage')}}</option>
|
||||
<option value="1001">{{vc.i18n('月租车','carInoutManage')}}</option>
|
||||
<option value="I">{{vc.i18n('内部车','carInoutManage')}}</option>
|
||||
<option value="NM">{{vc.i18n('免费车','carInoutManage')}}</option>
|
||||
</select>
|
||||
|
||||
33
public/v.html
Normal file
33
public/v.html
Normal file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>video</title>
|
||||
<script src="https://unpkg.com/flv.js/dist/flv.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<video id="my-player" preload="auto" muted autoplay type="rtmp/flv">
|
||||
<source src="">
|
||||
</video>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
// 获取video节点
|
||||
videoElement = document.getElementById('my-player');
|
||||
if (flvjs.isSupported()) {
|
||||
flvPlayer = flvjs.createPlayer({
|
||||
type: 'flv',
|
||||
isLive: true,
|
||||
url: 'http://localhost:3000/output_file.flv',//flv格式流地址
|
||||
},{
|
||||
enableWorker: false, //不启用分离线程
|
||||
enableStashBuffer: false, //关闭IO隐藏缓冲区
|
||||
reuseRedirectedURL: true, //重用301/302重定向url,用于随后的请求,如查找、重新连接等。
|
||||
autoCleanupSourceBuffer: true //自动清除缓存
|
||||
});
|
||||
flvPlayer.attachMediaElement(videoElement);
|
||||
flvPlayer.load(); //加载
|
||||
flvPlayer.play();//播放
|
||||
}
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user