media-player

Android MediaPlayer error -1004 (ERROR_IO)

丶灬走出姿态 提交于 2020-01-13 13:09:17
问题 My application plays audio stream Here the code: MediaPlayer mediaPlayer = new MediaPlayer(); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaPlayer.setDataSource(url); mediaPlayer.prepare(); mediaPlayer.start(); url is local file (127.0.0.1) I use my own HttpServer which runs on the same phone. After call to mediaPlayer.prepare(); I get the error: error (1, -1004) which is ERROR_IO Any idea what is this error? Thanks, Costa. 回答1: the problem is php5 which sends a 500 http

Audio is not playing after stop serviec in Media player

北慕城南 提交于 2020-01-11 13:41:13
问题 Guys I am working on Audio module in my app so i have created on simple Audio demo with service. Its working up to Play - Pause - Playing in Background but issue is strange. Simply while launch app i have added two Buttons like Play/Pause (Will change caption according state) stop (To stop service) Now as i said my play-pause & Stop are working perfectly but when i try to play again audio after the click on stop its cause the problem in Start Error : 05-01 13:37:42.671: E/start(8096): java

MediaPlayer setDataSource need best practice advice

ぃ、小莉子 提交于 2020-01-11 08:31:09
问题 After reading "Media Playback" and "MediaPlayer" android documentations I'm still confused and need experienced advice about setDataSource overloaded method. I am using MediaPlayer in a Service component in my Project that is going to be a foregroundService while playing music. I have my music file(.mp3) in res/raw folder of my apk. To start playing, I know I have to prepare the MediaPlayer object. Because Services in android applications by default uses single process and main thread, I don

What is AwesomePlayer in android? [closed]

我与影子孤独终老i 提交于 2020-01-10 05:09:04
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I was looking at the logs on my device for one my apps, however, I see a lot of logs generated by AwesomePlayer. Is this the default media player used by apps that plays videos. I have no idea why this is coming up. Is this a default android app doing this? Below is a sample to see what it looks like. Device:

Clickable “positioning” hyperlinks to A/V (locally stored on your website and “hidden” behind a poster image)

对着背影说爱祢 提交于 2020-01-06 23:45:55
问题 Meta : This question is a follow-up, or a variant of a similar question about embedded Youtube videos: How to target "hidden" iframes? (application: links to starting positions of a "poster image hidden"-embedded Youtube video) Definitions: A "poster" image A customized image on which you click, to reveal the actual A/V player. Locally stored The A/V is stored on your website, as opposed to a streaming service such as Youtube. Clickable "positioning" hyperlinks When a certain hyperlink inside

Media Player in android Using MediaStore

跟風遠走 提交于 2020-01-06 18:09:27
问题 public class PlayerScreen extends AppCompatActivity implements SeekBar.OnSeekBarChangeListener { private MediaPlayer mp; private Button buttonplaypause; private int count; private SeekBar seekbar; private int curpos, prevpos; private Bundle b; private String title; private final Handler handler = new Handler(); private Runnable updatePositionRunnable = new Runnable() { public void run() { seekbar.setProgress(mp.getCurrentPosition()); handler.postDelayed(this, 6000); } }; @Override protected

media player in windows phone 7 displaying next song

扶醉桌前 提交于 2020-01-06 13:56:22
问题 I want to do something similar to the media player in windows phone 7 where the next several song is shown. What approach I would take to accomplish this? Example: previous song previous song CURRENT SONG next song next song my code currently like this: void MainPage_Loaded(object sender, RoutedEventArgs e) { List<string> songlist = new List<string>(); MediaLibrary library = new MediaLibrary(); mySongCollection = library.Songs; MediaPlayer.ActiveSongChanged += new EventHandler<EventArgs>

Delphi TrackBar On Stop

天涯浪子 提交于 2020-01-06 10:56:49
问题 I am making a basic music player and am using a TTrackBar as the progress in the song. As well I want to make it so u can drag the bar and fast forward the song. Currently I have an OnChange event with the following line: MediaPlayer1.position := TrackBar1.value... (with proper casting) but what happens is that it skips the song along as I drag making a choppy sound as it plays the song at certain random points along the way. What I really want is for when the user stops dragging the song

how to get a list of installed video players programmatically?

断了今生、忘了曾经 提交于 2020-01-06 08:33:06
问题 I know its similar to this question How to get a list of installed media players, but I am not able to get a list of installed players. Can someone help me on this? Intent intent = new Intent(Intent.ACTION_VIEW); Uri uri = Uri.withAppendedPath(MediaStore.Video.Media.INTERNAL_CONTENT_URI,"1"); intent.setData(uri); playerList = packageManager.queryIntentActivities(intent, 0); 回答1: Intent resolveIntent = new Intent(Intent.ACTION_VIEW); resolveIntent.setDataAndType(Uri.parse("file://"), MIMEType)

android playing two songs problem

杀马特。学长 韩版系。学妹 提交于 2020-01-06 05:57:33
问题 I have a problem playing audio files. when i entered two words like 'hi tom', only last word is playing. But in my log cat it seems to pass first word song. is my code wrong ? or is there any solution to here first song and then here second song? any solution is ok for me for example it can be lag between these songs. thanks. i saw musicdroid code also about nextsong. but i am new to android and i couldnt integrate my code.musicdroid public void function (String[][] word) { try{ for (int j=0