Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
digital-construction
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
张牧越
digital-construction
Commits
c0a5d278
Commit
c0a5d278
authored
Jun 12, 2023
by
张牧越
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
styleFix
parent
45f6f343
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
44 deletions
+11
-44
Index.vue
src/components/supervisory/Index.vue
+11
-44
No files found.
src/components/supervisory/Index.vue
View file @
c0a5d278
...
@@ -105,47 +105,8 @@ export default {
...
@@ -105,47 +105,8 @@ export default {
getVideoTreeData
().
then
((
res
)
=>
{
getVideoTreeData
().
then
((
res
)
=>
{
this
.
treeData
=
this
.
handleData
(
res
.
data
);
this
.
treeData
=
this
.
handleData
(
res
.
data
);
this
.
videoURLArray
=
this
.
treeData
.
map
((
item
)
=>
{
return
item
.
children
.
map
((
items
)
=>
{
return
items
.
id
;
});
})
.
flat
();
if
(
this
.
videoURLArray
.
length
>
9
)
{
this
.
videoURLArray
=
this
.
videoURLArray
.
slice
(
0
,
9
);
}
this
.
videoURLArray
.
map
((
id
,
index
)
=>
{
this
.
cameraList
.
push
({
player
:
undefined
,
id
:
id
,
});
getVideoLiveAddressUrl
(
id
).
then
((
res
)
=>
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
myVideoDiv
=
document
.
getElementById
(
this
.
viewAll
();
`video-container-
${
index
+
1
}
`
);
myVideoDiv
.
innerHTML
=
`<video
id="singleVideo
${
index
+
1
}
"
autoplay="autoplay"
class="video-js vjs-default-skin"
></video>`
;
const
singlePlayer
=
videojs
(
`singleVideo
${
index
+
1
}
`
,
{
autoplay
:
true
,
// 自动播放
controls
:
true
,
// 控件显示
preload
:
"auto"
,
//定义视频加载模式
loop
:
true
,
//是否循环播放
});
singlePlayer
.
src
({
src
:
res
.
data
.
live_address_url
,
type
:
"application/x-mpegURL"
,
});
singlePlayer
.
play
();
this
.
cameraList
[
index
].
player
=
singlePlayer
;
});
});
});
});
});
});
},
},
...
@@ -300,21 +261,21 @@ export default {
...
@@ -300,21 +261,21 @@ export default {
},
},
viewAll
()
{
viewAll
()
{
this
.
cameraList
.
map
((
item
)
=>
{
this
.
cameraList
.
map
((
item
)
=>
{
item
.
player
.
dispose
();
item
.
player
&&
item
.
player
.
dispose
();
item
.
player
=
null
;
item
.
player
=
null
;
item
.
id
=
""
;
item
.
id
=
""
;
item
.
live_address_url
=
""
;
item
.
live_address_url
=
""
;
});
});
this
.
cameraList
=
[];
this
.
cameraList
=
[];
cons
t
allVideoIdArray
=
this
.
treeData
le
t
allVideoIdArray
=
this
.
treeData
.
map
((
item
)
=>
{
.
map
((
item
)
=>
{
return
item
.
children
.
map
((
child
)
=>
{
return
item
.
children
.
map
((
child
)
=>
{
return
child
.
id
;
return
child
.
id
;
});
});
})
})
.
flat
();
.
flat
();
allVideoIdArray
=
allVideoIdArray
.
slice
(
0
,
this
.
activeSplice
);
allVideoIdArray
.
map
((
id
,
index
)
=>
{
allVideoIdArray
.
map
((
id
,
index
)
=>
{
this
.
cameraList
.
push
({
this
.
cameraList
.
push
({
player
:
undefined
,
player
:
undefined
,
...
@@ -523,4 +484,10 @@ export default {
...
@@ -523,4 +484,10 @@ export default {
.tree-shadow-container {
.tree-shadow-container {
height: calc(97% - 52px);
height: calc(97% - 52px);
}
}
::v-deep .vjs-big-play-button {
left: 50% !important;
top: 50% !important;
transform: translateX(-50%) translateY(-50%) !important;
}
</
style
>
</
style
>
\ No newline at end of file
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