Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wisdom-components
Project
Project
Details
Activity
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
ReactWeb5
wisdom-components
Commits
fa130622
Commit
fa130622
authored
May 31, 2024
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 视频vms增加自定义参数
parent
ca0d1964
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
App.jsx
packages/base-components/VmsVideo/src/App.jsx
+16
-4
dmeo1.tsx
packages/base-components/VmsVideo/src/demos/dmeo1.tsx
+4
-0
No files found.
packages/base-components/VmsVideo/src/App.jsx
View file @
fa130622
...
...
@@ -23,12 +23,14 @@ class App extends React.Component {
}
createAll
()
{
let
{
VideoInfo
,
JessibucaObj
}
=
this
.
props
;
const
{
params
=
{}
}
=
VideoInfo
;
const
queryStr
=
this
.
toQueryString
(
params
);
this
.
destroy
();
if
(
VideoInfo
.
url
)
{
this
.
create
(
this
.
refs
[
`myVideo`
+
VideoInfo
.
id
],
`key`
,
JessibucaObj
);
setTimeout
(()
=>
{
let
code
=
window
.
independence
?
window
.
siteCode
:
window
.
globalConfig
?.
userInfo
?.
site
;
let
siteInfo
=
!
code
?
''
:
`?_site=
${
code
}
`
;
let
code
=
window
.
independence
?
window
.
siteCode
||
''
:
window
.
globalConfig
?.
userInfo
?.
site
||
''
;
let
siteInfo
=
!
code
?
`?
${
queryStr
}
`
:
`?_site=
${
code
}
&
${
queryStr
}
`
;
this
.
play
(
VideoInfo
.
url
+
`/
${
VideoInfo
.
dataRate
==
'Sub'
?
2
:
1
}${
siteInfo
}
`
,
`key`
);
},
10
);
}
...
...
@@ -189,9 +191,11 @@ class App extends React.Component {
changeRate
(
text
)
{
const
{
VideoInfo
}
=
this
.
props
;
const
{
params
=
{}
}
=
VideoInfo
;
const
queryStr
=
this
.
toQueryString
(
params
);
if
(
VideoInfo
.
url
&&
this
.
jessibuca
)
{
let
code
=
window
.
independence
?
window
.
siteCode
:
window
.
globalConfig
?.
userInfo
?.
site
;
let
siteInfo
=
!
code
?
''
:
`?_site=
${
code
}
`
;
let
code
=
window
.
independence
?
window
.
siteCode
||
''
:
window
.
globalConfig
?.
userInfo
?.
site
||
''
;
let
siteInfo
=
!
code
?
`?
${
queryStr
}
`
:
`?_site=
${
code
}
&
${
queryStr
}
`
;
this
.
jessibuca
.
play
(
VideoInfo
.
url
+
`/
${
text
==
'标清'
?
2
:
1
}${
siteInfo
}
`
);
this
.
setState
({
isPlaying
:
true
,
...
...
@@ -217,6 +221,14 @@ class App extends React.Component {
</
div
>
);
}
toQueryString
(
obj
)
{
return
Object
.
keys
(
obj
)
.
map
(
key
=>
encodeURIComponent
(
key
)
+
'='
+
encodeURIComponent
(
obj
[
key
]))
.
join
(
'&'
);
}
render
()
{
return
<
div
className=
{
style
.
root
}
ref=
{
this
.
domRef
}
>
{
this
.
renderCheckedArr
()
}
</
div
>;
}
...
...
packages/base-components/VmsVideo/src/demos/dmeo1.tsx
View file @
fa130622
...
...
@@ -45,6 +45,10 @@ const Demo1 = (props) => {
password
:
'78b7dc88f9f4bf19c2b1aabfdd995244'
,
pandavmsHost
:
'ws://192.168.8.30:7000/'
,
address
:
'C83178215'
,
params
:
{
name
:
1
,
title
:
2
,
}
};
let
VideoParam1
=
{
id
:
'38FB4BA7-C61F-466C-9B57-5B401441DABC'
,
...
...
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