Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
broadcast_cloud
/
web-live
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
2
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
38f35110
authored
May 20, 2021
by
MichaelJier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature
1. 横屏直播支持vr
parent
e4c309d6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
8 deletions
+19
-8
components/modules/cameraBox/index.vue
+1
-0
components/modules/menuBox/menuClass/playLists/index.vue
+1
-0
components/modules/playerBox/index.vue
+16
-8
components/modules/playerBox/more.vue
+1
-0
No files found.
components/modules/cameraBox/index.vue
View file @
38f35110
...
@@ -56,6 +56,7 @@ export default {
...
@@ -56,6 +56,7 @@ export default {
const
info
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
playerInfo
));
const
info
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
playerInfo
));
info
.
playUrl
=
url
;
info
.
playUrl
=
url
;
info
.
cameraId
=
id
;
info
.
cameraId
=
id
;
info
.
isVr
=
false
;
this
.
set_playerInfo
(
info
);
this
.
set_playerInfo
(
info
);
}
}
}
}
...
...
components/modules/menuBox/menuClass/playLists/index.vue
View file @
38f35110
...
@@ -67,6 +67,7 @@ export default {
...
@@ -67,6 +67,7 @@ export default {
const
info
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
playerInfo
));
const
info
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
playerInfo
));
info
.
playUrl
=
url
;
info
.
playUrl
=
url
;
info
.
cameraId
=
''
;
info
.
cameraId
=
''
;
info
.
isVr
=
false
;
this
.
set_playerInfo
(
info
);
this
.
set_playerInfo
(
info
);
},
},
_toggle
()
{
_toggle
()
{
...
...
components/modules/playerBox/index.vue
View file @
38f35110
...
@@ -131,7 +131,10 @@ export default {
...
@@ -131,7 +131,10 @@ export default {
this
.
watermark
();
this
.
watermark
();
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
{
playUrl
}
=
this
.
playerUrl
const
{
playUrl
}
=
this
.
playerUrl
this
.
_mpsPlayerInit
(
this
.
channelInfo
.
isVr
,
playUrl
);
this
.
_mpsPlayerInit
({
isVr
:
this
.
channelInfo
.
isVr
,
url
:
playUrl
});
});
});
},
},
methods
:
{
methods
:
{
...
@@ -154,13 +157,13 @@ export default {
...
@@ -154,13 +157,13 @@ export default {
watermark
(
`id:
${
this
.
userInfo
.
id
}
`
);
watermark
(
`id:
${
this
.
userInfo
.
id
}
`
);
}
}
},
},
_mpsPlayerInit
(
isVr
,
url
)
{
_mpsPlayerInit
(
{
isVr
,
url
,
force
}
)
{
const
self
=
this
;
const
self
=
this
;
const
changeControlShow
=
(
flag
)
=>
{
const
changeControlShow
=
(
flag
)
=>
{
// flag ? this.$Bus.$emit('ws-stop') : this.$Bus.$emit('ws-start')
// flag ? this.$Bus.$emit('ws-stop') : this.$Bus.$emit('ws-start')
this
.
controlShow
=
flag
this
.
controlShow
=
flag
}
}
if
(
this
.
mpsPlayerObj
)
{
if
(
this
.
mpsPlayerObj
&&
!
force
)
{
return
false
;
return
false
;
}
}
const
playerOpts
=
{
const
playerOpts
=
{
...
@@ -190,7 +193,9 @@ export default {
...
@@ -190,7 +193,9 @@ export default {
},
},
...
this
.
mpsOptions
,
...
this
.
mpsOptions
,
onReady
()
{
onReady
()
{
self
.
_resetConfig
();
if
(
url
===
self
.
playerUrl
.
playUrl
)
{
self
.
_resetConfig
();
}
// setTimeout(() => {
// setTimeout(() => {
self
.
mpsPlayerObj
.
addPlayerCallback
(
'Play.Stop'
,
function
(
fn
)
{
self
.
mpsPlayerObj
.
addPlayerCallback
(
'Play.Stop'
,
function
(
fn
)
{
fn
({
type
:
3
});
fn
({
type
:
3
});
...
@@ -217,7 +222,7 @@ export default {
...
@@ -217,7 +222,7 @@ export default {
playUrl
:
playUrl
,
playUrl
:
playUrl
,
saveUrl
:
saveUrl
,
saveUrl
:
saveUrl
,
cameraId
:
''
,
cameraId
:
''
,
isVr
:
this
.
channelInfo
.
isVr
isVr
:
!!
this
.
channelInfo
.
isVr
});
});
},
},
_reviseProtocol
(
url
)
{
_reviseProtocol
(
url
)
{
...
@@ -249,9 +254,13 @@ export default {
...
@@ -249,9 +254,13 @@ export default {
obj
=
this
.
_reviseProtocol
(
this
.
playerInfo
.
playUrl
);
obj
=
this
.
_reviseProtocol
(
this
.
playerInfo
.
playUrl
);
}
}
if
(
this
.
mpsPlayerObj
)
{
if
(
this
.
mpsPlayerObj
)
{
if
(
nowIsVr
!=
oldIsVr
)
{
if
(
nowIsVr
!=
oldIsVr
&&
(
nowIsVr
!==
undefined
&&
oldIsVr
!==
undefined
)
)
{
console
.
log
(
nowIsVr
,
oldIsVr
,
'change player'
)
console
.
log
(
nowIsVr
,
oldIsVr
,
'change player'
)
this
.
_mpsPlayerInit
(
nowIsVr
,
this
.
playerInfo
.
playUrl
)
this
.
_mpsPlayerInit
({
isVr
:
nowIsVr
,
url
:
this
.
playerInfo
.
playUrl
,
force
:
true
})
}
else
{
}
else
{
console
.
log
(
nowIsVr
,
oldIsVr
,
'no change player'
)
console
.
log
(
nowIsVr
,
oldIsVr
,
'no change player'
)
if
(
this
.
onePlayer
&&
this
.
mpsPlayerObj
.
changePlayer
)
{
if
(
this
.
onePlayer
&&
this
.
mpsPlayerObj
.
changePlayer
)
{
...
@@ -272,7 +281,6 @@ export default {
...
@@ -272,7 +281,6 @@ export default {
watch
:
{
watch
:
{
playerInfo
:
{
playerInfo
:
{
handler
(
newVal
,
oldVal
)
{
handler
(
newVal
,
oldVal
)
{
console
.
log
(
newVal
,
oldVal
)
this
.
_changePlayer
(
newVal
.
isVr
,
oldVal
.
isVr
);
this
.
_changePlayer
(
newVal
.
isVr
,
oldVal
.
isVr
);
},
},
deep
:
true
deep
:
true
...
...
components/modules/playerBox/more.vue
View file @
38f35110
...
@@ -45,6 +45,7 @@ export default {
...
@@ -45,6 +45,7 @@ export default {
const
info
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
playerInfo
));
const
info
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
playerInfo
));
info
.
playUrl
=
info
.
saveUrl
;
info
.
playUrl
=
info
.
saveUrl
;
info
.
cameraId
=
''
;
info
.
cameraId
=
''
;
info
.
isVr
=
false
;
this
.
set_playerInfo
(
info
);
this
.
set_playerInfo
(
info
);
},
},
_setBarrage
()
{
_setBarrage
()
{
...
...
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