我也有这样的问题,身边的安卓机都试过了,都这个样子,需要物理返回页面才能正常点击
安卓chooseImage方法设置sourceType: ['camera']点击取消页面卡死环境:安卓微信7.0.9 问题: chooseImage方法设置sourceType: ['camera'], 在底部弹出框中选择“取消”后, 页面卡死且不回调【cancel】方法,点击物理返回才会执行【cancel】
2020-02-22可以提供微信开发者工具用的是哪个端口号吗,或者目标IP? 网络看不太出来,因为可以扫码登录进微信开发者工具,但是在导入新工程或者新建工程的时候会出现同样的问题
微信开发者工具上传代码时,提示 Error: read ECONNRESET?在通过微信开发者工具的上传功能上传失败,以下是通过命令行上传时得到的返回,也不知道为什么是不是公司网段禁用了什么,但是微信的一些网站也是能能进的,麻烦有热心的小伙伴可以帮忙解答一下吗 --upload-info-output C:/Users/SunRen/git/miniProgram/info.json Initializing... idePortFile: C:\Users\SunRen\AppData\Local\微信开发者工具\User Data\Default\.ide IDE server has started, listening on http://127.0.0.1:24469 initialization finished uploading project... { i [StatusCodeError]: 400 - "{\"code\":40000,\"error\":\"错误 Error: read ECONN RESET\"}" at new i (C:\Users\SunRen\AppData\Roaming\Tencent\微信开发者工具\package.nw\ js\common\cli\index.js:157:46301) at H.callback (C:\Users\SunRen\AppData\Roaming\Tencent\微信开发者工具\packag e.nw\js\common\cli\index.js:157:45150) at H.e.callback.a.callback [as _callback] (C:\Users\SunRen\AppData\Roaming\T encent\微信开发者工具\package.nw\js\common\cli\index.js:157:44204) at H.a._callback.a.callback.a.callback (C:\Users\SunRen\AppData\Roaming\Tenc ent\微信开发者工具\package.nw\js\common\cli\index.js:187:5473) at H.emit (events.js:193:13) at H.<anonymous> (C:\Users\SunRen\AppData\Roaming\Tencent\微信开发者工具\pac kage.nw\js\common\cli\index.js:187:18286) at H.emit (events.js:193:13) at IncomingMessage.<anonymous> (C:\Users\SunRen\AppData\Roaming\Tencent\微信 开发者工具\package.nw\js\common\cli\index.js:187:17128) at Object.onceWrapper (events.js:281:20) at IncomingMessage.emit (events.js:198:15) name: 'StatusCodeError', statusCode: 400, message: '400 - "{\\"code\\":40000,\\"error\\":\\"错误 Error: read ECONNRESET\\"}"', error: '{"code":40000,"error":"错误 Error: read ECONNRESET"}', options: { url: 'http://127.0.0.1:24469/upload?cli=1&projectpath=C%253A%252FUsers%252FSunR en%252Fgit%252FminiProgram%252FCR1902543_Birthday_from_master&version=1.2.1&desc =%27correct&infooutput=C%253A%252FUsers%252FSunRen%252Fgit%252FminiProgram%252Fi nfo.json', resolveWithFullResponse: true, callback: [Function], transform: undefined, simple: true, transform2xxOnly: false }, response: IncomingMessage { _readableState: ReadableState { objectMode: false, highWaterMark: 16384, buffer: BufferList { head: null, tail: null, length: 0 }, length: 0, pipes: null, pipesCount: 0, flowing: true, ended: true, endEmitted: true, reading: false, sync: true, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, paused: false, emitClose: true, autoDestroy: false, destroyed: false, defaultEncoding: 'utf8', awaitDrain: 0, readingMore: true, decoder: null, encoding: null }, readable: false, _events: [Object: null prototype] { end: [Array], close: [Array], data: [Function], error: [Function] }, _eventsCount: 4, _maxListeners: undefined, socket: Socket { connecting: false, _hadError: false, _parent: null, _host: null, _readableState: [ReadableState], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [WritableState], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [ClientRequest], [Symbol(asyncId)]: 36, [Symbol(kHandle)]: [TCP], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, connection: Socket { connecting: false, _hadError: false, _parent: null, _host: null, _readableState: [ReadableState], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [WritableState], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [ClientRequest], [Symbol(asyncId)]: 36, [Symbol(kHandle)]: [TCP], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, headers: { 'content-type': 'application/json; charset=utf-8', date: 'Mon, 03 Feb 2020 03:41:12 GMT', connection: 'close', 'transfer-encoding': 'chunked' }, rawHeaders: [ 'Content-Type', 'application/json; charset=utf-8', 'Date', 'Mon, 03 Feb 2020 03:41:12 GMT', 'Connection', 'close', 'Transfer-Encoding', 'chunked' ], trailers: {}, rawTrailers: [], aborted: false, upgrade: false, url: '', method: null, statusCode: 400, statusMessage: 'Bad Request', client: Socket { connecting: false, _hadError: false, _parent: null, _host: null, _readableState: [ReadableState], readable: true, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [WritableState], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: null, _pendingEncoding: '', server: null, _server: null, parser: null, _httpMessage: [ClientRequest], [Symbol(asyncId)]: 36, [Symbol(kHandle)]: [TCP], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, _consuming: false, _dumped: false, req: ClientRequest { _events: [Object], _eventsCount: 5, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: [Socket], connection: [Socket], _header: 'GET /upload?cli=1&projectpath=C%253A%252FUsers%252FSunRen%252Fgit%252F miniProgram%252FCR1902543_Birthday_from_master&version=1.2.1&desc=%27correct&inf ooutput=C%253A%252FUsers%252FSunRen%252Fgit%252FminiProgram%252Finfo.json HTTP/1 .1\r\nhost: 127.0.0.1:24469\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: [Agent], socketPath: undefined, timeout: undefined, method: 'GET', path: '/upload?cli=1&projectpath=C%253A%252FUsers%252FSunRen%252Fgit%252Fmini Program%252FCR1902543_Birthday_from_master&version=1.2.1&desc=%27correct&infoout put=C%253A%252FUsers%252FSunRen%252Fgit%252FminiProgram%252Finfo.json', _ended: true, res: [Circular], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, [Symbol(isCorked)]: false, [Symbol(outHeadersKey)]: [Object] }, request: H { _events: [Object], _eventsCount: 5, _maxListeners: undefined, resolveWithFullResponse: true, readable: true, writable: true, _qs: [r], _auth: [c], _oauth: [u], _multipart: [s], _redirect: [r], _tunnel: [s], _rp_resolve: [Function], _rp_reject: [Function], _rp_promise: [Promise], _rp_callbackOrig: undefined, callback: [Function], _rp_options: [Object], headers: {}, setHeader: [Function], hasHeader: [Function], getHeader: [Function], removeHeader: [Function], method: 'GET', localAddress: undefined, pool: {}, dests: [], __isRequestRequest: true, _callback: [Function], uri: [Url], proxy: null, tunnel: false, setHost: true, originalCookieHeader: undefined, _disableCookies: true, _jar: undefined, port: '24469', host: '127.0.0.1', path: '/upload?cli=1&projectpath=C%253A%252FUsers%252FSunRen%252Fgit%252Fmini Program%252FCR1902543_Birthday_from_master&version=1.2.1&desc=%27correct&infoout put=C%253A%252FUsers%252FSunRen%252Fgit%252FminiProgram%252Finfo.json', httpModule: [Object], agentClass: [Function], agent: [Agent], _started: true, href: 'http://127.0.0.1:24469/upload?cli=1&projectpath=C%253A%252FUsers%252FS unRen%252Fgit%252FminiProgram%252FCR1902543_Birthday_from_master&version=1.2.1&d esc=%27correct&infooutput=C%253A%252FUsers%252FSunRen%252Fgit%252FminiProgram%25 2Finfo.json', req: [ClientRequest], ntick: true, response: [Circular], originalHost: '127.0.0.1:24469', originalHostHeaderName: 'host', responseContent: [Circular], _destdata: true, _ended: true, _callbackCalled: true }, toJSON: [Function: L], caseless: t { dict: [Object] }, body: '{"code":40000,"error":"错误 Error: read ECONNRESET"}' } } C:\Program Files (x86)\Tencent\微信web开发者工具>
2020-02-04现在有解决方案了吗
live-player页面隐藏后仍然继续播放【急】live-player中在onHide中操作直播实例不生效 <view class="page-body"> <view class="page-section tc"> <live-player id="player" src="{{liveSrc}}" mode="live" bindstatechange="statechange" binderror="error" background-mute/> <view class="btn-area"> <button bindtap="bindPlay" class="page-body-button" type="primary">播放</button> <button bindtap="bindPause" class="page-body-button" type="primary">暂停</button> <button bindtap="bindStop" class="page-body-button" type="primary">停止</button> <button bindtap="bindResume" class="page-body-button" type="primary">恢复</button> <button bindtap="bindMute" class="page-body-button" type="primary">静音</button> <button bindtap="setSrc" class="page-body-button" type="primary">src</button> </view> </view> </view> /* eslint-disable */ const app = getApp() Page({ data: { liveSrc: "", state: 0, // 当前视频状态,0暂停,1播放,-1无视频或播放失败,用于控制页面上元素的展示 fullScreen: false, mute: false, init: true // 是否是第一次播放,用于控制只进行一次play() }, onLoad: function () { this.setData({ // liveSrc:"http://tx.corp-flv.huya.com/huyalive/35754395-35754395-153563957213265920-3155517294-10057-A-1523883632-63059.flv?wsSecret=551b73f934a29fcc48ec24010c6a3a81&wsTime=5ad601ce" liveSrc:"rtmp://live.hkstv.hk.lxdns.com/live/hks" }) }, onReady(res) { this.ctx = wx.createLivePlayerContext('player') }, /* 直播相关 start */ // 静音按钮 tapMute() { this.bindMute(); }, // 监听状态改变 statechange(e) { if (e.detail.code == '-2301') { console.log('loading fail'); this.setData({ state: -1 }); } console.log('live-player code:', e.detail.code) }, // 错误处理 error(e) { console.error('live-player error:', e.detail.errMsg); this.setData({ state: -1 }); }, bindPlay() { this.ctx.play({ success: res => { this.setData({ // state:1 - this.data.state // 1 state: 1 }); console.log('play success') }, fail: res => { console.log('play fail'); this.setData({ state: -1 }); } }) }, bindPause() { this.ctx.pause({ success: res => { this.setData({ // state:1 - this.data.state // 0 state: 0 }); console.log('pause success') }, fail: res => { console.log('pause fail') this.setData({ state: -1 }); } }) }, bindStop() { this.ctx.stop({ success: res => { this.setData({ // state:1 - this.data.state // 0 state: 0, init: true }); console.log('stop success') }, fail: res => { console.log('stop fail') this.setData({ state: -1 }); } }) }, bindResume() { this.ctx.resume({ success: res => { this.setData({ // state:1 - this.data.state // 1 state: 1 }); console.log('resume success') }, fail: res => { console.log('resume fail') this.setData({ state: -1 }); } }) }, bindMute() { this.ctx.mute({ success: res => { this.setData({ mute: !this.data.mute }); console.log('mute success') }, fail: res => { console.log('mute fail') this.setData({ state: -1 }); } }) }, bindFullScreen() { this.ctx.exitFullScreen({ success: res => { console.log('exitFullScreen success') }, fail: res => { console.log('exitFullScreen fail') this.setData({ state: -1 }); } }) }, bindExitFullScreen() { this.ctx.requestFullScreen({ direction: 90, success: res => { console.log('requestFullScreen success') }, fail: res => { console.log('requestFullScreen fail') this.setData({ state: -1 }); } }) }, setSrc(){ this.setData({ liveSrc: "" }); console.log(this.data.liveSrc); this.ctx = null; }, onShow(){ console.log("show~~~~~~"); // setTimeout(() => { // this.bindPlay(); // }, 1000); }, onHide(){ console.log("hide~~~~~~"); this.setData({ liveSrc: "" }); this.bindStop(); } /* 直播相关 end */ })
2018-06-04