Giter Club home page Giter Club logo

Comments (5)

zhangyc310 avatar zhangyc310 commented on June 23, 2024 1

确实如此,唯有VueAPlayer.default才能正常加载。希望作者能更新一下文档。
vue player非常棒

from vue-aplayer.

NeserCode avatar NeserCode commented on June 23, 2024

不知道为什么,我使用:

Vue.use(APlayer, {
  defaultCover: 'https://github.com/u3u.png',
  productionTip: false,
});

创建倒是成功了,但是会一直报错:
[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
而且使用原生的API也会提示我的{media}没有定义,例如:

const { media } = this.$refs.aplayer;

console.log(media.currentTime); // 获取音频当前播放时间
console.log(media.duration); // 获取音频总时间
console.log(media.paused); // 获取音频是否暂停

错误i

希望能请作者完善一下这个,很好的作品。

上面两位老哥能否详细说明一下这个VueAPlayer.default是如何操作。
小白不胜感激。
@vvni @zhangyc310

from vue-aplayer.

zhangsan08 avatar zhangsan08 commented on June 23, 2024

我确定的是2.x版本需要这样注册组件,1.x不确定,没这样用过。

Vue.use(VueAPlayer.default, {
  defaultCover: '',
  productionTip: true
});

求问怎么写

from vue-aplayer.

zhangsan08 avatar zhangsan08 commented on June 23, 2024

确实如此,唯有VueAPlayer.default才能正常加载。希望作者能更新一下文档。 vue player非常棒

求问怎么写

from vue-aplayer.

zhangsan08 avatar zhangsan08 commented on June 23, 2024

不知道为什么,我使用:

Vue.use(APlayer, {
  defaultCover: 'https://github.com/u3u.png',
  productionTip: false,
});

创建倒是成功了,但是会一直报错: [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. 而且使用原生的API也会提示我的{media}没有定义,例如:

const { media } = this.$refs.aplayer;

console.log(media.currentTime); // 获取音频当前播放时间
console.log(media.duration); // 获取音频总时间
console.log(media.paused); // 获取音频是否暂停

错误i

希望能请作者完善一下这个,很好的作品。

上面两位老哥能否详细说明一下这个VueAPlayer.default是如何操作。 小白不胜感激。 @vvni @zhangyc310

解决可吗

from vue-aplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.