const player = this.selectComponent('#tvp-id') 改为 const store = requirePlugin('player') const player = store.get('tvp'); 也不行
腾讯视频插件,通过seek设置进度跳转 无效,如何解决?<player-component id="tvp-id" playerid="tvp" vid="{{nowvid}}" style="width:100%;"> <view slot="bottom-left-ctrl-btn" style="display: flex;"> <button class="yhx_but_bottom" bind:tap="backwardFiveSeconds">-5s</button> <button class="yhx_but_bottom" bind:tap="forwardFiveSeconds">+5s</button> </view> </player-component> js: forwardFiveSeconds(){ const player = this.selectComponent('#tvp-id') if (player && typeof player.getCurrentTime === 'function' && typeof player.seek === 'function') { const currentTime = player.getCurrentTime(); player.seek(currentTime + 5); } else { console.error('Player methods not available!'); } },
10-25