ios上调用videoContext.play()不工作
发布于 5 年前 作者 longyong 19322 次浏览 来自 问答

onShareAppMessage: function(res) {

var that = this;

console.log("$$$$$" + JSON.stringify(this));

return {

    success: function(res) {

        setTimeout(function(){

            that.videoContext.seek(20);

            that.videoContext.play();

        }, 500);

    }

}

也测试了别的方法的callback中调用videoContext.play(),比如wx.showModal。

seek是工作的。

play就不工作。

Android手机上两个action都工作。

请问有人碰到如下问题吗?

7 回复

没有解决!

官方通过需要“分享代码片段” 来增加流程的复杂性从而不具体解决问题。

这描述和代码已经很清楚了,你家的技术人员不用一分钟就可以复现问题。真是尴尬!!!

代码这么明显了,微信官方团队就这么装作不知道?

你确定你给的描述和代码够清楚?

talk is cheap ,show me the code

我们很忙的,给个可以跑起来一目了然的代码片段。

张小龙: 每天有1亿人教我做产品,好产品是不需要解释的

onReady: function() {

    this.videoContext = wx.createVideoContext(‘videoplayer’, this);

}

onShow: function() {

    var self = this;

    wx.showModal({

        ‘title’:“tips”,

        ‘content’:“confirm to play”,

        success: function(res) {

            self.videoContext.play();

        }

    })

}

这个就是相关代码。 wxml上面就是一个video标签。

android是可以的。开发IDE也是可以的。只有ios上面play不工作,但我尝试了self.videoContext.seek(20)是工作的。

我也遇到了,请问解决了吗?

回到顶部