html52.com
我爱小程序-开发者交流社区

腾讯视频插件使用获取视频组件实例报错?

问题类型 插件 AppID 插件版本号 AppID 操作系统 微信版本 基础库版本
Bug wxa75efa648b60994b 2.1.12 wxa75efa648b60994b iOS 开发者工具 2.30.2
<player-component id="tvp-id" playerId="tvp" :controls="false" object-fit="cover" :loop="true" @play="play" @ended="playended"> </player-component
const store = requirePlugin('player'); const player = store.get('tvp'); // 使用这个获取的 的组件实例为undefind
使用this.selectComponent('#tvp-id'); 可以获取到实例获取时代码会报错 并阻止scroll-view的 锚点跳转。
报错信息:
TypeError: Converting circular structure to JSON
    --> starting at object with constructor 't'
    |     property 'msg' -> object with constructor 'i'
    |     property '_events' -> object with constructor 'n'
    |     ...
    |     property 'context' -> object with constructor 't'
    --- property 'player' closes the circle
    at JSON.stringify (<anonymous>)
基础库版本号:2.30.2
开发者工具版本号:RC 1.06.2210141
腾讯视频插件版本号:2.1.12


网友回复

社区技术运营专员-阳光:

player-component 上的playerId写错了,是playerid,所以store.get会报错。

具体提供下代码片段看看呢

(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付