Code Monkey home page Code Monkey logo

jcplayer's Introduction



A simple audio player for Android that you can plugin to your apps quickly get audio playback working.

New features

  • Raw files
  • Asset Files
  • Custom layout

Tested files

Not tested URLs

Support us

You can support us by becoming a patron on Patreon, any support is much appreciated.

Patreon

Gradle Dependency (Project level)

allprojects {
	repositories {
		jcenter()
	        maven { url "https://jitpack.io" }
	    }
	}

Gradle Dependency (Module level)

dependencies {
    // ... other dependencies
     implementation 'com.github.jeancsanchez:JcPlayer:{version}'
}

Getting Started

You only need a JcPlayerView on your Layout Activity/Fragment. All the controls and everything else are created by the player view itself.

<com.example.jean.jcplayer.view.JcPlayerView
    android:id="@+id/jcplayer"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

Code Setup

Find your JcPlayerView xml and...

    jcplayerView = (JcPlayerView) findViewById(R.id.jcplayerView);

Option 1: Just init a playlist

    ArrayList<JcAudio> jcAudios = new ArrayList<>();
    jcAudios.add(JcAudio.createFromURL("url audio","http://xxx/audio.mp3"));
    jcAudios.add(JcAudio.createFromAssets("Asset audio", "audio.mp3"));
    jcAudios.add(JcAudio.createFromRaw("Raw audio", R.raw.audio));

    jcplayerView.initPlaylist(jcAudios, null);

Option 2: Initialize an anonymous playlist with a default title for all

    jcplayerView.initAnonPlaylist(jcAudios);

Option 3: Initialize an playlist with a custom title for all

    jcplayerView.initWithTitlePlaylist(urls, "Awesome music");

Call the notification player where you want.

    jcplayerView.createNotification(); // default icon

OR

    jcplayerView.createNotification(R.drawable.myIcon); // Your icon resource

How can I get callbacks of player status?

    MyActivity implements JcPlayerManagerListener {
        ....
        jcplayerView.setJcPlayerManagerListener(this);
        // Just be happy :D
 }

Custom layout

You can customize the player layout by manipulating these attributes.

        app:next_icon
	app:next_icon_color
	app:pause_icon
	app:pause_icon_color
	app:play_icon
	app:play_icon_color
	app:previous_icon
	app:previous_icon_color
	app:progress_color
	app:random_icon_color
	app:repeat_icon
	app:repeat_icon_color
	app:seek_bar_color
	app:text_audio_current_duration_color
	app:text_audio_duration_color
	app:text_audio_title_color

Please, if you liked this project or help you to do your job, support me by being a sponsor <3

TODO LIST

  • Set custom layouts for player.
  • Add Instrumentation tests
  • Add unit tests.

jcplayer's People

Contributors

codacy-badger avatar irajul avatar jeancsanchez avatar joielechong 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jcplayer's Issues

Support local files

Right now, the library does not support local file storage. This, of course, should be a thing that is essential to such a library. Are there any plans on supporting this?

Is there any way to override the URL checker?

The music list not showing

First Problem : it just show the control (backward,forward,pause,duration and title)
There no music list like in your picture (awesome music 1, awesome music 2) based in my code, this should add "Another One Bities Of Dust","Be Starters","Gee,"Crazy Frogs" etc to the music list and show it right?

Second Problem: the music is played properly, but when i keep forward the audio, it just play till "Feel This Moment" 6 more audio are not added to the playlist, but in code , i added it, why?

My apk : https://ufile.io/0ycnh sorry if i upload here

