- live-pusher 推流不成功
- 当前 Bug 的表现(可附上截图) [图片] - 预期表现 [图片] - 复现路径 断开网络,然后重新连接网络以后,对wx.createLivePusherContext()创建的对象,再次启用start()方法,就会出现3005的问题 - 提供一个最简复现 Demo
2019-02-26 - live-pusher 安卓手机提推流失败,iOS可以
- 当前 Bug 的表现(可附上截图)[图片] - 预期表现 [图片] - 复现路径 - 提供一个最简复现 Demo wxml: <live-pusher id="livePusher" url="{{pushUrl}}" mode="RTC" bindstatechange="pusherStateChange" binderror="onPushError" enable-camera="{{false}}" beauty="6" class="invisible"></live-pusher> js: onReady: function () { console.log('>>>on ready') var self = this; this.createPushContext(self); this.createPlayContext(self); wx.setKeepScreenOn({ keepScreenOn: true, }) }, //初始化推流 createPushContext: function (self) { console.log('>>> push create context'); var context = wx.createLivePusherContext('livePusher', self); this.setData({ pushVideoContext: context }) }, //推流 startPush: function(url){ console.log('>>> start pushing'); var that = this; that.setData({ pushUrl: url }, function () { that.data.pushVideoContext.start(); }) }, //停止推流 stopPush: function(){ console.log('>>> stop pushing'); var that = this; that.setData({ isPushing: false, }, function () { that.data.pushVideoContext.stop(); }) }, pusherStateChange: function (e) { console.log('>>> live-pusher onPushStateChange:', e.detail.code); if (e.detail.code == -1307) { this.stopPush(); wx.showToast({ title: '-1307,推流失败', }) } else if (e.detail.code == 1007) { wx.hideToast(); // 推流成功 this.setData({ isPushing: true }) } }, onPushError: function (e) { console.log('>>>push error:',e) console.error('>>> live-pusher onPushError:', e.detail.errMsg); this.stopPush(); wx.showToast({ title: '推流失败', icon: 'none' }) },
2018-12-27