Commit 1d8b3e9c by 李乾广

修改bug

1 parent c001e402
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
<script src="/jessibuca-pro/jessibuca-pro-demo.js"></script> <script src="/jessibuca-pro/jessibuca-pro-demo.js"></script>
......
...@@ -240,7 +240,7 @@ export default { ...@@ -240,7 +240,7 @@ export default {
const targetType = typeList[this.mirrorIndex % 2]; const targetType = typeList[this.mirrorIndex % 2];
this._jessibuca.setMirrorRotate(targetType); this._jessibuca.setMirrorRotate(targetType);
}, },
screenshot(filename = '', format = 'jpeg', quality = 0.2, type = 'base64') { screenshot(filename = '', format = 'jpeg', quality = 1, type = 'base64') {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// 如果是播放状态 // 如果是播放状态
const isPlaying = this._jessibuca.isPlaying(); const isPlaying = this._jessibuca.isPlaying();
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
const canvas = getWatermarkCanvasImg(this.player.width, this.player.height, this.watermarkText, image);; const canvas = getWatermarkCanvasImg(this.player.width, this.player.height, this.watermarkText, image);;
// 将带有水印的 Canvas 转换回 base64 // 将带有水印的 Canvas 转换回 base64
const watermarkedBase64 = canvas.toDataURL('image/png'); const watermarkedBase64 = canvas.toDataURL('image/jpeg',0.5);
// 现在,watermarkedBase64 包含了带有水印的 base64 图像数据 // 现在,watermarkedBase64 包含了带有水印的 base64 图像数据
// console.log(watermarkedBase64); // console.log(watermarkedBase64);
...@@ -272,7 +272,7 @@ export default { ...@@ -272,7 +272,7 @@ export default {
image.src = this._jessibuca.screenshot(filename, format, quality, type); image.src = this._jessibuca.screenshot(filename, format, quality, type);
}); });
}, },
screenshotOrigin(filename = '', format = 'jpeg', quality = 0.2, type = 'base64') { screenshotOrigin(filename = '', format = 'jpeg', quality = 1, type = 'base64') {
return this._jessibuca.screenshot(filename, format, quality, type); return this._jessibuca.screenshot(filename, format, quality, type);
} }
}, },
......
...@@ -93,19 +93,20 @@ export default { ...@@ -93,19 +93,20 @@ export default {
// 云台控制 // 云台控制
ptzControlClick(type) { ptzControlClick(type) {
console.log(type) console.log(type)
if(type != 'stop') {
this.nowPanTilt = this.panTiltList[type]
}
let par = { let par = {
direction:this.panTiltList[type], direction:this.panTiltList[type],
speed:2, speed:2,
gateUnid:this.params.gateUnid, gateUnid:this.params.gateUnid,
appKey:this.params.appKey, appKey:this.params.appKey,
} }
if(type != 'stop') {
this.nowPanTilt = this.panTiltList[type]
} else {
par.direction = this.nowPanTilt
}
// 加密 // 加密
let parStr = this.aesEncrypt(par) let parStr = this.aesEncrypt(par)
if(type == 'stop') { if(type == 'stop') {
par.direction = this.nowPanTilt
tourApi.ptzStop({param:parStr}).then(res => { tourApi.ptzStop({param:parStr}).then(res => {
console.log(res) console.log(res)
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!