code :
player = (JcPlayerView)findViewById(R.id.musicplayer);
ArrayList musicList = new ArrayList();
musicList.add(JcAudio.createFromURL("Another One Bities Of Dust","https://s1.vocaroo.com/media/download_temp/Vocaroo_s1zqcwflJjFT.mp3"));
musicList.add(JcAudio.createFromURL("Be Starters","https://s1.vocaroo.com/media/download_temp/Vocaroo_s1KMVtNBwtGW.mp3"));
musicList.add(JcAudio.createFromURL("Crazy Frogs","https://s1.vocaroo.com/media/download_temp/Vocaroo_s1IN5m15oEcu.mp3"));
musicList.add(JcAudio.createFromURL("Dance Of The Knights","https://s1.vocaroo.com/media/download_temp/Vocaroo_s1UtUmVB1Tl2.mp3"));
musicList.add(JcAudio.createFromURL("Dumags","https://s1.vocaroo.com/media/download_temp/Vocaroo_s1CcypsYOiS7.mp3"));
musicList.add(JcAudio.createFromURL("Feel This Moment","https://s1.vocaroo.com/media/download_temp/Vocaroo_s1AfxoRr8dk3.mp3"));
musicList.add(JcAudio.createFromURL("Flight Of The Bumblebee","https://s1.vocaroo.com/media/download_temp/Vocaroo_s15cjibddJl2.mp3"));
musicList.add(JcAudio.createFromURL("Game of Thrones","https://s1.vocaroo.com/media/download_temp/Vocaroo_s1srPoxtfSeA.mp3"));
musicList.add(JcAudio.createFromURL("Gee","https://s1.vocaroo.com/media/download_temp/Vocaroo_s14Lx19MsFxa.mp3"));
musicList.add(JcAudio.createFromURL("Growtopia Menu","https://s1.vocaroo.com/media/download_temp/Vocaroo_s1RU8xv4uosK.mp3"));
musicList.add(JcAudio.createFromURL("Here With You","https://s1.vocaroo.com/media/download_temp/Vocaroo_s1R52lycmdAp.mp3"));
musicList.add(JcAudio.createFromURL("Hey There Darlin","https://s1.vocaroo.com/media/download_temp/Vocaroo_s1qZzHc11Ybl.mp3"));
musicList.add(JcAudio.createFromURL("I Need Your Love","https://s1.vocaroo.com/media/download_temp/Vocaroo_s1AJ93YXmOnN.mp3"));
player.initWithTitlePlaylist(musicList,"Growtopia Music");

Unable to create Notification

Working perfectly, but I am not getting any notification while playing audio.

   `jcplayerView = (JcPlayerView) findViewById(R.id.jcplayer);

    String mp3 = getIntent().getStringExtra("content");
    String mp3_title = getIntent().getStringExtra("title");

    jcplayerView.createNotification(); // default icon

    ArrayList<JcAudio> jcAudios = new ArrayList<>();
    jcAudios.add(JcAudio.createFromURL(mp3_title, mp3));
    jcplayerView.initPlaylist(jcAudios);`

i will love to do copywriting for you

I love your application and would want to contribute to it, I'm not a developer but I am good at copywriting. I would love to make a copywrite for your Readme and make a pull request for you to merge. Your response would be highly appreciated. Also I would like to request if we could communicate either here or via email, so I don't have to create issues. Thank you.

Cache Audio from url, and play without internet

Hey there guys, I want to play audio files from the internet using jcplayer. I know it is possible with the function createFromURL() can anyone tell me how do I cache the song played from url and store it on the apps private cache, so that later I can retrieve it from the cache without internet connectivity.
This could be really useful to me to allow users to play songs without internet, once they have played/downloaded the song once when the are connected, later they can play without internet,

Doesn't detect JcAudio and JcService

I am using
compile 'io.github.jeancsanchez.jcplayer:jcplayer:0.0.2'
but even though my project detects Jcplayer, JcPlayerView,JcPlayer service it does not detects JCAudio Jcservice etc.

NullPointerException while trying to inflate UI component in xml

Adding the custom JcPlayerView to my project throws a nullpointerexception as it cannot inflate UI component. Here is the error.

