Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
蒋秀川
/
miniProject
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0a75e7de
authored
Sep 14, 2023
by
Tianqing Liu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 抽离云台控制方法
1 parent
980e1c6c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
h5/public/jplayer/index.html
h5/public/jplayer/index.html
View file @
0a75e7d
...
@@ -431,10 +431,7 @@
...
@@ -431,10 +431,7 @@
useWebGPU
:
true
useWebGPU
:
true
});
});
g_jplayerHandle
.
on
(
'ptz'
,
(
arrow
)
=>
{
function
handlePtzController
(
arrow
)
{
console
.
log
(
'player on ptz:'
,
arrow
);
var
speed
=
255
;
var
speed
=
255
;
var
data
=
0
;
var
data
=
0
;
if
(
arrow
==
'up'
)
{
if
(
arrow
==
'up'
)
{
...
@@ -488,6 +485,11 @@
...
@@ -488,6 +485,11 @@
}
}
jplayer_ptzControl
(
''
+
g_lastPtzCmd
,
''
+
data
,
''
+
speed
);
jplayer_ptzControl
(
''
+
g_lastPtzCmd
,
''
+
data
,
''
+
speed
);
}
g_jplayerHandle
.
on
(
'ptz'
,
(
arrow
)
=>
{
console
.
log
(
'player on ptz:'
,
arrow
);
handlePtzController
(
arrow
);
})
})
...
@@ -892,8 +894,13 @@
...
@@ -892,8 +894,13 @@
}
}
/**
* cmd 操作类型,上下左右、放大、缩小等
* para 1 表示停止,0表示移动
* speed 移动速度,默认为 255
*/
function
jplayer_ptzControl
(
cmd
,
para
,
speed
)
{
function
jplayer_ptzControl
(
cmd
,
para
,
speed
)
{
// console.log('jplayer_ptzControl', cmd, para, speed);
var
xhr
=
$
.
ajax
({
var
xhr
=
$
.
ajax
({
url
:
"/nvsthird/ptzcontrol"
,
url
:
"/nvsthird/ptzcontrol"
,
type
:
"post"
,
type
:
"post"
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment