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)


请问是什么原因引起的这个问题,谢谢

展开全部
收起
2回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • 思念在大脑里裸奔

    18人对此回答表示赞同

    谢谢回复,小游戏视频播放的API没看到有emitter的定义资料,请问哪里有这方面的资料吗?

    展开
    18
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • Fiona徐诗吟

    12人对此回答表示赞同

    video标签controls=false之后就会出现此错误

    展开
    12
    0回复
    发布于 5年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部