Exception Details java.lang.NullPointerException   at com.example.jean.jcplayer.JcPlayerView.init(JcPlayerView.java:69)   at com.example.jean.jcplayer.JcPlayerView.(JcPlayerView.java:50)   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:835)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)   at android.view.LayoutInflater.inflate(LayoutInflater.java:515)   at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
...

Here is how I added the UI component:
<com.example.jean.jcplayer.JcPlayerView
android:id="@+id/reminder_media_player"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

crash if slide progress bar in case of empty playlist.

com.example.jean.jcplayer.JcPlayerService.seekTo(JcPlayerService.java:192) at com.example.jean.jcplayer.JcAudioPlayer.seekTo(JcAudioPlayer.java:166) at com.example.jean.jcplayer.JcPlayerView.onProgressChanged(JcPlayerView.java:403) at android.widget.SeekBar.onProgressRefresh(SeekBar.java:91) at android.widget.ProgressBar.doRefreshProgress(ProgressBar.java:660) at android.widget.ProgressBar.refreshProgress(ProgressBar.java:672) at android.widget.ProgressBar.setProgress(ProgressBar.java:719) at android.widget.AbsSeekBar.trackTouchEvent(AbsSeekBar.java:451) at android.widget.AbsSeekBar.onTouchEvent(AbsSeekBar.java:372) at android.view.View.dispatchTouchEvent(View.java:7713) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1917) at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2329) at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1568)

CallBacks?

Hello is there any callback for the list view ? like on long press click on the list ? thank you.

JcNotificationPlayer issues

1- TextView (txt_current_music_notification) marquee not working.
2- When I touch the pause button in the Player, the Pause icon on the Notification does not change to Play.

OnNextClick

is there a way to have OnNextClick() event ?
if you can add a random button,that will be nice.
and notification is deleted after the app is killed by the device.
Thank you it was a great job (y)

Behaviour when removing audio

I've test the code, it's working with removing the audio.

There is one question:
if we removing the current played audio, the player will still play the audio. From my perspective, player should play the next audio. But if the audio is the only audio in the playlist, player should stop itself. How do we address the problem?

Feature Request

It would be nice if the player also had two buttons for fast forward and back , that will set the current track a few seconds forward or backward

NOt see custom notification icon

When I use this jcplayerView.createNotification(R.drawable.myIcon); // Your icon resource
I only see a square with any icon, are there any restriction in the drawable??

Manifest merger failed

When i try to add compile 'io.github.jeancsanchez.jcplayer:jcplayer:0.0.2' it gives the following error
Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher_round) from AndroidManifest.xml:14:9-49 is also present at [io.github.jeancsanchez.jcplayer:jcplayer:0.0.2] AndroidManifest.xml:14:9-43 value=(@mipmap/ic_launcher). Suggestion: add 'tools:replace="android:icon"' to element at AndroidManifest.xml:11:5-65:19 to override.

In Latest versions its not working properly

Hi , i have some issue here , in 5.0 and above versions its not working.... it just loading ...finally getting not responding ...please give a solution
Thanks in advance

Attempt to invoke virtual method play on a null object reference

Hello,

I am testing your library with a simple code

    JcPlayerView jcplayerView = (JcPlayerView) findViewById(R.id.jcplayer);
    ArrayList<JcAudio> jcAudios = new ArrayList<>();
    jcAudios.add(JcAudio.createFromFilePath("Asset audio", "/sdcard/Download/"+audioname));
    jcplayerView.initPlaylist(jcAudios);

    jcplayerView.playAudio(jcplayerView.getMyPlaylist().get(0));

And if I comment out the last line, a player shows in the activity and works awesome. However if i leave the line uncommented I get Attempt to invoke virtual method 'void com.example.jean.jcplayer.JcPlayerService.play(com.example.jean.jcplayer.JcAudio)' on a null object reference. The object I am referencing is not null, I checked that. What I am trying to do here is to autoplay the audio. Any idea why this is so? I am writing here as it seems to be a bug.

BTW, love the library.

