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
7835d5af
Commit
7835d5af
authored
May 24, 2023
by
程恺文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
6d05797f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
25 deletions
+31
-25
dmeo1.tsx
packages/base-components/VmsVideo/src/demos/dmeo1.tsx
+6
-1
index.jsx
packages/base-components/VmsVideo/src/index.jsx
+25
-24
No files found.
packages/base-components/VmsVideo/src/demos/dmeo1.tsx
View file @
7835d5af
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 634665781 634665781@qq.com
* @Author: 634665781 634665781@qq.com
* @Date: 2023-04-11 13:40:18
* @Date: 2023-04-11 13:40:18
* @LastEditors: 634665781 634665781@qq.com
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-05-2
2 10:06:05
* @LastEditTime: 2023-05-2
4 16:51:22
* @FilePath: \wisdom-components\packages\base-components\TestVideo\src\demos\dmeo1.tsx
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -86,6 +86,11 @@ const Demo1 = (props) => {
...
@@ -86,6 +86,11 @@ const Demo1 = (props) => {
// ******
// ******
// 其他事件需查看在线文档
// 其他事件需查看在线文档
// ******
// ******
return
()
=>
{
console
.
log
(
'销毁。。。。。。。。。。。。。。。。。。。。。。。。。'
);
stopVideo
()
}
},
[]);
},
[]);
const
stopVideo
=
()
=>
{
const
stopVideo
=
()
=>
{
...
...
packages/base-components/VmsVideo/src/index.jsx
View file @
7835d5af
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 634665781 634665781@qq.com
* @Author: 634665781 634665781@qq.com
* @Date: 2023-04-11 13:40:18
* @Date: 2023-04-11 13:40:18
* @LastEditors: 634665781 634665781@qq.com
* @LastEditors: 634665781 634665781@qq.com
* @LastEditTime: 2023-05-2
3 14:54:42
* @LastEditTime: 2023-05-2
4 16:34:00
* @FilePath: \wisdom-components\packages\base-components\VmsVideo\src\index.jsx
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
*/
...
@@ -101,42 +101,43 @@ const Video = (props, ref) => {
...
@@ -101,42 +101,43 @@ const Video = (props, ref) => {
// 通过事件对象获取浏览器窗口的高度
// 通过事件对象获取浏览器窗口的高度
setWidth
(
refs
.
current
.
offsetWidth
);
setWidth
(
refs
.
current
.
offsetWidth
);
setHeight
(
refs
.
current
.
offsetHeight
);
setHeight
(
refs
.
current
.
offsetHeight
);
// PlayersA?.stop?.()
// PlayersA?.stop?.()
console
.
log
(
PlayersA
,
'视频对象
'
);
console
.
log
(
PlayersA
,
'视频对象11111111111111111111111111111111111111111111111
'
);
PlayersA
.
stop
()
PlayersA
.
stop
();
getToken
()
getToken
();
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
VideoInfo
.
protocol
!=
'萤石EZOPEN'
)
{
useImperativeHandle
(
ref
,
()
=>
{
// changeVal 就是暴露给父组件的方法, newVal是父组件传递的参数
return
_video
.
current
.
jessibuca
;
// _video&& _video.current&&_video.current.jessibuca
});
}
else
{
getToken
();
}
// 页面刚加载完成后获取浏览器窗口的大小
// 页面刚加载完成后获取浏览器窗口的大小
setWidth
(
refs
.
current
.
offsetWidth
);
setWidth
(
refs
.
current
.
offsetWidth
);
setHeight
(
refs
.
current
.
offsetHeight
);
setHeight
(
refs
.
current
.
offsetHeight
);
// 页面变化时获取浏览器窗口的大小
// 页面变化时获取浏览器窗口的大小
window
.
addEventListener
(
'resize'
,
resizeUpdate
);
window
.
addEventListener
(
'resize'
,
resizeUpdate
);
return
()
=>
{
return
()
=>
{
// 组件销毁时移除监听事件
// 组件销毁时移除监听事件
window
.
removeEventListener
(
'resize'
,
resizeUpdate
);
window
.
removeEventListener
(
'resize'
,
resizeUpdate
);
}
};
},
[])
},
[]);
if
(
VideoInfo
.
protocol
!=
'萤石EZOPEN'
)
{
useImperativeHandle
(
ref
,
()
=>
{
// changeVal 就是暴露给父组件的方法, newVal是父组件传递的参数
return
_video
.
current
.
jessibuca
;
// _video&& _video.current&&_video.current.jessibuca
});
}
else
{
getToken
();
}
const
CommonPath
=
const
CommonPath
=
(
VideoInfo
.
gateway
||
window
?.
globalConfig
?.
hasGateWay
)
?
'PandaCore/GateWay/Video/'
:
''
;
// 配置了gateway或者pc端web配置中有gateway
VideoInfo
.
gateway
||
window
?.
globalConfig
?.
hasGateWay
?
'PandaCore/GateWay/Video/'
:
''
;
// 配置了gateway或者pc端web配置中有gateway
VideoInfo
.
url
=
VideoInfo
.
useFullUrl
VideoInfo
.
url
=
VideoInfo
.
useFullUrl
?
VideoInfo
.
fullUrl
?
VideoInfo
.
fullUrl
:
(
VideoInfo
.
pandavmsHost
||
(
'ws://'
+
location
.
host
+
'/'
)
)
+
:
(
VideoInfo
.
pandavmsHost
||
'ws://'
+
location
.
host
+
'/'
)
+
(
CommonPath
)
+
CommonPath
+
'jessica/'
+
'jessica/'
+
VideoInfo
.
id
;
VideoInfo
.
id
;
...
...
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