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
3249c716
Commit
3249c716
authored
May 18, 2023
by
程恺文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频大小兼容
parent
1d6d692e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
dmeo1.tsx
packages/base-components/VmsVideo/src/demos/dmeo1.tsx
+3
-3
index.jsx
packages/base-components/VmsVideo/src/index.jsx
+12
-5
No files found.
packages/base-components/VmsVideo/src/demos/dmeo1.tsx
View file @
3249c716
...
...
@@ -46,8 +46,8 @@ const Demo1 = (props) => {
dataRate
:
'Sub'
,
// Main 主码流 Sub 子码流
pandavmsHost
:
`ws://192.168.8.27:9876/`
,
// pandavms后端主机地址 eg: ws://172.16.19.19:8080/
address
:
'236644034'
,
width
:
952
,
height
:
500
,
//
width: 952,
//
height: 500,
};
/* {
...
...
@@ -112,7 +112,7 @@ const Demo1 = (props) => {
<
button
onClick=
{
startVideo
}
>
开始
</
button
>
<
button
onClick=
{
testVideo
}
>
测试
</
button
>
<
button
onClick=
{
destroyVideo
}
>
销毁
</
button
>
<
div
style=
{
{
height
:
'500px'
}
}
>
<
div
style=
{
{
height
:
'700px'
}
}
>
<
Video
{
...
{
JessibucaObj
:
JessibucaObj
,
VideoInfo
:
VideoParam
}}
ref=
{
jessibuca
}
/>
</
div
>
</
div
>
...
...
packages/base-components/VmsVideo/src/index.jsx
View file @
3249c716
...
...
@@ -2,7 +2,7 @@
* @Author: 634665781 634665781@qq.com
* @Date: 2023-04-11 13:40:18
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-05-18 15:
11:54
* @LastEditTime: 2023-05-18 15:
48:59
* @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
*/
...
...
@@ -18,7 +18,14 @@
import
EZUIKit
,
{
log
}
from
'ezuikit-js'
;
import
axios
from
'axios'
;
import
React
,
{
useState
,
useRef
,
useEffect
,
useImperativeHandle
,
forwardRef
,
useLayoutEffect
}
from
'react'
;
import
React
,
{
useState
,
useRef
,
useEffect
,
useImperativeHandle
,
forwardRef
,
useLayoutEffect
,
}
from
'react'
;
import
App1
from
'./App'
;
import
style
from
'./index.less'
;
// import * as Jessibuca from './JessibucaVideo/jessibuca';
...
...
@@ -51,7 +58,7 @@ const Video = (props, ref) => {
key
:
`摄像头`
,
};
useLayoutEffect
(()
=>
{
console
.
log
(
refs
.
current
.
offsetWidth
,
refs
.
current
.
offsetHeight
,
'宽高'
);
console
.
log
(
refs
.
current
.
offsetWidth
,
refs
.
current
.
offsetHeight
,
'宽高'
);
setWidth
(
refs
.
current
.
offsetWidth
);
setHeight
(
refs
.
current
.
offsetHeight
);
},
[]);
...
...
@@ -75,8 +82,8 @@ const Video = (props, ref) => {
url
:
`ezopen://open.ys7.com/
${
VideoInfo
.
address
}
/
${
VideoInfo
.
channel
||
1
}
.hd.live`
,
templete
:
'simple'
,
footer
:
[
'talk'
,
'broadcast'
,
'hd'
,
'fullScreen'
],
width
:
VideoInfo
.
width
||
width
||
952
,
height
:
VideoInfo
.
height
||
height
||
500
,
width
:
VideoInfo
.
width
||
refs
?.
current
?.
offsetWidth
||
952
,
height
:
VideoInfo
.
height
||
refs
?.
current
?.
offsetHeight
||
500
,
});
PlayersA
.
pause
=
PlayersA
.
stop
;
...
...
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