Very best regards.

Suggestion about using raw, assets, and file path for audio

I've tinkering with JcPlayer and success in implementing feature for raw, assets, and file path for the audio file. I'm using a pojo for categorizing each files based on its source. The pojo is like this:

public class FileAndOrigin {
   private String filePath;
   private Origin origin;
   ...
   // getter, setter, and constructor omitted.
}

where the Origin is an enum:

public enum Origin {
   URL, RAW, ASSETS, FILE_PATH
}

So, if we want to add the file we only need to do this:

ArrayList<FileAndOrigin> urls = new ArrayList<>();
urls.add(new FileAndOrigin("http://www.villopim.com.br/android/Music_01.mp3", Origin.URL));
urls.add(new FileAndOrigin("http://www.villopim.com.br/android/Music_02.mp3", Origin.URL));
urls.add(new FileAndOrigin(this.getFilesDir() + "/" + "13.mid", Origin.FILE_PATH));
urls.add(new FileAndOrigin("49.v4.mid", Origin.ASSET));
urls.add(new FileAndOrigin("56.mid", Origin.ASSET));
urls.add(new FileAndOrigin(String.valueOf(R.raw.a_203), Origin.RAW));
urls.add(new FileAndOrigin(String.valueOf(R.raw.a_34), Origin.RAW));
player.initWithPlaylist(urls, "Awesome music");

And in JcPlayerService, we only need to do a slight changes in play method (this is a rough change):

public void play(JcAudio jcAudio)  {
    this.currentJcAudio = jcAudio;

    try {
        if (mediaPlayer == null) {
            mediaPlayer = new MediaPlayer();

            if(jcAudio.getOrigin() == Origin.URL) {
                mediaPlayer.setDataSource(jcAudio.getUrl());
            } else if(jcAudio.getOrigin() == Origin.RAW) {
                AssetFileDescriptor afd = getApplicationContext().getResources().openRawResourceFd(Integer.parseInt(jcAudio.getUrl()));
                if (afd == null) return; // TODO: Should throw error.
                mediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
                afd.close();
            } else if(jcAudio.getOrigin() == Origin.ASSET) {
                AssetFileDescriptor afd = getApplicationContext().getAssets().openFd(jcAudio.getUrl());
                mediaPlayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getLength());
                afd.close();
            } else if(jcAudio.getOrigin() == Origin.FILE_PATH) {
                Log.d(TAG, "file://"+jcAudio.getUrl());
                mediaPlayer.setDataSource(getApplicationContext(), Uri.parse(jcAudio.getUrl()));
            }
            mediaPlayer.prepareAsync();

            mediaPlayer.setOnPreparedListener(this);
            mediaPlayer.setOnBufferingUpdateListener(this);
            mediaPlayer.setOnCompletionListener(this);
            mediaPlayer.setOnErrorListener(this);

        } else if (isPlaying) {
            stop();
            play(jcAudio);

        } else {
            mediaPlayer.start();
            isPlaying = true;

            if(jcPlayerServiceListener != null)
                jcPlayerServiceListener.onContinueAudio();
        }
    }catch (IOException e){
        e.printStackTrace();
    }

    updateTimeAudio();
    jcPlayerServiceListener.onPlaying();

    if(notificationListener != null)
        notificationListener.onPlaying();
}

This is working currently.

But, Is it a good design for JcPlayer?

Can not build project

It looks like that file names have the different register than class names:

