大佬 此问题解决没
红屏问题不能复现,比较蛋痛。时不时来一下。有时候会自动消失,不知道有大佬遇到过这种问题吗? laya版本:2.2.0 微信开发者工具:Stable v1.02.1910120[图片]
2020-02-16video标签 controls = false 之后就会出现此错误
小游戏中视频播放出现js错误this.videoplayer = wx.createVideo({ x: 0, y: 0, width: 500, height: 500, src: 'http://res.xxx.com/video/ba/87/ba8795747d96fee9d3e39e70d57a92fb.mp4', autoplay: true }) 按照文档调用视频播放器,在微信开发者工具中,视频播放正常,只是会有JS错误出现: VM132:1 appServiceSDKScriptError Cannot read property 'emitter' of undefined;at api onVideoPause callback function TypeError: Cannot read property 'emitter' of undefined at Function.<anonymous> (http://127.0.0.1:53293/game/__dev__/WAGame.js:13:4967) at http://127.0.0.1:53293/game/__dev__/WAGame.js:4:10697 at a (http://127.0.0.1:53293/game/gamePage.html:1:38633) at d.registerCallback (http://127.0.0.1:53293/game/gamePage.html:1:38902) at m.forEach (http://127.0.0.1:53293/game/gamePage.html:1:36843) at Array.forEach (<anonymous>) at d (http://127.0.0.1:53293/game/gamePage.html:1:36823) at WebSocket.j.onmessage (http://127.0.0.1:53293/game/gamePage.html:1:36716) console.error @ VM132:1 errorReport @ WAGame.js:3 (anonymous) @ WAGame.js:3 (anonymous) @ WAGame.js:4 a @ gamePage.html:1 d.registerCallback @ gamePage.html:1 m.forEach @ gamePage.html:1 d @ gamePage.html:1 j.onmessage @ gamePage.html:1 VM132:1 appServiceSDKScriptError Cannot read property 'emitter' of undefined;at api onVideoEnded callback function TypeError: Cannot read property 'emitter' of undefined at Function.<anonymous> (http://127.0.0.1:53293/game/__dev__/WAGame.js:13:4967) at http://127.0.0.1:53293/game/__dev__/WAGame.js:4:10697 at a (http://127.0.0.1:53293/game/gamePage.html:1:38633) at d.registerCallback (http://127.0.0.1:53293/game/gamePage.html:1:38902) at m.forEach (http://127.0.0.1:53293/game/gamePage.html:1:36843) at Array.forEach (<anonymous>) at d (http://127.0.0.1:53293/game/gamePage.html:1:36823) at WebSocket.j.onmessage (http://127.0.0.1:53293/game/gamePage.html:1:36716) 请问是什么原因引起的这个问题,谢谢
2018-05-21video标签controls = false 之后就会出现此错误
小游戏视频播放出现JS错误[代码]VideoUtil.playVideo = [代码][代码]function[代码] [代码](_callback) { [代码][代码] [代码][代码]var[代码] [代码]vv = [代码][代码]this[代码][代码].loadXCXVideo();[代码][代码] [代码][代码]SoundManage.pauseBGSound();[代码][代码] [代码][代码]vv.onEnded([代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]console.log([代码][代码]"ended"[代码][代码]);[代码][代码] [代码][代码]});[代码][代码] [代码][代码]vv.onTimeUpdate([代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]console.log([代码][代码]"onVideoTimeUpdate"[代码][代码]);[代码][代码] [代码][代码]});[代码][代码] [代码][代码]vv.onPlay([代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]console.log([代码][代码]"onVideoPlay"[代码][代码]);[代码][代码] [代码][代码]}); [代码][代码] [代码][代码]};[代码][代码] [代码][代码]VideoUtil.destroy = [代码][代码]function[代码] [代码](vv) {[代码][代码] [代码][代码]vv.destroy();[代码][代码] [代码][代码]};[代码][代码] [代码][代码]VideoUtil.loadXCXVideo = [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]var[代码] [代码]res = VideoUtil.systeminfo;[代码][代码] [代码][代码]var[代码] [代码]h = 368 / 640 * res.windowWidth;[代码][代码] [代码][代码]var[代码] [代码]videoparam = {[代码][代码] [代码][代码]"x"[代码][代码]: 0, [代码][代码]"y"[代码][代码]: 100,[代码][代码] [代码][代码]"width"[代码][代码]: res.windowWidth,[代码][代码] [代码][代码]"height"[代码][代码]: h,[代码][代码] [代码][代码]"objectFit"[代码][代码]: [代码][代码]"contain"[代码][代码],[代码][代码] [代码][代码]"poster"[代码][代码]: [代码][代码]"//res.qiaomukeji.com/game/bangqiu/videobg.jpg"[代码][代码],[代码][代码] [代码][代码]"src"[代码][代码]: [代码][代码]"//res.qiaomukeji.com/game/bangqiu/bangqiuvideo.mp4"[代码][代码],[代码][代码] [代码][代码]"controls"[代码][代码]: [代码][代码]false[代码][代码],[代码][代码] [代码][代码]"autoplay"[代码][代码]: [代码][代码]true[代码][代码] [代码][代码]};[代码][代码] [代码][代码]return[代码] [代码]window[[代码][代码]"wx"[代码][代码]].createVideo(videoparam);[代码][代码] [代码][代码]};[代码]根据官方API文档创建书写,视频可正常播放,JS文件提示错误,无法正常走onEnded事件,错误截图如下:[图片]
2018-05-21