Commit 0a75e7de by Tianqing Liu

feat: 抽离云台控制方法

1 parent 980e1c6c
......@@ -430,11 +430,8 @@
ptzClickType: 'mouseDownAndUp',
useWebGPU: true
});
g_jplayerHandle.on('ptz', (arrow) => {
console.log('player on ptz:', arrow);
function handlePtzController(arrow) {
var speed = 255;
var data = 0;
if (arrow == 'up') {
......@@ -488,6 +485,11 @@
}
jplayer_ptzControl('' + g_lastPtzCmd, '' + data, '' + speed);
}
g_jplayerHandle.on('ptz', (arrow) => {
console.log('player on ptz:', arrow);
handlePtzController(arrow);
})
......@@ -892,8 +894,13 @@
}
/**
* cmd 操作类型,上下左右、放大、缩小等
* para 1 表示停止,0表示移动
* speed 移动速度,默认为 255
*/
function jplayer_ptzControl(cmd, para, speed) {
// console.log('jplayer_ptzControl', cmd, para, speed);
var xhr = $.ajax({
url: "/nvsthird/ptzcontrol",
type: "post",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!