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 d3a46a9d
authored
Sep 22, 2023
by
李乾广
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改bug
1 parent
b7e1d463
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
29 deletions
h5/src/router/index.js
h5/src/views/extension/index.vue
h5/src/views/pc/pcdemo.vue
h5/src/router/index.js
View file @
d3a46a9
...
...
@@ -35,8 +35,8 @@ const routes = [
component
:
()
=>
import
(
'../views/player/vionPlayerDemo.vue'
)
},
{
path
:
'/
j
player-extension'
,
name
:
'
j
playerExtension'
,
path
:
'/
vion
player-extension'
,
name
:
'
vion
playerExtension'
,
component
:
()
=>
import
(
'../views/extension/index.vue'
)
},
/* {
...
...
@@ -45,13 +45,13 @@ const routes = [
component: () => import('../views/ElTableDemo.vue')
}, */
{
path
:
'/
j
player-web'
,
name
:
'
j
playerWeb'
,
path
:
'/
vion
player-web'
,
name
:
'
vion
playerWeb'
,
component
:
()
=>
import
(
'../views/pc/index.vue'
)
},
{
path
:
'/
j
player-web-demo'
,
name
:
'
j
playerWebDemo'
,
path
:
'/
vion
player-web-demo'
,
name
:
'
vion
playerWebDemo'
,
component
:
()
=>
import
(
'../views/pc/pcdemo.vue'
)
}
]
...
...
h5/src/views/extension/index.vue
View file @
d3a46a9
...
...
@@ -59,7 +59,7 @@ export default {
}
},
created
()
{
this
.
init
();
//
this.init();
},
methods
:
{
// 时间线改变
...
...
@@ -98,18 +98,16 @@ export default {
}
},
init
()
{
// 通过URL获取相关参数
const
urlParamsMap
=
getUrlParams
(
window
.
location
.
hash
);
console
.
log
(
'urlParamsMap'
,
urlParamsMap
);
Object
.
keys
(
this
.
params
).
forEach
(
key
=>
{
if
(
urlParamsMap
[
key
])
{
this
.
params
[
key
]
=
urlParamsMap
[
key
];
}
});
if
(
!
this
.
params
.
gateUnid
)
{
console
.
error
(
'传递URL参数有误,请确认 address 和 channelId 是否正确。'
);
}
playWebVideo
(
obj
)
{
// // 通过URL获取相关参数
// const urlParamsMap = getUrlParams(window.location.hash);
// console.log('urlParamsMap', urlParamsMap);
// Object.keys(this.params).forEach(key => {
// if (urlParamsMap[key]) {
// this.params[key] = urlParamsMap[key];
// }
// });
this
.
params
=
obj
this
.
getVideoAddress
()
},
// 获取视频播放地址
...
...
h5/src/views/pc/pcdemo.vue
View file @
d3a46a9
...
...
@@ -2,20 +2,17 @@
<div>
<!-- 添加视频测试 -->
<div>
<el-button
type=
"primary"
@
click=
"addPlayer(
{gateUnid: '85de13a8-5775-11ee-94ed-00163e143ecd'})">河南分公司--办公室--办公室监控
</el-button>
<el-button
type=
"primary"
@
click=
"addPlayer(
{gateUnid: '85de1326-5775-11ee-94ed-00163e143ecd',watermarkText:'Demo Store'})">Demo Store--客流相机-入口1
</el-button>
<el-button
type=
"primary"
@
click=
"addPlayer(
{gateUnid: '7c55b448-5857-11ee-8777-00163e143ecd'})">办公室
</el-button>
</div>
<indexPlayer
ref=
"iframe"
></indexPlayer>
<!--
<iframe
id=
"iframe"
name=
"iframe"
ref=
"iframe"
style=
"width: 100vw;height:calc(100vh - 60px);"
src=
"/nvsdemo/#/jplayer-web"
frameborder=
"0"
></iframe>
-->
<!--
<iframe
id=
"iframe"
name=
"iframe"
ref=
"iframe"
style=
"width: 100vw;height:calc(100vh - 60px);"
src=
"http://192.168.1.67:9091/#/vion-player-demo"
frameborder=
"0"
></iframe>
-->
<iframe
id=
"iframe"
name=
"iframe"
ref=
"iframe"
style=
"width: 100vw;height:calc(100vh - 60px);"
src=
"/#/vionplayer-web"
frameborder=
"0"
></iframe>
</div>
</
template
>
<
script
>
import
indexPlayer
from
'./index.vue'
;
//
import indexPlayer from './index.vue';
export
default
{
name
:
'jplayerWebDemo'
,
components
:
{
indexPlayer
,
//
indexPlayer,
},
data
()
{
return
{
...
...
@@ -30,15 +27,15 @@ export default {
height
:
''
,
// 设置组件高度
isShowJT
:
false
,
// 是否显示截图按钮,默认为false
isShowSplit
:
true
,
// 是否支持四分屏,默认为true
hideControls
:
fals
e
,
// 是否显示视频操作区,默认为false
hideControls
:
tru
e
,
// 是否显示视频操作区,默认为false
showPtz
:
true
,
// 是否显示视频操作区中的云台控制,默认为true
})
},
methods
:
{
addPlayer
(
obj
)
{
//
window.parent.document.getElementById('iframe').contentWindow.playWebVideo(obj)
window
.
parent
.
document
.
getElementById
(
'iframe'
).
contentWindow
.
playWebVideo
(
obj
)
this
.
$refs
.
iframe
.
playWebVideo
(
obj
)
//
this.$refs.iframe.playWebVideo(obj)
},
},
}
...
...
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