Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
fanxing_new
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 655061ba
authored
Jul 02, 2020
by
潘建波
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
🐛
ocx提示下载
1 parent
48105429
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
7 deletions
dist.zip
src/views/public/videoPlay.vue
dist.zip
View file @
655061b
No preview for this file type
src/views/public/videoPlay.vue
View file @
655061b
...
...
@@ -27,13 +27,19 @@ export default {
methods
:
{
videoPlay
:
function
()
{
this
.
urlFlag
=
false
;
console
.
log
(
this
.
playurl
)
console
.
log
(
this
.
playurl
)
;
if
(
!
this
.
playurl
.
sip_serv_ip
)
{
let
url
=
this
.
playurl
.
rtsp_url
;
try
{
let
isLoadingOcx
=
typeof
document
.
getElementById
(
"VionVideo"
).
GetVersion
()
===
"string"
?
true
:
false
;
let
isLoadingOcx
=
typeof
document
.
getElementById
(
"VionVideo"
).
GetVersion
()
===
"string"
?
true
:
false
;
if
(
isLoadingOcx
)
{
let
ocxPlayRes
=
document
.
getElementById
(
"VionVideo"
).
StartPlay
(
url
,
0
);
let
ocxPlayRes
=
document
.
getElementById
(
"VionVideo"
)
.
StartPlay
(
url
,
0
);
console
.
log
(
"视频流:"
,
url
);
if
(
ocxPlayRes
!=
0
)
{
alert
(
"播放失败!"
);
...
...
@@ -96,7 +102,7 @@ export default {
this
.
$message
.
error
(
"视频控件加载失败请用IE10及以上版本打开!"
);
}
},
checkIE
()
{
checkIE
version
()
{
var
agent
=
navigator
.
userAgent
.
toLowerCase
();
if
(
/
(
msie
\s
|trident.*rv:
)([\w
.
]
+
)
/
.
test
(
agent
)
&&
...
...
@@ -104,11 +110,25 @@ export default {
)
{
this
.
$message
.
error
(
"IE 版本过低请升级到IE10级以上版本!"
);
}
},
/**IE
* 检查浏览器
*/
checkIE
()
{
var
userAgent
=
navigator
.
userAgent
;
//取得浏览器的userAgent字符串
var
isIE
=
userAgent
.
indexOf
(
"compatible"
)
>
-
1
&&
userAgent
.
indexOf
(
"MSIE"
)
>
-
1
;
//判断是否IE<11浏览器
var
isEdge
=
userAgent
.
indexOf
(
"Edge"
)
>
-
1
&&
!
isIE
;
//判断是否IE的Edge浏览器
var
isIE11
=
userAgent
.
indexOf
(
"Trident"
)
>
-
1
&&
userAgent
.
indexOf
(
"rv:11.0"
)
>
-
1
;
if
(
isIE
||
isEdge
||
isIE11
)
{
return
true
;
}
else
{
return
false
;
}
}
},
created
()
{
// this.checkIE();
},
created
()
{},
computed
:
{
...
mapState
([
"ocxstate"
])
},
...
...
@@ -127,6 +147,17 @@ export default {
}
}
},
mounted
()
{
if
(
this
.
checkIE
())
{
let
isLoadingOcx
=
typeof
document
.
getElementById
(
"VionVideo"
).
GetVersion
()
===
"string"
?
true
:
false
;
if
(
!
isLoadingOcx
)
{
this
.
installOcxInfo
();
}
}
},
beforeDestroy
:
function
()
{
// if (this.videoplayer.techName_ == "Flash" && this.videoplayer.pause) {
// this.videoplayer.pause();
...
...
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