android-mediaplayer Questions
1
I am building a video player android application where I need to play 2(maybe 4) live streams at the same time in the same view.
Is it possible using a single exoplayer instance? If yes, please su...
Caerleon asked 4/6, 2021 at 10:20
0
I am trying to handle the pause/play button from a Bluetooth headset (e.g. Jabra Elite 7 Pro) by simply logging into Logcat a message whenever it is pressed. The “twist” is that this is during Text...
Odometer asked 17/9 at 7:51
3
Solved
I am using the latest Android Media3 library, but I found a problem in using it...
I created a MediaSessionService, and then got the MediaController in the Activity, and then when I tried to call t...
Medellin asked 24/11, 2021 at 13:11
1
The only difference I notice is that, if I call prepare() before play(), I will see the the process indicator and it pre-loads data in the PlayerView, besides that I can't tell the difference if I ...
Cartography asked 30/3, 2021 at 12:45
22
Solved
I'm trying to update my application to Android SDK 31 but I'm having an issue with MediaSessionCompat.
I have a MediaService that extends the MediaBrowserServiceCompat() and in method onCreate of t...
Sirois asked 21/7, 2021 at 16:51
3
Solved
I have a MediaPlayer in a Fragment which retains its instance on configuration changes. The player is playing a video loaded from my assets directory. I have the scenario set up with the goal of re...
Aldin asked 1/10, 2013 at 0:46
2
I am trying to play sound on speaker even if headphones are on, BUT if there is music playing in background, I want the music to be played on headphones until the sound is played.
So I am taking ...
Suchlike asked 6/12, 2017 at 14:41
2
Solved
I'm following this tutorial, but the usage of prepareAsync is not clear and my code does not output any audio. I'm using prepareAsync() because my mp3 is online and I don't want to lock the activit...
Claudette asked 26/4, 2014 at 10:55
4
Solved
I have a soundboard like app. I don't want the sound to stop even if the user clicks another sound. But, after a while, like 30 clicks (sound players), it stops. I think it runs out of memory or An...
Knavish asked 3/3, 2013 at 18:13
1
How to implement MediaSessionService and build a very simple audioplayback app with media3? I tried it, but unsuccessfully. I also couldn't find a simple documentation...
Arneson asked 9/6, 2022 at 12:45
5
I know there are already a few questions like this on SO, but they relate to extracting the file before playing it.
In the Android docs here it explains that you can play files directly from a .zi...
Lundy asked 24/2, 2013 at 19:36
13
Solved
How do I get a button to play a sound from raw when click? I just created a button with id button1, but whatever code I write, all is wrong.
import android.media.MediaPlayer;
public class BasicSc...
Farseeing asked 27/8, 2013 at 7:8
5
MediaPlayer.isPlaying() does not allow to know if the MediaPlayer is stopped or paused. How to know if it is paused and not stopped?
Thanks !
Instrument asked 4/3, 2014 at 9:25
7
Solved
After trying multiple ways of playing m3u8 files using videoview and mediaplayer I decided to give up. Everytime i play the m3u8 file I only hear the voice.(please dont write urls from stack overfl...
Postbox asked 14/7, 2015 at 22:0
6
Solved
I am using Android's MediaPlayer to set up a URL stream in my application. I have tried several different posts to deal with the exit code and error: (1, -2147483648).
I have attempted several di...
Cadence asked 2/4, 2019 at 16:31
2
Solved
Hi i am doing audio recording its throwing me an error.
i am not able to figure it out can some one help me.
2021-01-24 19:21:53.708 4661-4661/com.koteswara.mediarecordersample E/libc: Access denie...
Cryostat asked 24/1, 2021 at 14:1
2
Solved
I'm writing an audio player for short audio duration (typically 1-5 seconds) as following
//start media player
mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource(context, Uri.fromFile(audi...
Gnaw asked 3/4, 2017 at 14:18
7
Solved
I am able to play a local mp3 if I use the static method MediaPlayer.create(context, id) but it's not working if I use the non-static method MediaPlayer.setDataSource(String). What's happening is t...
Codex asked 12/10, 2015 at 16:55
7
Solved
I'm using MediaPlayer to stream a radio over HTTP. On Lollipop my stream takes about a minute to start which is unacceptable. It takes about 20 seconds on Kitkat, which is already a pain but now be...
Rickyrico asked 3/4, 2015 at 13:6
4
Solved
In one screen I have a looping background video (upon which normal UI elements are shown), implemented with VideoView like this:
String resPath = "android.resource://" + getPackageName() + "/" + ...
Skirret asked 26/3, 2015 at 13:50
1
Solved
I'm trying to implement the Android Media3 MediaSessionService and MediaController but for some reason the playback doesn't start. What am I doing wrong? I think I did everything exactly as describ...
Eating asked 11/10, 2022 at 23:59
3
Solved
I have an app that launches a foreground service to play some media and I want to be able to control it with media buttons on smart watches/headphones and control it from a mediastyle notification ...
Xerarch asked 20/10, 2019 at 10:11
3
Solved
I have created one application to record audio using native mediaPlayer, converting this audio file into base64 data, passing this in html5 audio tag as below,
File file = new File(Environment.get...
Interrogatory asked 18/10, 2012 at 9:31
1
Running Xlint:deprecated in android studio on my (java) application tells me that
mediaRecorder = new MediaRecorder();
is deprecated!
What should I do?
Legit asked 4/9, 2022 at 9:21
7
Solved
My xml file:
<SurfaceView
android:id="@+id/surfaceView"
android:layout_marginTop="50dp"
android:layout_width="fill_parent"
android:layout_height="300dp" />
My function to setDisplay:
...
Offer asked 24/4, 2013 at 14:41
1 Next >
© 2022 - 2024 — McMap. All rights reserved.