Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vue-APlayer] NotSupportedError: The element has no supported sources #192

Open
gaoqiang1991a opened this issue Feb 14, 2020 · 7 comments
Open

Comments

@gaoqiang1991a
Copy link

使用Vue-APlayer时,播放.mp3音频文件浏览器提示[Vue-APlayer] NotSupportedError: The element has no supported sources,请问下要是什么原因?谢谢!

@Copay
Copy link

Copay commented Feb 14, 2020

@gaoqiang1991a 能否提供一个demo呢?

@gaoqiang1991a
Copy link
Author

gaoqiang1991a commented Feb 15, 2020

@Copay
播放器是放在APP.vue文档内的:
<template>中:

<aplayer
      autoplay
      shuffle
      repeat="list"
      :music='list[0]'
      :list='list'
    />

<script>中:

import Aplayer from 'vue-aplayer'
export default {
  data () {
    return {
      list: [
        {
          title: 'A Little Love',
          artist: '冯曦妤',
          src: './common/music/冯曦妤 - A Little Love.mp3'
        }
      ]
    }
  },
components: {
    Aplayer
  }

音乐文件是存放在项目本地文件夹内的,但是播放就会报错:
[Vue-APlayer] NotSupportedError: The element has no supported sources.

@Yuban32
Copy link

Yuban32 commented Jul 8, 2020

我也遇到这个问题,你在src:这里加上require即可

例如,src:require(./common/music/冯曦妤 - A Little Love.mp3)

@494045073
Copy link

为啥我的音量键显示不出来

@zhuweilong
Copy link

网络链接 咋加require?

@Yuban32
Copy link

Yuban32 commented Jun 29, 2023

网络链接 咋加require?

网络资源直接用就行了啊

@zhuweilong
Copy link

网络资源 也会报The element has no supported sources 谷歌浏览器 网络链接格式是wav的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants