修复后端重启,前端不重定向
parent
2cb3ab8799
commit
e07504fe7e
|
@ -297,9 +297,22 @@ public class ZLMHttpHookListener {
|
|||
if (!"rtp".equals(app) ){
|
||||
MediaServerItem mediaServerItem = mediaServerService.getOne(mediaServerId);
|
||||
if (regist) {
|
||||
zlmMediaListManager.addMedia(mediaServerItem, app, streamId);
|
||||
// if("qupinwei".equals(app) && streamId.contains("/")){
|
||||
// String[] split = streamId.split("/");
|
||||
|
||||
// if(split.length >2){
|
||||
// logger.error("流地址不符合固定的要求");
|
||||
// }else{
|
||||
zlmMediaListManager.addMedia(mediaServerItem, app,streamId );
|
||||
//// }
|
||||
//
|
||||
//
|
||||
// }else{
|
||||
// logger.error("流地址不符合固定的要求");
|
||||
// }
|
||||
|
||||
}else {
|
||||
zlmMediaListManager.removeMedia( app, streamId);
|
||||
zlmMediaListManager.removeMedia(app, streamId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,19 @@ public class ZLMMediaListManager {
|
|||
}
|
||||
|
||||
if (streamPushItems != null && streamPushItems.size() == 1) {
|
||||
storager.updateMedia(streamPushItems.get(0));
|
||||
StreamPushItem streamPushItem = streamPushItems.get(0);
|
||||
if("qupinwei".equals(streamPushItem.getApp()) && streamPushItem.getStream().contains("/") && streamPushItem.getStream().split("/").length == 2){
|
||||
|
||||
String[] split = streamPushItem.getStream().split("/");
|
||||
streamPushItem.setBasketballId(Integer.parseInt(split[1]));
|
||||
|
||||
storager.updateMedia(streamPushItem);
|
||||
}else {
|
||||
logger.error("流地址格式不符合");
|
||||
removeMedia(app,streamId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -18,6 +18,11 @@ public class StreamPushItem extends GbStream implements Comparable<StreamPushIte
|
|||
*/
|
||||
private String stream;
|
||||
|
||||
/**
|
||||
* 篮球馆ID
|
||||
*/
|
||||
private Integer basketballId;
|
||||
|
||||
/**
|
||||
* 观看总人数,包括hls/rtsp/rtmp/http-flv/ws-flv
|
||||
*/
|
||||
|
@ -95,6 +100,14 @@ public class StreamPushItem extends GbStream implements Comparable<StreamPushIte
|
|||
return Long.valueOf(this.createStamp - streamPushItem.getCreateStamp().intValue()).intValue();
|
||||
}
|
||||
|
||||
public Integer getBasketballId() {
|
||||
return basketballId;
|
||||
}
|
||||
|
||||
public void setBasketballId(Integer basketballId) {
|
||||
this.basketballId = basketballId;
|
||||
}
|
||||
|
||||
public static class MediaSchema {
|
||||
private String schema;
|
||||
private Long bytesSpeed;
|
||||
|
|
|
@ -11,9 +11,9 @@ import java.util.List;
|
|||
public interface StreamPushMapper {
|
||||
|
||||
@Insert("INSERT INTO stream_push (app, stream, totalReaderCount, originType, originTypeStr, " +
|
||||
"createStamp, aliveSecond, mediaServerId) VALUES" +
|
||||
"createStamp, aliveSecond, mediaServerId,basketballId) VALUES" +
|
||||
"('${app}', '${stream}', '${totalReaderCount}', '${originType}', '${originTypeStr}', " +
|
||||
"'${createStamp}', '${aliveSecond}', '${mediaServerId}' )")
|
||||
"'${createStamp}', '${aliveSecond}', '${mediaServerId}' ,'${basketballId}')")
|
||||
int add(StreamPushItem streamPushItem);
|
||||
|
||||
@Update("UPDATE stream_push " +
|
||||
|
|
|
@ -62,9 +62,9 @@ media:
|
|||
# [必须修改] zlm服务器的内网IP
|
||||
ip: 192.168.1.59
|
||||
# [可选] 返回流地址时的ip,置空使用 media.ip
|
||||
stream-ip: 182.119.225.208
|
||||
stream-ip: 182.119.229.87
|
||||
# [可选] wvp在国标信令中使用的ip,此ip为摄像机可以访问到的ip, 置空使用 media.ip
|
||||
sdp-ip: 182.119.225.208
|
||||
sdp-ip: 182.119.229.87
|
||||
# [可选] zlm服务器的hook所使用的IP, 默认使用sip.ip
|
||||
hook-ip:
|
||||
# [必须修改] zlm服务器的http.port
|
||||
|
|
|
@ -42,6 +42,9 @@ Fingerprint2.get(components => {
|
|||
console.log("浏览器唯一标识码:" + fingerPrint);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
// mount axios to `Vue.$http` and `this.$http`
|
||||
|
@ -62,3 +65,6 @@ new Vue({
|
|||
created: bootstrap,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import store from '@/store'
|
|||
import storage from 'store'
|
||||
import notification from 'ant-design-vue/es/notification'
|
||||
import { VueAxios } from './axios'
|
||||
|
||||
import router from '@/router'
|
||||
// 创建 axios 实例
|
||||
const request = axios.create({
|
||||
// API 请求的默认前缀
|
||||
|
@ -13,6 +13,7 @@ const request = axios.create({
|
|||
|
||||
// 异常拦截处理器
|
||||
const errorHandler = (error) => {
|
||||
debugger;
|
||||
if (error.response) {
|
||||
const data = error.response.data
|
||||
if (error.response.status === 403) {
|
||||
|
@ -22,10 +23,7 @@ const errorHandler = (error) => {
|
|||
})
|
||||
}
|
||||
if (error.response.status === 401 && !(data.result && data.result.isLogin)) {
|
||||
notification.error({
|
||||
message: 'Unauthorized',
|
||||
description: 'Authorization verification failed'
|
||||
})
|
||||
router.push('/login');
|
||||
}
|
||||
}
|
||||
return Promise.reject(error)
|
||||
|
|
Loading…
Reference in New Issue