收藏
回答

安卓真机videoContext.pause()方法不起作用?

安卓真机videoContext.pause()方法不起作用?

安卓版本5.1.1

微信版本7.0.16

基础库版本 2.12.2

回答关注问题邀请回答
收藏

3 个回答

  • 社区技术运营专员--阳光
    社区技术运营专员--阳光
    2020-10-30

    你好,请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2020-10-30
    有用
    回复 11
    • 夕~🤍
      夕~🤍
      2020-12-03
      已经解决了  谢谢啦
      2020-12-03
      回复
    • Residue M
      Residue M
      2020-12-19
      9:快查
      2020-12-19
      回复
    • Residue M
      Residue M
      2020-12-19
      7:浪打浪
       // 播放
        play: function() {
          innerAudioContext.play()
          this.setData({
            isplay: true
          })
        },
        // 暂停
        pause: function() {
          innerAudioContext.pause()
          this.setData({
            isplay: false
          })
        },
        // 重播
        review: function() {
          innerAudioContext.stop()
          innerAudioContext.play()
          this.setData({
            isplay: true
          })
        },
      2020-12-19
      回复
    • Residue M
      Residue M
      2020-12-20回复Residue M
      6快递查询:
      2020-12-20
      回复
    • Residue M
      Residue M
      2020-12-20
      5:天气预报
      2020-12-20
      回复
    查看更多(6)
  • Hu'chun
    Hu'chun
    2020-12-02

    解决了吗


    2020-12-02
    有用 1
    回复 3
    • 夕~🤍
      夕~🤍
      2020-12-03
      设个延迟setTimeout就可以了  我主要是两个video切换的时候部分手机出现这个问题
      2020-12-03
      1
      回复
    • 开心由我
      开心由我
      2021-06-28回复夕~🤍
      你那定时器设哪里?
      2021-06-28
      回复
    • 夕~🤍
      夕~🤍
      2021-07-05回复开心由我
      就是要把pause方法放在setTimeout里 看你方法在那调用了
      2021-07-05
      回复
  • Residue M
    Residue M
    2020-12-18


    8:

    this.videoContext = wx.createVideoContext('myVideo')

     // 输入弹幕信息

      inputBullet(e) {

        // console.log("e==", e)

        let inputValue = e.detail.value.trim()

        if(inputValue != ""){

          this.data.inputValue = inputValue

        }else{

          this.data.inputValue = "哈哈哈,真搞笑!"

        }

      },

      // 发送视频弹幕

      sendBullet() {

        this.videoContext.sendDanmu({

          text: this.data.inputValue,

          color: getRandomColor()

        })

      },

      // 视频播放

      play(){

        this.videoContext.play()

      },

      // 视频暂停

      pause(){

        this.videoContext.pause()

      }

    })

    autoplay="trueloop="truesrc="../mp4/脑袋和球互换.mp4"

    bindblur="inputBullet"

     <button bindtap="play">播放</button>

          <button bindtap="pause">暂停</button>

          <button bindtap="sendBullet">发送弹幕</button>



    2020-12-18
    有用
    回复
登录 后发表内容
问题标签