Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supervise-front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
牛晓林
supervise-front
Commits
c7ed70c8
Commit
c7ed70c8
authored
Jul 30, 2019
by
niuxiaolin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latest
parent
614f340f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
15 deletions
+18
-15
package.json
package.json
+1
-1
video.component.less
src/app/video/video.component.less
+2
-1
video.component.ts
src/app/video/video.component.ts
+15
-13
No files found.
package.json
View file @
c7ed70c8
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"scripts"
:
{
"scripts"
:
{
"ng"
:
"ng"
,
"ng"
:
"ng"
,
"start"
:
"ng serve --proxy--config proxy.json"
,
"start"
:
"ng serve --proxy--config proxy.json"
,
"build"
:
"ng build && npm run remove-to && npm run create && npm run copy-to"
,
"build"
:
"ng build
--prod --build-optimizer
&& npm run remove-to && npm run create && npm run copy-to"
,
"remove-to"
:
"rd /s /q D:
\\
projects
\\
supervise
\\
src
\\
main
\\
resources
\\
static"
,
"remove-to"
:
"rd /s /q D:
\\
projects
\\
supervise
\\
src
\\
main
\\
resources
\\
static"
,
"create"
:
"mkdir D:
\\
projects
\\
supervise
\\
src
\\
main
\\
resources
\\
static"
,
"create"
:
"mkdir D:
\\
projects
\\
supervise
\\
src
\\
main
\\
resources
\\
static"
,
"copy-to"
:
" powershell -command
\"
Copy-Item D:
\\
projects
\\
map
\\
dist
\\
map
\\
* -Destination D:
\\
projects
\\
supervise
\\
src
\\
main
\\
resources
\\
static
\\
-Recurse
\"
"
,
"copy-to"
:
" powershell -command
\"
Copy-Item D:
\\
projects
\\
map
\\
dist
\\
map
\\
* -Destination D:
\\
projects
\\
supervise
\\
src
\\
main
\\
resources
\\
static
\\
-Recurse
\"
"
,
...
...
src/app/video/video.component.less
View file @
c7ed70c8
...
@@ -29,6 +29,6 @@
...
@@ -29,6 +29,6 @@
}
}
#playWnd{
#playWnd{
width:
5
00px;
width:
10
00px;
height: 500px;
height: 500px;
}
}
\ No newline at end of file
src/app/video/video.component.ts
View file @
c7ed70c8
...
@@ -3,6 +3,8 @@ import { DynamicScriptLoaderService } from '../dynamic-script.service';
...
@@ -3,6 +3,8 @@ import { DynamicScriptLoaderService } from '../dynamic-script.service';
declare
var
WebControl
;
declare
var
WebControl
;
declare
var
JSEncrypt
;
declare
var
JSEncrypt
;
declare
var
$
;
declare
var
$
;
const
width
=
1500
;
const
height
=
700
;
@
Component
({
@
Component
({
selector
:
'app-video'
,
selector
:
'app-video'
,
templateUrl
:
'./video.component.html'
,
templateUrl
:
'./video.component.html'
,
...
@@ -171,7 +173,7 @@ export class VideoComponent implements OnInit {
...
@@ -171,7 +173,7 @@ export class VideoComponent implements OnInit {
// 监听resize事件,使插件窗口尺寸跟随DIV窗口变化
// 监听resize事件,使插件窗口尺寸跟随DIV窗口变化
$
(
window
).
resize
(
function
()
{
$
(
window
).
resize
(
function
()
{
if
(
oWebControl
!=
null
)
{
if
(
oWebControl
!=
null
)
{
oWebControl
.
JS_Resize
(
1
000
,
6
00
);
oWebControl
.
JS_Resize
(
1
500
,
7
00
);
setWndCover
();
setWndCover
();
}
}
});
});
...
@@ -179,7 +181,7 @@ export class VideoComponent implements OnInit {
...
@@ -179,7 +181,7 @@ export class VideoComponent implements OnInit {
// 监听滚动条scroll事件,使插件窗口跟随浏览器滚动而移动
// 监听滚动条scroll事件,使插件窗口跟随浏览器滚动而移动
$
(
window
).
scroll
(
function
()
{
$
(
window
).
scroll
(
function
()
{
if
(
oWebControl
!=
null
)
{
if
(
oWebControl
!=
null
)
{
oWebControl
.
JS_Resize
(
1
000
,
6
00
);
oWebControl
.
JS_Resize
(
1
500
,
7
00
);
setWndCover
();
setWndCover
();
}
}
});
});
...
@@ -196,23 +198,23 @@ function setWndCover() {
...
@@ -196,23 +198,23 @@ function setWndCover() {
var
iCoverRight
=
(
oDivRect
.
right
-
iWidth
>
0
)
?
Math
.
round
(
oDivRect
.
right
-
iWidth
)
:
0
;
var
iCoverRight
=
(
oDivRect
.
right
-
iWidth
>
0
)
?
Math
.
round
(
oDivRect
.
right
-
iWidth
)
:
0
;
var
iCoverBottom
=
(
oDivRect
.
bottom
-
iHeight
>
0
)
?
Math
.
round
(
oDivRect
.
bottom
-
iHeight
)
:
0
;
var
iCoverBottom
=
(
oDivRect
.
bottom
-
iHeight
>
0
)
?
Math
.
round
(
oDivRect
.
bottom
-
iHeight
)
:
0
;
iCoverLeft
=
(
iCoverLeft
>
1
000
)
?
10
00
:
iCoverLeft
;
iCoverLeft
=
(
iCoverLeft
>
1
500
)
?
15
00
:
iCoverLeft
;
iCoverTop
=
(
iCoverTop
>
600
)
?
6
00
:
iCoverTop
;
iCoverTop
=
(
iCoverTop
>
700
)
?
7
00
:
iCoverTop
;
iCoverRight
=
(
iCoverRight
>
1
000
)
?
10
00
:
iCoverRight
;
iCoverRight
=
(
iCoverRight
>
1
500
)
?
15
00
:
iCoverRight
;
iCoverBottom
=
(
iCoverBottom
>
600
)
?
6
00
:
iCoverBottom
;
iCoverBottom
=
(
iCoverBottom
>
700
)
?
7
00
:
iCoverBottom
;
oWebControl
.
JS_RepairPartWindow
(
0
,
0
,
1001
,
6
00
);
// 多1个像素点防止还原后边界缺失一个像素条
oWebControl
.
JS_RepairPartWindow
(
0
,
0
,
1001
,
7
00
);
// 多1个像素点防止还原后边界缺失一个像素条
if
(
iCoverLeft
!=
0
)
{
if
(
iCoverLeft
!=
0
)
{
oWebControl
.
JS_CuttingPartWindow
(
0
,
0
,
iCoverLeft
,
6
00
);
oWebControl
.
JS_CuttingPartWindow
(
0
,
0
,
iCoverLeft
,
7
00
);
}
}
if
(
iCoverTop
!=
0
)
{
if
(
iCoverTop
!=
0
)
{
oWebControl
.
JS_CuttingPartWindow
(
0
,
0
,
1001
,
iCoverTop
);
// 多剪掉一个像素条,防止出现剪掉一部分窗口后出现一个像素条
oWebControl
.
JS_CuttingPartWindow
(
0
,
0
,
1001
,
iCoverTop
);
// 多剪掉一个像素条,防止出现剪掉一部分窗口后出现一个像素条
}
}
if
(
iCoverRight
!=
0
)
{
if
(
iCoverRight
!=
0
)
{
oWebControl
.
JS_CuttingPartWindow
(
1
000
-
iCoverRight
,
0
,
iCoverRight
,
6
00
);
oWebControl
.
JS_CuttingPartWindow
(
1
500
-
iCoverRight
,
0
,
iCoverRight
,
7
00
);
}
}
if
(
iCoverBottom
!=
0
)
{
if
(
iCoverBottom
!=
0
)
{
oWebControl
.
JS_CuttingPartWindow
(
0
,
600
-
iCoverBottom
,
10
00
,
iCoverBottom
);
oWebControl
.
JS_CuttingPartWindow
(
0
,
700
-
iCoverBottom
,
15
00
,
iCoverBottom
);
}
}
}
}
let
pubKey
=
null
;
let
pubKey
=
null
;
...
@@ -249,7 +251,7 @@ oWebControl.JS_RepairPartWindow(0, 0, 1001, 600); // 多1个像素点防止
...
@@ -249,7 +251,7 @@ oWebControl.JS_RepairPartWindow(0, 0, 1001, 600); // 多1个像素点防止
var
port
=
443
;
//综合安防管理平台端口,若启用HTTPS协议,默认443
var
port
=
443
;
//综合安防管理平台端口,若启用HTTPS协议,默认443
var
snapDir
=
"D:
\\
SnapDir"
;
//抓图存储路径
var
snapDir
=
"D:
\\
SnapDir"
;
//抓图存储路径
var
videoDir
=
"D:
\\
VideoDir"
;
//紧急录像或录像剪辑存储路径
var
videoDir
=
"D:
\\
VideoDir"
;
//紧急录像或录像剪辑存储路径
var
layout
=
"4x
4
"
;
//playMode指定模式的布局
var
layout
=
"4x
6
"
;
//playMode指定模式的布局
var
enableHTTPS
=
1
;
//是否启用HTTPS协议与综合安防管理平台交互,是为1,否为0
var
enableHTTPS
=
1
;
//是否启用HTTPS协议与综合安防管理平台交互,是为1,否为0
var
encryptedFields
=
'secret'
;
//加密字段,默认加密领域为secret
var
encryptedFields
=
'secret'
;
//加密字段,默认加密领域为secret
var
showToolbar
=
1
;
//是否显示工具栏,0-不显示,非0-显示
var
showToolbar
=
1
;
//是否显示工具栏,0-不显示,非0-显示
...
@@ -294,7 +296,7 @@ oWebControl.JS_RepairPartWindow(0, 0, 1001, 600); // 多1个像素点防止
...
@@ -294,7 +296,7 @@ oWebControl.JS_RepairPartWindow(0, 0, 1001, 600); // 多1个像素点防止
// wndId:wndId //可指定播放窗口
// wndId:wndId //可指定播放窗口
// })
// })
// })
// })
oWebControl
.
JS_Resize
(
900
,
6
00
);
// 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
oWebControl
.
JS_Resize
(
1500
,
7
00
);
// 初始化后resize一次,规避firefox下首次显示窗口后插件窗口未与DIV窗口重合问题
});
});
});
});
}
}
...
@@ -311,7 +313,7 @@ oWebControl.JS_RepairPartWindow(0, 0, 1001, 600); // 多1个像素点防止
...
@@ -311,7 +313,7 @@ oWebControl.JS_RepairPartWindow(0, 0, 1001, 600); // 多1个像素点防止
cbIntegrationCallBack
:
function
(
msg
)
{
console
.
log
(
msg
)
}
cbIntegrationCallBack
:
function
(
msg
)
{
console
.
log
(
msg
)
}
});
});
oWebControl
.
JS_CreateWnd
(
"playWnd"
,
900
,
6
00
).
then
(
function
()
{
//JS_CreateWnd创建视频播放窗口,宽高可设定
oWebControl
.
JS_CreateWnd
(
"playWnd"
,
900
,
7
00
).
then
(
function
()
{
//JS_CreateWnd创建视频播放窗口,宽高可设定
init
(
oWebControl
);
// 创建播放实例成功后初始化
init
(
oWebControl
);
// 创建播放实例成功后初始化
});
});
},
function
()
{
// 启动插件服务失败
},
function
()
{
// 启动插件服务失败
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment