This commit is contained in:
2022-06-14 23:31:43 +02:00
parent 3b5c49e078
commit 2d1f2aaeb2
2 changed files with 7 additions and 7 deletions

View File

@@ -175,7 +175,7 @@ public class MainActivity extends AppCompatActivity {
return true;
case R.id.live:
liveRadio("https://live.radiomercure.fr/on-air/live");
lectureAudio("https://live.radiomercure.fr/on-air/live");
/* Intent playerIntent = new Intent(this, MediaPlayerService.class);
startService(playerIntent);
@@ -216,11 +216,11 @@ public class MainActivity extends AppCompatActivity {
}
};
private void liveRadio(String StreamUrl) {
private void lectureAudio(String chemin) {
//Check is service is active
if (!serviceBound) {
Intent playerIntent = new Intent(this, MediaPlayerService.class);
playerIntent.putExtra("stream_url",StreamUrl);
playerIntent.putExtra("media",chemin);
startService(playerIntent);
bindService(playerIntent, serviceConnection, Context.BIND_AUTO_CREATE);
} else {