网上的垃圾代码太多,最后翻了video.js的官方文档,就这么简单,浪费了我这么久,注:我这里使用的vue

//html

<video  >
</video>

//随便定义一个方法

<p @click="selectomit >点击我</p>

 

//vue  methods里面

selectomit (){

var that = this;
that.videosrc = '你的路径';
console.log(that.videosrc);
var player=videojs('my-player');
console.log(player);
player.src({
src:that.videosrc
})

 

}

相关文章:

  • 2021-07-15
  • 2021-11-19
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
猜你喜欢
  • 2022-02-20
  • 2021-10-10
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
相关资源
相似解决方案