优化播放器以及部分日志
This commit is contained in:
parent
ab13017117
commit
c566d4d7cf
@ -70,6 +70,7 @@ public class SIPRequestHeaderProvider {
|
||||
//via
|
||||
ArrayList<ViaHeader> viaHeaders = new ArrayList<ViaHeader>();
|
||||
ViaHeader viaHeader = sipFactory.createHeaderFactory().createViaHeader(device.getIp(), device.getPort(), device.getTransport(), viaTag);
|
||||
// ViaHeader viaHeader = sipFactory.createHeaderFactory().createViaHeader(sipConfig.getSipIp(), sipConfig.getSipPort(), device.getTransport(), viaTag);
|
||||
viaHeader.setRPort();
|
||||
viaHeaders.add(viaHeader);
|
||||
|
||||
|
@ -376,7 +376,7 @@ public class SIPCommander implements ISIPCommander {
|
||||
//
|
||||
StringBuffer content = new StringBuffer(200);
|
||||
content.append("v=0\r\n");
|
||||
// content.append("o="+channelId+" 0 0 IN IP4 "+mediaInfo.getWanIp()+"\r\n");
|
||||
// content.append("o=" + sipConfig.getSipId() + " 0 0 IN IP4 "+mediaInfo.getWanIp()+"\r\n");
|
||||
content.append("o="+"00000"+" 0 0 IN IP4 "+mediaInfo.getWanIp()+"\r\n");
|
||||
content.append("s=Play\r\n");
|
||||
content.append("c=IN IP4 "+mediaInfo.getWanIp()+"\r\n");
|
||||
|
@ -27,7 +27,7 @@ import javax.sip.message.Response;
|
||||
@Component
|
||||
public class RegisterResponseProcessor implements ISIPResponseProcessor {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(RegisterRequestProcessor.class);
|
||||
private Logger logger = LoggerFactory.getLogger(RegisterResponseProcessor.class);
|
||||
|
||||
@Autowired
|
||||
private ISIPCommanderForPlatform sipCommanderForPlatform;
|
||||
|
@ -13,6 +13,7 @@ import java.io.IOException;
|
||||
import java.net.ConnectException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@Component
|
||||
public class ZLMRESTfulUtils {
|
||||
@ -40,7 +41,7 @@ public class ZLMRESTfulUtils {
|
||||
|
||||
FormBody.Builder builder = new FormBody.Builder();
|
||||
builder.add("secret",mediaSecret);
|
||||
if (param != null) {
|
||||
if (param != null && param.keySet().size() > 0) {
|
||||
for (String key : param.keySet()){
|
||||
builder.add(key, param.get(key).toString());
|
||||
}
|
||||
@ -65,7 +66,7 @@ public class ZLMRESTfulUtils {
|
||||
logger.error(String.format("连接ZLM失败: %s, %s", e.getCause().getMessage(), e.getMessage()));
|
||||
logger.info("请检查media配置并确认ZLM已启动...");
|
||||
}catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
logger.error(String.format("[ %s ]请求失败: %s", url, e.getMessage()));
|
||||
}
|
||||
}else {
|
||||
client.newCall(request).enqueue(new Callback(){
|
||||
@ -74,14 +75,10 @@ public class ZLMRESTfulUtils {
|
||||
public void onResponse(@NotNull Call call, @NotNull Response response){
|
||||
if (response.isSuccessful()) {
|
||||
try {
|
||||
String responseStr = response.body().string();
|
||||
if (responseStr != null) {
|
||||
callback.run(JSON.parseObject(responseStr));
|
||||
}else {
|
||||
callback.run(null);
|
||||
}
|
||||
String responseStr = Objects.requireNonNull(response.body()).string();
|
||||
callback.run(JSON.parseObject(responseStr));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
logger.error(String.format("[ %s ]请求失败: %s", url, e.getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,9 +63,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
|
||||
from: path.resolve(__dirname, '../static'),
|
||||
to: config.dev.assetsSubDirectory,
|
||||
ignore: ['.*']
|
||||
},
|
||||
{ from: 'node_modules/@easydarwin/easywasmplayer/libDecoder.wasm', to: 'static/'},
|
||||
{ from: 'node_modules/@easydarwin/easywasmplayer/EasyWasmPlayer.js', to: 'static/js/'}
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
@ -114,9 +114,7 @@ const webpackConfig = merge(baseWebpackConfig, {
|
||||
from: path.resolve(__dirname, '../static'),
|
||||
to: config.build.assetsSubDirectory,
|
||||
ignore: ['.*']
|
||||
},
|
||||
{ from: 'node_modules/@easydarwin/easywasmplayer/libDecoder.wasm', to: 'static/'},
|
||||
{ from: 'node_modules/@easydarwin/easywasmplayer/EasyWasmPlayer.js', to: 'static/js/'}
|
||||
}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
6
web_src/package-lock.json
generated
6
web_src/package-lock.json
generated
@ -5,9 +5,9 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@easydarwin/easywasmplayer": {
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npm.taobao.org/@easydarwin/easywasmplayer/download/@easydarwin/easywasmplayer-4.0.7.tgz",
|
||||
"integrity": "sha1-FNtIUXbdwIWdalvIMEaH0+zUGx4="
|
||||
"version": "4.0.12",
|
||||
"resolved": "https://registry.npm.taobao.org/@easydarwin/easywasmplayer/download/@easydarwin/easywasmplayer-4.0.12.tgz",
|
||||
"integrity": "sha1-8Isg0HkYtHHQ20PLnCTHsOjw7lA="
|
||||
},
|
||||
"@types/q": {
|
||||
"version": "1.5.4",
|
||||
|
@ -10,7 +10,6 @@
|
||||
"build": "node build/build.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@easydarwin/easywasmplayer": "^4.0.7",
|
||||
"axios": "^0.19.2",
|
||||
"core-js": "^2.6.5",
|
||||
"echarts": "^4.7.0",
|
||||
|
@ -9,6 +9,7 @@ import streamProxyList from '../components/StreamProxyList.vue'
|
||||
import devicePosition from '../components/devicePosition.vue'
|
||||
import login from '../components/Login.vue'
|
||||
import parentPlatformList from '../components/ParentPlatformList.vue'
|
||||
import test from '../components/test.vue'
|
||||
|
||||
const originalPush = VueRouter.prototype.push
|
||||
VueRouter.prototype.push = function push(location) {
|
||||
@ -56,6 +57,11 @@ export default new VueRouter({
|
||||
path: '/devicePosition/:deviceId/:parentChannelId/:count/:page',
|
||||
name: 'devicePosition',
|
||||
component: devicePosition,
|
||||
},,
|
||||
{
|
||||
path: '/test',
|
||||
name: 'test',
|
||||
component: test,
|
||||
},
|
||||
]
|
||||
})
|
||||
|
19
web_src/static/js/EasyWasmPlayer.js
Normal file
19
web_src/static/js/EasyWasmPlayer.js
Normal file
File diff suppressed because one or more lines are too long
BIN
web_src/static/libDecoder.wasm
Normal file
BIN
web_src/static/libDecoder.wasm
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user