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
03fb7c97
Commit
03fb7c97
authored
May 30, 2023
by
程恺文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
eb37a7f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
12 deletions
+28
-12
App.jsx
packages/base-components/VmsVideo/src/App.jsx
+5
-4
dmeo1.tsx
packages/base-components/VmsVideo/src/demos/dmeo1.tsx
+14
-3
index.jsx
packages/base-components/VmsVideo/src/index.jsx
+9
-5
No files found.
packages/base-components/VmsVideo/src/App.jsx
View file @
03fb7c97
...
...
@@ -22,7 +22,8 @@ class App extends React.Component {
if
(
VideoInfo
.
url
)
{
this
.
create
(
this
.
refs
[
`myVideo`
+
VideoInfo
.
id
],
`key`
,
JessibucaObj
);
setTimeout
(()
=>
{
this
.
play
(
VideoInfo
.
url
+
`/
${
VideoInfo
.
dataRate
==
'Sub'
?
2
:
1
}
`
,
`key`
);
let
code
=
window
.
independence
?
window
.
siteCode
:(
window
.
globalConfig
?.
userInfo
?.
LocalSite
||
localStorage
.
getItem
(
'token'
))
this
.
play
(
VideoInfo
.
url
+
`/
${
VideoInfo
.
dataRate
==
'Sub'
?
2
:
1
}
?Civ_Site=
${
code
}
`
,
`key`
);
},
10
);
}
}
...
...
@@ -48,12 +49,12 @@ class App extends React.Component {
loadingText
:
'加载中'
,
debug
:
false
,
recordType
:
'mp4'
,
loadingTimeout
:
6
0
,
loadingTimeout
:
1
0
,
loadingText
:
'视频加载中'
,
loadingTimeoutReplay
:
true
,
timeout
:
6
0
,
timeout
:
1
0
,
controlAutoHide
:
true
,
heartTimeout
:
6
0
,
heartTimeout
:
1
0
,
heartTimeoutReplay
:
true
,
showBandwidth
:
true
,
// 显示网速
operateBtns
:
{
...
...
packages/base-components/VmsVideo/src/demos/dmeo1.tsx
View file @
03fb7c97
...
...
@@ -2,7 +2,7 @@
* @Author: 634665781 634665781@qq.com
* @Date: 2023-04-11 13:40:18
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-05-
24 18:14:52
* @LastEditTime: 2023-05-
30 11:08:31
* @FilePath: \wisdom-components\packages\base-components\TestVideo\src\demos\dmeo1.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -37,7 +37,18 @@ const Demo1 = (props) => {
// protocol: '萤石EZOPEN',
//};
let
VideoParam
=
{
let
VideoParam
=
{
id
:
"9745259F-76B5-4ECB-BDD7-8B1B2C5C84CD"
,
name
:
"3L00AE9PAJ00034"
,
protocol
:
"乐橙云HTTP-FLV"
,
username
:
"lc0f4b952c86c34c4b"
,
password
:
"dfdcae9267bf4964ae09998e16f016"
,
pandavmsHost
:
'ws://192.168.12.154:8080/'
,
address
:
"3L00AE9PAJ00034"
}
/*{
id: '11F102BC-CE03-4E32-AE60-F297934DFE3F', // 398993BB-A795-4237-BE75-B6A7EC9D675
name: '琼海电信小区', // 设备名称
protocol:'萤石EZOPEN', // 萤石EZOPE 萤石HTTP-FLV RTSP GB28181
...
...
@@ -48,7 +59,7 @@ const Demo1 = (props) => {
address: '236644034',
// width: 952,
// height: 500,
};
};
*/
/* {
id: '398993BB-A795-4237-BE75-B6A7EC9D675', // 398993BB-A795-4237-BE75-B6A7EC9D675
...
...
packages/base-components/VmsVideo/src/index.jsx
View file @
03fb7c97
...
...
@@ -2,7 +2,7 @@
* @Author: 634665781 634665781@qq.com
* @Date: 2023-04-11 13:40:18
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-05-
24 18:15:20
* @LastEditTime: 2023-05-
30 14:38:18
* @FilePath: \wisdom-components\packages\base-components\VmsVideo\src\index.jsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -97,10 +97,15 @@ const Video = (props, ref) => {
}
catch
(
e
)
{}
});
};
const
resizeUpdate
=
(
e
)
=>
{
// 通过事件对象获取浏览器窗口的高度
setWidth
(
refs
.
current
.
offsetWidth
);
setHeight
(
refs
.
current
.
offsetHeight
);
// PlayersA?.stop?.()
console
.
log
(
PlayersA
,
'视频对象11111111111111111111111111111111111111111111111'
);
PlayersA
.
stop
();
...
...
@@ -119,8 +124,7 @@ const Video = (props, ref) => {
getToken
();
}
// 页面刚加载完成后获取浏览器窗口的大小
setWidth
(
refs
.
current
.
offsetWidth
);
setHeight
(
refs
.
current
.
offsetHeight
);
// 页面变化时获取浏览器窗口的大小
window
.
addEventListener
(
'resize'
,
resizeUpdate
);
...
...
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