4,773 questions
-1
votes
0
answers
44
views
Blur overlay that works on top of PlayerView using android java or kotlin
So i have these 2 PlayerView one top one bottom and they are mirrored one on top have full scale then the bottom one is compressed to fill the bottom part. So i want a blurr overlay that will be on ...
0
votes
0
answers
74
views
Wrong video/audio briefly plays on flutter media_kit player before correct track starts in playlist
I'm using flutter media_kit 1.2.0 library in my project and the task is to put tracks into playlist and play one after another in schedule. Each video has own index so by schedule a bloc passes index ...
0
votes
1
answer
68
views
onBindViewHolder in Android recylerview is not called when update is triggered via setOnCompletionListener
I have been having a problem since quite some time and I have tried many things to understand and get rid of it without any success. Actually I am developing a music app with different songs that can ...
0
votes
0
answers
42
views
LargeIcon in a media notification appears extremely pixelated even though the bitmap/original album art is of good quality
When viewing my media notification the LargeIcon of the albumart is very pixelated. However Samsung Music's notification of the same albumart is of the correct resolution.
I've attached 4 images below ...
1
vote
1
answer
130
views
Playing media in the background and stop it when needed
I want to create an activity that includes an androidx.media3.ui.PlayerView. The player should play a video using a foreground service, allowing media playback to continue even when the app is ...
0
votes
0
answers
45
views
How can I make the video container take up the full screen when Android goes into full screen mode?
I am working on an Android project where I have a fragment that broadcasts a channel. I use media3.ui.player as VideoView. There is no problem in portrait mode, but when I switch to full screen mode, ...
0
votes
0
answers
81
views
Create MediaSessionService and customize Media Notification
I am making a music player Android App with Kotlin and building UI with Jetpack Compose, using ExoPlayer as the player. Currently I'm using Hilt to inject ExoPlayer directly into the ViewModel ...
0
votes
0
answers
122
views
Which permissions should we use when implementing a video player in 2025?
For example a popular VLC player app uses "Manage all files" permission (MANAGE_EXTERNAL_STORAGE).
It's not easy for other video player developers to use this permission and pass the review ...
0
votes
0
answers
64
views
Media3 android auto closes now playing screen when stream changes
I support different types of streams in the app. When a transition between streams happens while on the Now Playing screen, Android Auto closes the screen.
I migrated the app from legacy ExoPlayer to ...
0
votes
0
answers
81
views
Unexplained text on Android Auto screen
I'm working on a MP3 player for Android Auto and I noticed some debugging(?) text on the AA screen in the Windows Headunit. See the example in the screen shot below - "Step: 1, Template: ...
0
votes
0
answers
33
views
Android >31, how to send MediaPlayer through speaker, NO USER REQUIRED PERMISSIONS
I have the following code. When the alarm is triggered, if I have a bluetooth device connected, it will play on through bluetooth.
I have found an app that when playing an alarm, it plays through both ...
0
votes
1
answer
661
views
What does "Unable to match the desired swap behavior" mean when using the android.media.MediaPlayer.create() function?
I am using AIDE for Android, and have 2 java files (one is MainActivity.java, and the other is M4APlayer.Java).
During the onCreate() call, I have a text changed listener attached to an EditText ...
2
votes
0
answers
97
views
How to sync multiple Android media MusicPlayers with low latency
I’m developing an Android app that needs to play five audio tracks of a song simultaneously. I'm currently using the Android MediaPlayer package for playback. However, precise synchronization is ...
0
votes
1
answer
56
views
play temp file (created by combining raw flac files) in android app using mediaplayer
I have raw files named zero.flac , one.flac , ... , nine.flac
My app has minimum api 28 and I am using kotlin.
My app will take number input from user and read it sequentially
There will be option to ...
0
votes
1
answer
620
views
How to Play UDP Streams Using Media3 (ExoPlayer)?
I'm currently working on an Android app using the Media3 (ExoPlayer) library to stream video content. I've successfully implemented playback for HTTP streams, but I'm having trouble playing a UDP ...
0
votes
2
answers
62
views
Audio Won't Stop Playing When Using MediaPlayer In Andriod Studio
I've developed a simple Android application where you can play and stop audio using MediaPlayer. However the audio doesn't stop when requested to.
Here is a breakdown of the app. There are two buttons ...
1
vote
1
answer
56
views
Playing audio messages that come as cloudKey in mp4 format with mediaPlayer
This code is needed to implement MediaPlayer functionality. Since the project itself is multiplatform.
class AudioPlayerImp(private val client: HttpClient) : AudioPlayer {
private var mediaPlayer: ...
6
votes
0
answers
118
views
How to receive Bluetooth headset play/pause events when TextToSpeech.speak()?
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 ...
0
votes
0
answers
77
views
iOS mic audio recorded in MPEG4AAC does not play in Android
I am recording voice in my .net maui app in iOS using AVFoundation.AVAudioRecorder.
private AVAudioRecorder recorder;
...
{
var filePath = GetTempFilePath();
url = ...
0
votes
1
answer
842
views
React Native Expo - How to add media controls on lock screen without ejecting?
I am developing a mobile application for both Android & IOS which among other things it plays audio using expo-av. By changing some of the configuration variables it works even when the user locks ...
0
votes
1
answer
40
views
Android Studio : lost MediaButtonReceiver library
After I left my project development sleep for a while, I had to get back to it.
I'm stuck with the loss of MediaButtonReceiver library ...
It used to sit in
android.support.v4.media.session....
0
votes
1
answer
40
views
MediaMetadataRetriver's setDataSource always fails
retriever.setDataSource(context, uri)
This line of code keeps throwing exception:
could not access
android.resource:/data/user/0/ba.simovic.videoeditor/cache/editedVideo.mp4
I would get a video ...
1
vote
0
answers
462
views
How to Test if Video is Playing in Hardware or Software Mode in ExoPlayer
I want to implement the option to choose between hardware and software decoding in ExoPlayer based on user selection. I've implemented the following code:
private fun buildRenderersFactory(...
1
vote
1
answer
59
views
How can I get audio to loop on Android using android.media.MediaPlayer?
I've been trying for about 2 weeks now to get sound looping to work, but there seems to be an issue with every method I've been able to find. These are the things I've tried so far, as well as the ...
0
votes
2
answers
149
views
Android MediaPlayer SurfaceView video restarts on resume
Following is my code to play a video from an url
import androidx.appcompat.app.AppCompatActivity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.SurfaceHolder;
import ...
0
votes
0
answers
233
views
How do I detect if media3 item transition has been triggered from next or previous seek?
I have implemented media3 with MediaSessionService or my song player service and I am using MediaController for my UI side. In my service I also have implemented MediaSession.Callback().
val ...
0
votes
0
answers
48
views
Unable to Play any Audio File from Cached File - Media/Exo Player
I am trying to record the audio using MediaRecorder API of android and save the audio file in the cache directory of the app. The audio file gets saved perfectly into the cache dir and is working fine ...
0
votes
1
answer
174
views
Play small duration sound with MediaPlayer or SoundPool on button click
I have an android application written in Kotlin & jetpack compose. The application is running on a device with physical keyboard.
My goal is to play a sound every time I click a button.
Ideally, I ...
2
votes
1
answer
107
views
How to highlight the currently playing song in a RecyclerView after returning from another Activity in Android?
I am working on an Android app using Java, and I have a RecyclerView displaying a list of songs. When a song is selected, it starts playing, and the app navigates to a player Activity. After returning ...
0
votes
2
answers
65
views
How to get AMPLITUDE in Opus player android by using AudioManager or AudioTrack in Android
I'm using OpusPlayer to play an audio where I need to get the Amplitude.
we can get Amplitude if using MediaRecorder by mediaRecorder.getMaxAmplitude() but in OpusPlayer I'm only using audioManager ...
0
votes
1
answer
402
views
In Pixel 7 facing issue like cropping video with exoplayer when opening initially in portrait
In Android Jetpack Compose when using Exoplayer when an app is defaulted in portrait the time of opening the media player shows media with cropping. But the issue was resolved after switching to ...
0
votes
2
answers
36
views
How to run music using R.raw.music1 in another thread or background?
I want to run music in background or another thread not on main thread. when i continuedly click on button and call music method then start music without any delay and without freezing main Thread.
...
0
votes
1
answer
59
views
How to completely destroy Media Player on back pressed in an activity?
My problem is that I have used the MediaPlayer class in an activity to play music. The music is played online from a link, and I have used the prepareAsync method for audio. At the first time, the ...
0
votes
2
answers
150
views
How can I retrieve the current duration from the Media Player to display on the song progress bar?
I have tried every possible step but only giving value once, I want it should update every single second. This is my code, what am I doing wrong?
I want to implement progress slider for musics, can ...
2
votes
0
answers
288
views
ExoPlayer stops playing after empty playlist received with HLS
I'm using ExoPlayer in my Android app to play videos using HLS. Sometimes the server returns an empty playlist during playback (only headers without tracks). This happens quite rarely and subsequent ...
0
votes
1
answer
32
views
onCompletion(mp: MediaPlayer?) is unintentionally called after USB storage is connected
I am making Android application that displays contents that is copied from USB storage disk.
The problem is when USB storage disc is connected to device, Media Player onCompletion() is immediately ...
5
votes
1
answer
680
views
Android Media3: App launched from tapping media notification but extras from PendingIntent are not set
I would like to take the user directly to the player UI when the user taps on media notification. I see that app is launched (or brought to foreground) but intent extras are null and I cannot take the ...
1
vote
0
answers
31
views
Using MediaPlayer slows down SoundPool sound effect
I'm using MediaPlayer for background song and SoundPool for onButtonClick sound effects. I've noticed that while MediaPlayer playing background song SoundPool starts to give slow response for method ...
0
votes
1
answer
626
views
Media3 notification: How to update title dynamically during playback
I need to modify the title shown in the media notification based on the current playback position. According to the documentation, I can use MediaNotification.Provider however the document also says ...
0
votes
1
answer
292
views
Android Media3: How to split HLS stream into multiple mediaitems each with own range
I want to split an HLS audio stream into chapters and add them as a list of MediaItems to the Media3 player using MediaSessionService. I have this following code in MediaController.
From the ...
0
votes
0
answers
355
views
Unity VideoPlayer cannot play iPhones videos on Android
I am encountering an issue on Unity 2022.3.21f where I cannot seem to stream videos recorded by an iPhone on Android.
To isolate this problem, I create an empty Unity Project and add a VideoPlayer to ...
0
votes
0
answers
40
views
How to run Android MediaPlayer
I want to run Media Player.
How does the seekBar enhance user interaction in the provided Android media player application? Briefly explain its role in visualizing playback progress and facilitating ...
0
votes
1
answer
896
views
In Android Media3 MediaSessionService how to specify HLS streaming source
Apparently, we can set an HLS media source only to ExoPlayer and not to MediaController in the Activity/Composable. Is there way to pass URL and token to the service so that HLSMediaSource factory can ...
1
vote
1
answer
1k
views
Android Jetpack Compose Media3 HLS Stream with playback service
I would like to get HLS streaming working using Media3 with a background playback service. I see references online on how to use MediaController setMediaItem in the activity/composable, however, not ...
1
vote
2
answers
1k
views
Android Media3 (ExoPlayer): How to set defaultPositionUs of a Window in the Timeline?
I want to set default start positions of my playlist items (basically to resume from where the user left), to use when playlist item auto transitions to next item.
As per my understanding (I am not ...
0
votes
0
answers
51
views
MediaPlayer isn't equal to null, but I still get null pointer exception when I try to use it
I am making a music playing app in Android Java. I have a MediaPlayer object that is supposed to play the audio file selected in the default Android file chooser. This is how I am calling the file ...
1
vote
1
answer
522
views
PlaybackState "ACTION_STOP" not working in Android Auto Media App
i'm trying to build a media app for android auto. I have tried to build the app according to official documentation but i've missed/misunderstood some stuffs, probably. I've created a "Playable&...
0
votes
0
answers
81
views
Error in FlutterSoundPlayer: The getter 'onPlayerStateChange' isn't defined
"Error in Flutter when using flutter_sound: ^9.0.0 - The getter 'onPlayerStateChange' isn't defined for the type 'FlutterSoundPlayer'"
I am developing a Flutter application that utilizes ...
0
votes
1
answer
115
views
is it possible to pre-load a playlist from network with android mediaplayer?
I'm working on an app that involves listening to playlists of audio tracks that are loaded asynchronously from network. the issue here is using mediaplayer, i load (prepare) each audio track after the ...
3
votes
0
answers
477
views
How to trim video in jectpack compose with custom slider to select start and the end point in the video
I'm working on a project in compose and it requires trimming video. I have implemented the video trimming part but I having issues with creating the slider to select the starting and the ending point ...