/private/var/folders/3k/mymj0cx15f9c3m0kv4gch66h0000gn/T/1479061516586-0/src/JcPlayer-master/jcplayer/src/main/java/com/example/jean/jcplayer/JCAudio.java:9: error: class JcAudio is public, should be declared in a file named JcAudio.java
public class JcAudio implements Serializable {
       ^
/private/var/folders/3k/mymj0cx15f9c3m0kv4gch66h0000gn/T/1479061516586-0/src/JcPlayer-master/jcplayer/src/main/java/com/example/jean/jcplayer/JCAudioPlayer.java:18: error: class JcAudioPlayer is public, should be declared in a file named JcAudioPlayer.java
public class JcAudioPlayer {
       ^
/private/var/folders/3k/mymj0cx15f9c3m0kv4gch66h0000gn/T/1479061516586-0/src/JcPlayer-master/jcplayer/src/main/java/com/example/jean/jcplayer/JCNotificationPlayer.java:16: error: class JcNotificationPlayer is public, should be declared in a file named JcNotificationPlayer.java
public class JcNotificationPlayer implements JcPlayerService.JCPlayerServiceListener{
       ^
/private/var/folders/3k/mymj0cx15f9c3m0kv4gch66h0000gn/T/1479061516586-0/src/JcPlayer-master/jcplayer/src/main/java/com/example/jean/jcplayer/JCPlayerNotificationReceiver.java:9: error: class JcPlayerNotificationReceiver is public, should be declared in a file named JcPlayerNotificationReceiver.java
public class JcPlayerNotificationReceiver extends BroadcastReceiver {
       ^
/private/var/folders/3k/mymj0cx15f9c3m0kv4gch66h0000gn/T/1479061516586-0/src/JcPlayer-master/jcplayer/src/main/java/com/example/jean/jcplayer/JCPlayerService.java:12: error: class JcPlayerService is public, should be declared in a file named JcPlayerService.java
public class JcPlayerService extends Service implements
       ^
/private/var/folders/3k/mymj0cx15f9c3m0kv4gch66h0000gn/T/1479061516586-0/src/JcPlayer-master/jcplayer/src/main/java/com/example/jean/jcplayer/JCPlayerView.java:23: error: class JcPlayerView is public, should be declared in a file named JcPlayerView.java
public class JcPlayerView extends LinearLayout implements

Remove Notification when App is killed

I am creating notification in onStop but when user killed the app, notification still exist and causes a crash if you click it. is it possible to remove notification when app is killed?

