Giter VIP home page Giter VIP logo

vue-audio-player's People

Contributors

1014156094 avatar dependabot[bot] avatar marin-marin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vue-audio-player's Issues

Since upgrading to 1.5.3: Sourcemap pointing to missing source files

Hi LiRiPeng,

since I upgraded to the latest version (1.5.3), I see the following terminal output when I start my application (yarn vite).

Sourcemap for "/node_modules/@any-touch/core/dist/index.es.js" points to missing source files
Sourcemap for "/node_modules/@any-touch/pan/dist/index.es.js" points to missing source files
Sourcemap for "/node_modules/any-event/dist/index.es.js" points to missing source files
Sourcemap for "/node_modules/@any-touch/compute/dist/index.es.js" points to missing source files
Sourcemap for "/node_modules/@any-touch/shared/dist/index.es.js" points to missing source files
Sourcemap for "/node_modules/@any-touch/vector/dist/index.es.js" points to missing source files

Do you know what this is about? Is this a regression?

When I remove "import AudioPlayer from '@liripeng/vue-audio-player'" from my main.ts, the error is gone.

Cheers

如何播放列表中指定歌曲

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

进度条时间有点小问题

请打开下面的链接后点击右上角 fork,然后放您的代码上去复现问题,最后将链接发出来,以便作者排查,谢谢。(Please open the link below and click on the top right corner fork, then put your code to duplicate the problem, and finally post the link for the author to check, thank you.)

https://codesandbox.io/s/liripengvue-audio-player-issue-moban-cb57s?file=/src/App.vue&resolutionWidth=320&resolutionHeight=675
您好,在使用您的组件过程中,发现进度条出现0:60的情况,应该显示为1:00,想烦请您解决,谢谢~

关于可拖拽点位置初始化是否有必要的问题

播放时会初始化一次点的位置,具体偏移多少取决于点的this.$refs.audioProgressPoint.offsetWidth
带来的后果就是,如果this.$refs.audioProgressPoint这个点稍微大了一点点,那么初始化的时候就会出现显著的向左偏移(尤其是移动端)

我可以在Nuxt中使用吗?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

关于PC端引入模拟Touch事件后的BUG

PC端引入模拟Touch事件后,如果页面中存在input元素,点击input无法选中聚焦(可以通过nextTick获取元素后手动聚焦),且无法使用鼠标移动光标进行选中复制(未解决)

安装上插件后显示样式有问题

请打开下面的链接后点击右上角 fork,然后放您的代码上去复现问题,最后将链接发出来,以便作者排查,谢谢。(Please open the link below and click on the top right corner fork, then put your code to duplicate the problem, and finally post the link for the author to check, thank you.)

https://codesandbox.io/s/liripengvue-audio-player-issue-moban-cb57s?file=/src/App.vue&resolutionWidth=320&resolutionHeight=675

package.json

"dependencies": {
    "@liripeng/vue-audio-player": "^1.4.0",
    "@riophae/vue-treeselect": "0.4.0",
    "axios": "0.24.0",
    "clipboard": "2.0.8",
    "core-js": "3.19.1",
    "echarts": "4.9.0",
    "element-ui": "2.15.6",
    "file-saver": "2.0.5",
    "fuse.js": "6.4.3",
    "highlight.js": "9.18.5",
    "js-beautify": "1.13.0",
    "js-cookie": "3.0.1",
    "jsencrypt": "3.2.1",
    "nprogress": "0.2.0",
    "quill": "1.3.7",
    "screenfull": "5.0.2",
    "sortablejs": "1.10.2",
    "vue": "2.6.12",
    "vue-aliplayer": "^1.0.0",
    "vue-aplayer": "^1.6.1",
    "vue-count-to": "1.0.13",
    "vue-cropper": "0.5.5",
    "vue-json-viewer": "^2.2.14",
    "vue-meta": "2.4.0",
    "vue-mini-player": "^0.2.1",
    "vue-mobile-audio": "^0.1.3",
    "vue-router": "3.4.9",
    "vue-video-player": "^5.0.2",
    "vuedraggable": "2.24.3",
    "vuex": "3.6.0"
  },

main.js

import AudioPlayer from '@liripeng/vue-audio-player'
import '@liripeng/vue-audio-player/lib/style.css'

Vue.use(AudioPlayer)

声明处

<el-form-item label="在线试听" prop="previewFileUrl">
  <audio-player v-if="!audioDestroy"
                ref="audioPlayer"
                :audio-list="audioPreviewConfig.audioList"
                :playback-rates="audioPreviewConfig.playbackRates"
                :show-play-button="audioPreviewConfig.showPlayButton"
                :show-prev-button="audioPreviewConfig.showPrevButton"
                :show-next-button="audioPreviewConfig.showNextButton"
                :theme-color="audioPreviewConfig.themeColor"
  ></audio-player>
</el-form-item>

data数据

audioPreviewConfig: {
        // 是否显示播放按钮
        showPlayButton: true,
        // 是否显示上一首按钮
        showPrevButton: false,
        // 是否显示下一首按钮
        showNextButton: false,
        // 倍速播放频率
        playbackRates:[0.5, 1, 1.5, 2],
        // 音频播放列表
        audioList:[],
        // 插件主题
        themeColor : "#409eff",
      }

页面效果

image

iOS: Dragging does not work anymore

Hi,

in the newest version (1.6.3) I experience problems when dragging the progress slider on my iPhone.
I can click on the progress bar, and then the position moves where I clicked. But holding the progress marker and dragging it does not work anymore.

