tvfe / txv-miniprogram-plugin

这是腾讯视频小程序播放插件。 打广告:腾讯视频小程序开发框架=>
https://github.com/tvfe/wxpage
461 stars 76 forks source link

vid切换后播放器异常,黑屏,无法加载内容 #141

Closed cbjiang closed 2 years ago

cbjiang commented 2 years ago

部分用户反馈有一直黑屏的情况,表现为广告时长未加载出来,导致一直黑屏,点击播放按钮无效。是否能提供广告加载超时的判断,实现自动重载或者跳过广告?

cbjiang commented 2 years ago

除了上述问题,有一个新的问题发现。 当autoplay=false,且初始设置的vid视频没有开始播放时,切换新的vid,播放器会黑屏,无法加载广告和视频内容。 image

kedanielwu commented 2 years ago

麻烦提供一下可以复现的代码片段。如果不能提供的话麻烦提供下插件版本和复现的执行路径

cbjiang commented 2 years ago
<player-component id="video" vid="{{cVid1}}" autoplay="{{false}}" useNativeUI="{{true}}"></player-component>
<button type="primary" style="margin: 5px;" bindtap="playCVid1">视频1</button>
<button type="primary" style="margin: 5px;" bindtap="playCVid2">视频2</button>

const app = getApp()

Page({
  data: {
    cVid1:'k33012qvncd',
    cVid2:'s3301n1zhcm'
  },
  onLoad() {

  },
  playCVid1:function(){
    const txv = this.selectComponent('#video')
    txv.play(this.data.cVid1);
  },
  playCVid2:function(){
    const txv = this.selectComponent('#video')
    txv.play(this.data.cVid2);
  }
})

"plugins": {
    "player": {
       "version": "2.0.2",
       "provider": "wxa75efa648b60994b"
    }
 }

{
  "usingComponents": {
    "player-component": "plugin://player/video"
  }
}

当先点击播放,再点击按钮视频2进行切换的时候,就可以正常执行。 当不点击播放,直接点击按钮视频2进行切换的时候,就无法正常执行

cbjiang commented 2 years ago

请问有什么进展了吗

whatberry commented 2 years ago

我也有这个问题,换到1.5.3则没有问题

kedanielwu commented 2 years ago

已定位到问题,目前只会在autoplay=false下出现。已经记录,预计下周2.0.4可以修复。