    @Override
    protected void onStop() {
        super.onStop();
        // Create notification
        jcplayerView.createNotification();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        // Destroy notification
    }

Crash

12-27 17:11:56.020 E/AndroidRuntime(24331): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.animation.AnimatorCompatHelper" on path: DexPathList[[zip file "/data/app/org.redeagle.gtmusic-1/base.apk"],nativeLibraryDirectories=[/data/app/org.redeagle.gtmusic-1/lib/arm64, /system/lib64, /vendor/lib64]]

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.inc.musyc.musyc/com.inc.musyc.musyc.SinglePostViewActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.example.jean.jcplayer.JcPlayerView.initPlaylist(java.util.List)' on a null object reference

jcplayerView = (JcPlayerView) findViewById(R.id.singlepost_player);
        ArrayList<JcAudio> jcAudios = new ArrayList<>();
        jcAudios.add(JcAudio.createFromURL("url audio","https://firebasestorage.googleapis.com/v0/b/musyc-f264f.appspot.com/o/Karone-Okarone-Minar-Rahman-Official-Music-Video-Eagle-Music.mp3?alt=media&token=a40ed28a-2970-4160-ac1d-33881e34253a"));
        jcplayerView.initPlaylist(jcAudios);

player.kill() method does not clear notification

When I kill the app it should clear the notification unfortunately does not; the app destroyed but the notification still shown, when I click one of its buttons (previous, pause/play or next) the app raises an NullExceptionError on jcPlayerNotificationReceiver.java here

Info:
-I test it on Android 7.0
-App's configuration still as its in this library (not changed).

Any suggestion that can help fix the issue!

soundpool

Can you add soundpool to play simple sounds gapless to JcPlayer2. Mediaplayer class make gap in looping

Question on the updateProgress in AudioAdapter Class from the Sample App

I have been trying out the sample app and checking it out and trying to help as much as I can,
I have a question @jeancsanchez What does the updateProgress() function in line 98 inside the AudioAdapater class do in the Sample App?

for Your Reference I have pasted the function below:

public void updateProgress(JcAudio jcAudio, float progress) {
int position = jcAudioList.indexOf(jcAudio);
Log.d(TAG, "Progress = " + progress);
progressMap.put(position, progress);
if(progressMap.size() > 1) {
for(int i = 0; i < progressMap.size(); i++) {
if(progressMap.keyAt(i) != position) {
Log.d(TAG, "KeyAt(" + i + ") = " + progressMap.keyAt(i));
notifyItemChanged(progressMap.keyAt(i));
progressMap.delete(progressMap.keyAt(i));
}
}
}
notifyItemChanged(position);
}

Truncated in audio file title.

Thank you for your very useful library.
I saw that the audio title is truncated by progress bar. How can I fix this issue?
You can see more detail in the picture below:

20180224_113111

How to set the same title from recyclerview in player .?

Dear, First of all im thanking u so much for this awesome music player, u saved my time alot .
but i have a small doubt .
i have an arraylist of urls and titles. I am able to show the whole title in RecyclerView.
But,How can i show the selected title from recyclerview as the player header.

device-2016-11-18-113049

dependency version

thank you for this
but could you plz update the dependency version and instead of {version} write number version
now i dont know what is the version so could you help me ?

MediaPlayer error

Getting
E/MediaPlayer: Should have subtitle controller already set
and
AudioFeedActivity has leaked ServiceConnection com.example.jean.jcplayer.JcAudioPlayer$1@422d1740 that was originally bound here

while exiting from the app

Error when click Previous button

I try to click previous button before play and then i got a force close

java.lang.NullPointerException: Attempt to invoke virtual method 'long com.example.jean.jcplayer.JcAudio.getId()' on a null object reference
at com.example.jean.jcplayer.JcAudioPlayer.updatePositionAudioList(JcAudioPlayer.java:197)
at com.example.jean.jcplayer.JcAudioPlayer.previousAudio(JcAudioPlayer.java:154)
at com.example.jean.jcplayer.JcPlayerView.previous(JcPlayerView.java:403)
at com.example.jean.jcplayer.JcPlayerView.onClick(JcPlayerView.java:436)
at android.view.View.performClick(View.java:5610)
at android.view.View$PerformClick.run(View.java:22277)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:159)
at android.app.ActivityThread.main(ActivityThread.java:6097)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

cant add it to dependencies

hello thanks for this cool music player
i really cant add it to dependencies
compile 'io.github.jeancsanchez.jcplayer:jcplayer:{version}'
when i set 0.0.2 instead of {version} it fails
and the same when i set it to 3.3
please create another new simple project with clear dependencies

Failed to Reslove dependency ?

Hello,

Thank you for the wonderful Project at least its not complicated as the others.. just the project i needed,
i have a problem when i add the dependency to my android gradle it fails to resolve, thank you
i'm using:
compile 'io.github.jeancsanchez.jcplayer:jcplayer:2.0.3-alpha'

Error on intiPlaylist and play next

W/System.err: java.lang.IndexOutOfBoundsException: Index: 9, Size: 9
W/System.err: at java.util.ArrayList.get(ArrayList.java:411)
W/System.err: at com.example.jean.jcplayer.JcAudioPlayer.nextAudio(JcAudioPlayer.java:95)
W/System.err: at com.example.jean.jcplayer.JcPlayerView.next(JcPlayerView.java:161)
W/System.err: at com.example.jean.jcplayer.JcPlayerView.onClick(JcPlayerView.java:213)
W/System.err: at android.view.View.performClick(View.java:5637)
W/System.err: at android.view.View$PerformClick.run(View.java:22429)
W/System.err: at android.os.Handler.handleCallback(Handler.java:751)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
W/System.err: at android.os.Looper.loop(Looper.java:154)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6119)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

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.