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)
请问是什么原因引起的这个问题,谢谢