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

百度小程序真机调试,video无法正常切换播放 #1863

Closed
atony2099 opened this issue Jan 9, 2019 · 3 comments
Closed

百度小程序真机调试,video无法正常切换播放 #1863

atony2099 opened this issue Jan 9, 2019 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@atony2099
Copy link

atony2099 commented Jan 9, 2019

问题描述
百度小程序, 从列表页选择video1,进入播放页,播放�video1,退出播放页,返回列表页,点击video2,再次进入播放页页,�此时播放的视频还是video1.

此现象只有在iphone真机上出现,使用的是百度app最新版11.2.1,
使用模拟器和Andoid真机都能正常切换视频。

复现步骤

  1. 使用模拟器正常切换视频播放
    picture1

  2. 使用iphone真机 点击video2播放仍然是video1
    picture2

home.js

export default class Index extends Component {
  push (e) {   
    let {id} = e.target.dataset 
    Taro.navigateTo({
      url:`/pages/play/index?id=${id}`
    })
  }
  render () {
    return (
      <View className='index'>
        <Button  data-id='1' onClick={this.push}>video1</Button>
        <Button data-id='2'  onClick={this.push}>video2</Button>
        <Button data-id='3'  onClick={this.push}>video3</Button>
      </View>
    )
  }
}

play.js

export default class PlayIndex extends Component {
  state = {
    id:0,
  }
  componentDidMount(){
    let {params} = this.$router 
    console.log(params,"parma===")
    this.setState({id:params.id})
  }
  render () {
    const {id} = this.state;
    console.log(id,"ppp");
    let path;
    switch (id) {
      case '1':
        path = 'https://bdpro.wmlive.cn/opus/play?id=1617528559&sign=eab5532d618b330255d6b3a826b73c86&mask=1&origin=baiduprogram'
        break;
     case '2':
        path = 'https://bdpro.wmlive.cn/opus/play?id=1545855024&sign=fbad7cd662aa8b62254ff4e97420dab5&mask=1&origin=baiduprogram'
        break;
    case '3':
        path = 'https://bdpro.wmlive.cn/opus/play?id=1588948886&sign=cf417c1a568f9964bd326f12cb67ba57&mask=1&origin=baiduprogram'
        break;
      default:
        break;
    }
    return (
      <View className='index'>
        <Video autoplay src={path} style={{width:'100%',height:'200px'}}></Video>
      </View>
    )
  }
}

期望行为
�点击video1,�播放video1
点击video2,播放video2

系统信息

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

  • 操作系统: [mac 10.14]
  • Taro 版本 [1.2.0-beta.4]
  • 报错平台 [百度小程序]
@taro-bot
Copy link

taro-bot bot commented Jan 9, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@simbel6
Copy link

simbel6 commented Jan 17, 2019

小程序也有类似问题,视频不能正常切换

@Chen-jj Chen-jj self-assigned this May 9, 2019
@shenghanqin shenghanqin added the question Further information is requested label Nov 11, 2019
@shenghanqin
Copy link
Collaborator

试一试最新版1.3.22,以及最新的百度小程序app

@Chen-jj Chen-jj closed this as completed Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants