Commit 30dd32f3 authored by 程恺文's avatar 程恺文

视频组件文档更新

parent 8630fbc8
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
'TreeCustom', 'TreeCustom',
'AlarmScrollAssembly', 'AlarmScrollAssembly',
'DataCarousel', 'DataCarousel',
'TestVideo', 'VmsVideo',
], ],
}, },
{ {
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.11.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/alarmscrollassembly@1.11.0...@wisdom-components/alarmscrollassembly@1.11.1) (2023-04-13) ## [1.11.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/alarmscrollassembly@1.11.0...@wisdom-components/alarmscrollassembly@1.11.1) (2023-04-13)
**Note:** Version bump only for package @wisdom-components/alarmscrollassembly **Note:** Version bump only for package @wisdom-components/alarmscrollassembly
# [1.11.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/alarmscrollassembly@1.10.1...@wisdom-components/alarmscrollassembly@1.11.0) (2023-04-03) # [1.11.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/alarmscrollassembly@1.10.1...@wisdom-components/alarmscrollassembly@1.11.0) (2023-04-03)
### Features ### Features
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.5.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicchart@1.5.4...@wisdom-components/basicchart@1.5.5) (2023-04-13) ## [1.5.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicchart@1.5.4...@wisdom-components/basicchart@1.5.5) (2023-04-13)
**Note:** Version bump only for package @wisdom-components/basicchart **Note:** Version bump only for package @wisdom-components/basicchart
## [1.5.4](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicchart@1.5.3...@wisdom-components/basicchart@1.5.4) (2023-03-06) ## [1.5.4](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicchart@1.5.3...@wisdom-components/basicchart@1.5.4) (2023-03-06)
### Bug Fixes ### Bug Fixes
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.10.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicreport@1.10.1...@wisdom-components/basicreport@1.10.2) (2023-04-13) ## [1.10.2](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicreport@1.10.1...@wisdom-components/basicreport@1.10.2) (2023-04-13)
**Note:** Version bump only for package @wisdom-components/basicreport **Note:** Version bump only for package @wisdom-components/basicreport
## [1.10.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicreport@1.10.0...@wisdom-components/basicreport@1.10.1) (2023-04-12) ## [1.10.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/basicreport@1.10.0...@wisdom-components/basicreport@1.10.1) (2023-04-12)
**Note:** Version bump only for package @wisdom-components/basicreport **Note:** Version bump only for package @wisdom-components/basicreport
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/dataCarousel@1.1.5...@wisdom-components/dataCarousel@1.1.6) (2023-04-13) ## [1.1.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/dataCarousel@1.1.5...@wisdom-components/dataCarousel@1.1.6) (2023-04-13)
**Note:** Version bump only for package @wisdom-components/dataCarousel **Note:** Version bump only for package @wisdom-components/dataCarousel
## [1.1.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/dataCarousel@1.1.4...@wisdom-components/dataCarousel@1.1.5) (2023-02-23) ## [1.1.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/dataCarousel@1.1.4...@wisdom-components/dataCarousel@1.1.5) (2023-02-23)
### Bug Fixes ### Bug Fixes
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.2.22](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/richtext@0.2.21...@wisdom-components/richtext@0.2.22) (2023-04-13) ## [0.2.22](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/richtext@0.2.21...@wisdom-components/richtext@0.2.22) (2023-04-13)
**Note:** Version bump only for package @wisdom-components/richtext **Note:** Version bump only for package @wisdom-components/richtext
## [0.2.21](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/richtext@0.2.20...@wisdom-components/richtext@0.2.21) (2023-01-11) ## [0.2.21](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/richtext@0.2.20...@wisdom-components/richtext@0.2.21) (2023-01-11)
### Bug Fixes ### Bug Fixes
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.5.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/timerangepicker@1.5.0...@wisdom-components/timerangepicker@1.5.1) (2023-04-13) ## [1.5.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/timerangepicker@1.5.0...@wisdom-components/timerangepicker@1.5.1) (2023-04-13)
**Note:** Version bump only for package @wisdom-components/timerangepicker **Note:** Version bump only for package @wisdom-components/timerangepicker
# [1.5.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/timerangepicker@1.4.8...@wisdom-components/timerangepicker@1.5.0) (2023-01-12) # [1.5.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/timerangepicker@1.4.8...@wisdom-components/timerangepicker@1.5.0) (2023-01-12)
### Features ### Features
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/testvideo@1.1.5...@wisdom-components/testvideo@1.1.6) (2023-04-13) ## [1.1.6](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/testvideo@1.1.5...@wisdom-components/testvideo@1.1.6) (2023-04-13)
**Note:** Version bump only for package @wisdom-components/testvideo **Note:** Version bump only for package @wisdom-components/testvideo
## [1.1.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/testvideo@1.1.4...@wisdom-components/testvideo@1.1.5) (2023-04-12) ## [1.1.5](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/testvideo@1.1.4...@wisdom-components/testvideo@1.1.5) (2023-04-12)
**Note:** Version bump only for package @wisdom-components/testvideo **Note:** Version bump only for package @wisdom-components/testvideo
......
# `@wisdom-components/TestVideo` # `@wisdom-components/VmsVideo`
> TODO: description > TODO: description
## Usage ## Usage
``` ```
const testvideo = require('@wisdom-components/testvideo'); const Vmsvideo = require('@wisdom-components/Vmsvideo');
# TestVideo 视频组件 # VmsVideo 视频组件
## 视频组件 - 基本 ## 视频组件 - 基本
......
{ {
"name": "@wisdom-components/testvideo", "name": "@wisdom-components/Vmsvideo",
"version": "1.1.6", "version": "1.1.6",
"description": "> TODO: description", "description": "> TODO: description",
"author": "yutian <249303761@qq.com>", "author": "yutian <249303761@qq.com>",
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
"url": "https://g.civnet.cn:8443/ReactWeb5/wisdom-components.git" "url": "https://g.civnet.cn:8443/ReactWeb5/wisdom-components.git"
}, },
"scripts": { "scripts": {
"test": "node ./__tests__/@wisdom-components/TestVideo.test.js" "test": "node ./__tests__/@wisdom-components/VmsVideo.test.js"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.17.9" "@babel/runtime": "^7.17.9"
......
...@@ -22,7 +22,7 @@ class App extends React.Component { ...@@ -22,7 +22,7 @@ class App extends React.Component {
if (VideoInfo.url) { if (VideoInfo.url) {
this.create(this.refs[`myVideo` + VideoInfo.id], `key`, JessibucaObj); this.create(this.refs[`myVideo` + VideoInfo.id], `key`, JessibucaObj);
setTimeout(() => { setTimeout(() => {
this.play(VideoInfo.url + `${VideoInfo.dataRate=='Sub'?2:1}`, `key`); this.play(VideoInfo.url + `${VideoInfo.dataRate == 'Sub' ? 2 : 1}`, `key`);
}, 10); }, 10);
} }
} }
...@@ -108,13 +108,7 @@ class App extends React.Component { ...@@ -108,13 +108,7 @@ class App extends React.Component {
let { VideoInfo } = this.props; let { VideoInfo } = this.props;
return ( return (
<div className={style.containerOut}> <div className={style.containerOut}>
{ {<div className={style.container} key={VideoInfo.id} ref={`myVideo` + VideoInfo.id}></div>}
<div
className={style.container}
key={VideoInfo.id}
ref={`myVideo` + VideoInfo.id}
></div>
}
</div> </div>
); );
} }
......
...@@ -19,7 +19,7 @@ group: ...@@ -19,7 +19,7 @@ group:
## 参数说明 ## 参数说明
| JessibucaObj 常用参数(对萤石EZOPEN协议不生效) | 说明 | 类型 | 默认值 | | JessibucaObj 常用参数(对萤石 EZOPEN 协议不生效) | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| **decoder** | 是文件"/JessibucaVideo/decoder.js"的路径 | string | --- | | **decoder** | 是文件"/JessibucaVideo/decoder.js"的路径 | string | --- |
| hiddenAutoPause | 是否开启当页面的'visibilityState'变为'hidden'的时候,自动暂停播放。 | boolean | false | | hiddenAutoPause | 是否开启当页面的'visibilityState'变为'hidden'的时候,自动暂停播放。 | boolean | false |
......
...@@ -37,33 +37,35 @@ const Demo1 = (props) => { ...@@ -37,33 +37,35 @@ const Demo1 = (props) => {
// protocol: '萤石EZOPEN', // protocol: '萤石EZOPEN',
//}; //};
let VideoParam = {
let VideoParam={ id: '398993BB-A795-4237-BE75-B6A7EC9D675', // 398993BB-A795-4237-BE75-B6A7EC9D675
id :'398993BB-A795-4237-BE75-B6A7EC9D675' , // 398993BB-A795-4237-BE75-B6A7EC9D675 name: '设备1', // 设备名称
name: "设备1", // 设备名称
protocol: '萤石EZOPEN', // 萤石EZOPE 萤石HTTP-FLV RTSP GB28181 protocol: '萤石EZOPEN', // 萤石EZOPE 萤石HTTP-FLV RTSP GB28181
username: "6c44c8e92d1c4d75a9818756025df550", username: '6c44c8e92d1c4d75a9818756025df550',
password: "78b7dc88f9f4bf19c2b1aabfdd995244", password: '78b7dc88f9f4bf19c2b1aabfdd995244',
dataRate: "Sub", // Main 主码流 Sub 子码流 dataRate: 'Sub', // Main 主码流 Sub 子码流
pandavmsHost: "ws://172.16.19.19:8080/", // pandavms后端主机地址 eg: ws://172.16.19.19:8080/ pandavmsHost: 'ws://172.16.19.19:8080/', // pandavms后端主机地址 eg: ws://172.16.19.19:8080/
address:'123638446', address: '123638446',
} };
useEffect(() => { useEffect(() => {
// 事件 ,返回视频信息 // 事件 ,返回视频信息
jessibuca&& jessibuca.current && jessibuca &&
jessibuca.current &&
jessibuca.current.on('videoInfo', function (data) { jessibuca.current.on('videoInfo', function (data) {
console.log('width:', data.width, 'height:', data.width); console.log('width:', data.width, 'height:', data.width);
}); });
// 事件 ,播放视频之后的回调 // 事件 ,播放视频之后的回调
jessibuca&&jessibuca.current && jessibuca &&
jessibuca.current &&
jessibuca.current.on('play', function (data) { jessibuca.current.on('play', function (data) {
console.log('play:', jessibuca); console.log('play:', jessibuca);
}); });
// 事件 ,暂停视频之后的回调 // 事件 ,暂停视频之后的回调
jessibuca&&jessibuca.current && jessibuca &&
jessibuca.current &&
jessibuca.current.on('pause', function (data) { jessibuca.current.on('pause', function (data) {
console.log('pause:', data); console.log('pause:', data);
}); });
...@@ -74,7 +76,7 @@ const Demo1 = (props) => { ...@@ -74,7 +76,7 @@ const Demo1 = (props) => {
}, []); }, []);
const stopVideo = () => { const stopVideo = () => {
jessibuca.current.pause && jessibuca.current.pause(); jessibuca.current.pause && jessibuca.current.pause();
}; };
const startVideo = () => { const startVideo = () => {
......
...@@ -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-04-13 10:58:44 * @LastEditTime: 2023-04-13 15:40:30
* @FilePath: \wisdom-components\packages\base-components\TestVideo\src\index.jsx * @FilePath: \wisdom-components\packages\base-components\TestVideo\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
*/ */
...@@ -57,6 +57,8 @@ const Video = (props, ref) => { ...@@ -57,6 +57,8 @@ const Video = (props, ref) => {
id: 'video-container', // 视频容器ID id: 'video-container', // 视频容器ID
accessToken: accessToken, accessToken: accessToken,
url: `ezopen://open.ys7.com/${VideoInfo.address}/1.hd.live`, url: `ezopen://open.ys7.com/${VideoInfo.address}/1.hd.live`,
templete:'simple',
footer:['talk','broadcast','hd','fullScreen']
}); });
PlayersA.pause = PlayersA.stop; PlayersA.pause = PlayersA.stop;
...@@ -77,7 +79,9 @@ const Video = (props, ref) => { ...@@ -77,7 +79,9 @@ const Video = (props, ref) => {
getToken(); getToken();
} }
VideoInfo.url = VideoInfo.useFullUrl ? VideoInfo.fullUrl : VideoInfo.pandavmsHost +'jessica/'+ VideoInfo.id; VideoInfo.url = VideoInfo.useFullUrl
? VideoInfo.fullUrl
: VideoInfo.pandavmsHost + 'jessica/' + VideoInfo.id;
let operateBtns = { let operateBtns = {
fullscreen: true, fullscreen: true,
screenshot: true, screenshot: true,
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.38](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_configurationview@1.4.37...@wisdom-components/ec_configurationview@1.4.38) (2023-04-13) ## [1.4.38](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_configurationview@1.4.37...@wisdom-components/ec_configurationview@1.4.38) (2023-04-13)
**Note:** Version bump only for package @wisdom-components/ec_configurationview **Note:** Version bump only for package @wisdom-components/ec_configurationview
## [1.4.37](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_configurationview@1.4.36...@wisdom-components/ec_configurationview@1.4.37) (2023-04-12) ## [1.4.37](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_configurationview@1.4.36...@wisdom-components/ec_configurationview@1.4.37) (2023-04-12)
### Bug Fixes ### Bug Fixes
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.5.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyview@1.5.0...@wisdom-components/ec_historyview@1.5.1) (2023-04-13) ## [1.5.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyview@1.5.0...@wisdom-components/ec_historyview@1.5.1) (2023-04-13)
**Note:** Version bump only for package @wisdom-components/ec_historyview **Note:** Version bump only for package @wisdom-components/ec_historyview
# [1.5.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyview@1.4.19...@wisdom-components/ec_historyview@1.5.0) (2023-04-06) # [1.5.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_historyview@1.4.19...@wisdom-components/ec_historyview@1.5.0) (2023-04-06)
### Features ### Features
......
# Change Log # Change Log
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.4.0...@wisdom-components/ec_quotaselect@1.4.1) (2023-04-13) ## [1.4.1](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.4.0...@wisdom-components/ec_quotaselect@1.4.1) (2023-04-13)
**Note:** Version bump only for package @wisdom-components/ec_quotaselect **Note:** Version bump only for package @wisdom-components/ec_quotaselect
# [1.4.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.3.18...@wisdom-components/ec_quotaselect@1.4.0) (2023-04-03) # [1.4.0](https://g.civnet.cn:8443/ReactWeb5/wisdom-components/compare/@wisdom-components/ec_quotaselect@1.3.18...@wisdom-components/ec_quotaselect@1.4.0) (2023-04-03)
### Features ### Features
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment