Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

h5中的Video组件添加poster后,视频播放进度条失效 #4648

Closed
hanyingming opened this issue Oct 22, 2019 · 3 comments
Closed

h5中的Video组件添加poster后,视频播放进度条失效 #4648

hanyingming opened this issue Oct 22, 2019 · 3 comments
Assignees

Comments

@hanyingming
Copy link

问题描述
taro打包的h5, Video组件中设置poster封面图后,控制器的进度条失效

复现步骤
[复现问题的步骤]
1.问题代码:包含poster属性
<Video
controls={true}
src='http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
poster='http://misc.aotu.io/booxood/mobile-video/cover_900x500.jpg'
showFullscreenBtn={false}
showCenterPlayBtn={process.env.TARO_ENV === 'h5'}
initialTime='0'
id='myVideo'
style={{ width: '100%', height: '100%' }}
object-fit='contain'
onPlay={this.handStartPlay}
onEnded={this.handleVideoEnded}
onPause={this.handlePause}
className={styles.videoView}
>

截图:
image

  1. 无问题代码(需要注释poster属性)
    <Video
    controls={true}
    src='http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
    // poster='http://misc.aotu.io/booxood/mobile-video/cover_900x500.jpg'
    showFullscreenBtn={false}
    showCenterPlayBtn={process.env.TARO_ENV === 'h5'}
    initialTime='0'
    id='myVideo'
    style={{ width: '100%', height: '100%' }}
    object-fit='contain'
    onPlay={this.handStartPlay}
    onEnded={this.handleVideoEnded}
    onPause={this.handlePause}
    className={styles.videoView}
    >

    截图:
    image

期望行为
[这里请用简洁清晰的语言描述你期望的行为]
h5自定义进度条为什么因为设置了poster属性而失效?

报错信息
image

系统信息

Taro v1.2 及以上版本已添加 taro info 命令,方便大家查看系统及依赖信息,运行该命令后将结果贴下面即可。

  • 操作系统: Windows 10
  • Taro 版本 1.3.13 or 1.3.21
  • Node.js 版本 v10.13.0
  • 报错平台 h5

Taro CLI 1.3.21 environment info:
System:
OS: Windows 10
Binaries:
Node: 10.13.0 - D:\Program Files\nodejs\node.EXE
Yarn: 1.12.3 - C:\Users\DELL\AppData\Roaming\npm\yarn.CMD
npm: 6.5.0 - D:\Program Files\nodejs\npm.CMD

@taro-bot
Copy link

taro-bot bot commented Oct 22, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@taro-bot
Copy link

taro-bot bot commented Oct 22, 2019

CC @jinjinjin0731

@shichaohui
Copy link

@Chen-jj 为什么关了,解决方案呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants