xmf f970cfb7c7 polish: 完善cip-dynamic-video组件 | há 2 anos atrás | |
---|---|---|
.. | ||
README.md | há 2 anos atrás | |
index.jsx | há 2 anos atrás | |
index.less | há 2 anos atrás |
动态地址的h5视频播放器
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
src | 视频地址 | string | - | |
autoplay | 是否自动播放 | boolean | false |
// proxy-config.js
// proxyConfig 数据
const proxyConfig = [
{key: 'api', target: 'http://0.0.0.0:8080', productionTarget: '/api'}
]
import CipDynamicVideo from '@cip/components/cip-dynamic-video';
// 在获取实际的地址时将根据proxyConfig的地址进行处理
// 测试环境地址为 http://0.0.0.0:8080/xxx.mp4
// 生产环境地址为 /api/xxx.mp4
<CipDynamicVideo src={'\${api}/xxx.mp4'}/>