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

it doesn't work with local audio files, #209

Open
garalimedkarim opened this issue Dec 20, 2018 · 1 comment
Open

it doesn't work with local audio files, #209

garalimedkarim opened this issue Dec 20, 2018 · 1 comment

Comments

@garalimedkarim
Copy link

garalimedkarim commented Dec 20, 2018

Hello everybody,

I'm working with this plugin on both remote and local audio files, So I propose to my user to download the file if he loves it, but for file downloaded locally it doesn't work, the play button appears on grey whereas the remote tracks are in black colors,

I take your same tracks arrray, I just added my local file,

    this.myTracks = [{
      src: 'https://archive.org/download/JM2013-10-05.flac16/V0/jm2013-10-05-t12-MP3-V0.mp3',
      artist: 'John Mayer',
      title: 'Why Georgia',
      art: 'img/johnmayer.jpg',
      preload: 'metadata' // tell the plugin to preload metadata such as duration for this track, set to 'none' to turn off
    },
    {
      src: 'https://archive.org/download/JM2013-10-05.flac16/V0/jm2013-10-05-t30-MP3-V0.mp3',
      artist: 'John Mayer',
      title: 'Who Says',
      art: 'img/johnmayer.jpg',
      preload: 'metadata' // tell the plugin to preload metadata such as duration for this track,  set to 'none' to turn off
    },
    {
      src: this.file.externalRootDirectory+"AwesomePlaces/file.mp3",
      artist: 'Karim Garali',
      title: 'Allhomma yasser ya rabb',
      art: 'img/johnmayer.jpg',
      preload: 'metadata' // tell the plugin to preload metadata such as duration for this track,  set to 'none' to turn off
    }]

at the view, I've printed the src to verify my path and it's OK:


{{file.externalRootDirectory+"AwesomePlaces/file.mp3"}}

output: file:///storage/emulated/0/AwesomePlaces/file.mp3"

All what attach me to your plugin is the progress bar option, otherwise, I will be moved to another solution, So Thank you for this Job and I hope you answer me about my issue,
Can I play file locally stored with your plugin ?

@garalimedkarim garalimedkarim changed the title it doesn't work with local files, it doesn't work with local audio files, Dec 20, 2018
@rdai
Copy link

rdai commented Dec 22, 2018

Yes, it works with a local file. Is it a permission issue? Try play with different path listed here: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/

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

2 participants