diff --git a/Logotype.png b/Logotype.png index 6aba928..89e8bf5 100644 Binary files a/Logotype.png and b/Logotype.png differ diff --git a/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerService.java b/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerService.java index ca28dab..4f20988 100755 --- a/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerService.java +++ b/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerService.java @@ -4,6 +4,7 @@ import android.content.Intent; import android.content.res.AssetFileDescriptor; import android.media.MediaPlayer; +import android.media.AudioAttributes; import android.net.Uri; import android.os.Binder; import android.os.IBinder; @@ -40,6 +41,8 @@ public class JcPlayerService extends Service implements private List jcPlayerStatusListeners; private JcPlayerView.JcPlayerViewServiceListener notificationListener; private AssetFileDescriptor assetFileDescriptor = null; // For Asset and Raw file. + + private AudioAttributes stream; public class JcPlayerServiceBinder extends Binder { public JcPlayerService getService() { @@ -153,6 +156,12 @@ public void play(JcAudio jcAudio) { mediaPlayer = new MediaPlayer(); if (jcAudio.getOrigin() == Origin.URL) { + stream=new AudioAttributes + .Builder() + .setUsage(AudioAttributes.USAGE_MEDIA) + .setContentType(AudioAttributes.CONTENT_TYPE_MUSIC) + .build(); + mediaPlayer.setAudioAttributes(stream); mediaPlayer.setDataSource(jcAudio.getPath()); } else if (jcAudio.getOrigin() == Origin.RAW) { assetFileDescriptor = getApplicationContext().getResources().openRawResourceFd(Integer.parseInt(jcAudio.getPath())); diff --git a/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerView.java b/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerView.java old mode 100755 new mode 100644 index ff79156..96ddade --- a/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerView.java +++ b/jcplayer/src/main/java/com/example/jean/jcplayer/JcPlayerView.java @@ -584,4 +584,4 @@ public void registerStatusListener(JcPlayerViewStatusListener statusListener) { } } -} +} \ No newline at end of file diff --git a/jcplayer/src/main/res/drawable/bg_player_white.png b/jcplayer/src/main/res/drawable/bg_player_white.png index 351b004..403848c 100644 Binary files a/jcplayer/src/main/res/drawable/bg_player_white.png and b/jcplayer/src/main/res/drawable/bg_player_white.png differ diff --git a/jcplayer/src/main/res/drawable/ic_notification_default_black.png b/jcplayer/src/main/res/drawable/ic_notification_default_black.png index 60067fd..02459df 100644 Binary files a/jcplayer/src/main/res/drawable/ic_notification_default_black.png and b/jcplayer/src/main/res/drawable/ic_notification_default_black.png differ diff --git a/jcplayer/src/main/res/drawable/ic_notification_default_white.png b/jcplayer/src/main/res/drawable/ic_notification_default_white.png index 5ed867e..d25ebd0 100644 Binary files a/jcplayer/src/main/res/drawable/ic_notification_default_white.png and b/jcplayer/src/main/res/drawable/ic_notification_default_white.png differ diff --git a/jcplayer/src/main/res/drawable/icon.png b/jcplayer/src/main/res/drawable/icon.png index bfa42f0..796a35f 100644 Binary files a/jcplayer/src/main/res/drawable/icon.png and b/jcplayer/src/main/res/drawable/icon.png differ diff --git a/jcplayer/src/main/res/layout/view_jcplayer.xml b/jcplayer/src/main/res/layout/view_jcplayer.xml index 66d471e..6c54a8d 100644 --- a/jcplayer/src/main/res/layout/view_jcplayer.xml +++ b/jcplayer/src/main/res/layout/view_jcplayer.xml @@ -25,17 +25,18 @@ android:scrollHorizontally="true" android:textAlignment="center" android:textColor="@android:color/black" - android:textSize="16sp" + android:textSize="18sp" />