On Safari on my Mac, it works correctly.

Demo Version Not working

When I click on the Online Demo link in the ReadMe, the CodeSandbox tries to open but never loads fully.

Here's what I see with the console open (on Chrome 125.0.6422.114 on iOS 14.4 Sonoma):

image

Struggling creating standalone play/pause button: "Cannot read properties of undefined (reading 'isPlaying')"

I trying to create a play/pause button that I can place anywhere on my site (separately from the player). I use v-if to switch what the button displays (depending on whether sound is played or not), and use the "isPlaying" property that I get from the player. The logic I have taken over largely from the example provided in the index.vue.

What I now struggle with is that when I load the page, caused by line 2 below: "!this.$refs.audioPlayer.isPlaying"

TypeError: Cannot read properties of undefined (reading 'isPlaying')
My understanding so far is that the the ref is not yet available when the component gets rendered, for which it causes an issue. I tried using different approaches (mounted, watchers, setup..) but I keep banging my head against the wall.

Any pointers how to address this correctly would be appreciated.

Funny enough: When I change "!this.$refs.audioPlayer.isPlaying" simply to "true" when loading the page, and then replacing the "true" again with the "!this.$refs.audioPlayer.isPlaying" when the page is already loaded, I can see that the button works correctly..

What I have tried is to change the property to the below, but that condition always results in "true"

<div v-if="this.$refs.audioPlayer && !this.$refs.audioPlayer.isPlaying"

Many thanks for any pointers.
PS. I have also created a question on stackoverflow.

<template>
  <div v-if="this.$refs.audioPlayer && !this.$refs.audioPlayer.isPlaying" class="audio__play-start"  @click.stop="this.$refs.audioPlayer.play"><q-icon name="play_circle"></q-icon></div>
  <div v-else class="audio__play-pause" @click.stop="this.$refs.audioPlayer.pause"><q-icon name="pause_circle"></q-icon></div>
  
  <div>
    <audio-player
      ref="audioPlayer"
      :audio-list="audioList.map(elm => elm.url)"
      theme-color="black"
      :show-prev-button="false"
      :show-next-button="false"
      :show-play-button="false"
      :show-volume-button="false"
      :show-playback-rate="false"
    />
  </div>
</template>

<script lang="ts">

export default {
  data() {
    return { audioList: [{ name: 'audio1', url: 'rock.mp3'}]}
  },
}
</script>

能给进度条加个过渡效果吗

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

疑问

可以加个音量调节么?

Add "stop()" method

Hi,

would it please be possible to add a "stop()" method, which

  • stops playing
  • sets the progress to 0

Thank you

问题求解

自动播放音频列表时,遇到加载失败的文件,能够自动跳过播放下一条么,需要如何设置?

问题求解

图片
单击控制按钮(播放、暂停、上一首、下一首)控制台出现 Uncaught ReferenceError: s is not defined

格式化日期 没有显示小时

例如 mp3时长是 1:05:01 只会显示 05:01

原因是函数:
// 格式化秒为分
formatTime: function formatTime(second) {
return [parseInt(second / 60 % 60), parseInt(second % 60)].join(':').replace(/\b(\d)\b/g, '0$1');
},

我项目是vue引用的的。找不到引用的文件。不知道怎么修改这个函数。

在组件中使用的 如何批量暂停啊

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Cannot read properties of null (reading 'duration')

    onLoadedmetadata(event) {
      this.duration = this.$refs.audio.duration
      this.$emit('loadedmetadata', event)
 },

This event fires even after the player has been removed. This happens when view holding player gets unmounted, before the player loads media.

Is there some destroy method to be called upon unmount?

在组件中使用的 循环组件时如何批量暂停啊

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Could you please share an example how to use the "ended"-event?

Hi,

I've been trying to make use of the events, particularly the "ended" event.
I want to trigger a function (super simple example below) once the player has reached the end, but I cant figure out how to do it.

It would be great if you could share an example, potentially in the docs

    function triggerOnEnd() {
      console.log('Has ended')
    }

Changing currentTime turns back to original position.

I just want to change the currentTime value +-10 seconds using button click, I control the player through ref. But it returns back to the original position immediately. I just use this way, this.audioPlayer.currentTime += 10
All other methods work without any issue.

进度条

你好,我想问下这个进度条拖动要怎么引入那个touchemulator脚本?

ISO进度条兼容性

你好,ios手机端加载完播放器后,点击进度条,再点击播放,进度条会跳转到0,从0开始播放,请问可以调整为从当前点击位置开始播放吗?

iPhone: Operation not supported

On iPhone, I the player won't load. The console prints out below error.

I am not sure what to make out of it; happy to provide more details if you guide me what I shall provide

[Log] 为了解决 iOS 设备接口异步请求后出现无法播放问题,请无视 The play() request was interrupted by a call to pause() 错误 (index-zYvrgO69.js, line 5)
[Error] Unhandled Promise Rejection: NotSupportedError: The operation is not supported.
play
play (index-zYvrgO69.js:5:41164)
play
pt (index-zYvrgO69.js:1:12821)
$e (index-zYvrgO69.js:1:12900)
za (index-zYvrgO69.js:1:14893)
za
R (index-zYvrgO69.js:1:93301)
Y (index-zYvrgO69.js:1:97863)
pt (index-zYvrgO69.js:1:12821)
$e (index-zYvrgO69.js:1:12900)
n (index-zYvrgO69.js:1:59953)

小米手机兼容

你好,小米手机自带浏览器,拖动进度条时,会返回起点。。

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.