Questions tagged [media-player]

Software or hardware device designed to play audio/video files.

Media player is a term typically used to describe computer software for playing back multimedia files. While many media players can play both audio and video, others focus only on one media type or the other. Such players are known as either audio players or video players and often have a user interface tailored for the specific media type.

Used in two main senses:

  1. A program that enables your computer to record, store and play back audio and video recordings.
  2. A device such as the portable iPod media player that is also used to record, store and play back recordings.
3940 questions
91
votes
13 answers

Android MediaPlayer error (1, -2147483648)

I have two different videos which I'm trying to load into a VideoView using videoView.setVideoURI(Uri.parse(url)); The two videos, let them be video 1 and video 2, have the following specs (extracted using ffmpeg -i); in fact, they are two…
Ayberk Özgür
  • 4,986
  • 4
  • 38
  • 58
75
votes
2 answers

Android: mediaplayer went away with unhandled events

I need to get the duration of an audio file for a series of voice announcements that need to play from an app. I have added the audio files as resources and they do play just fine. The sample code below actually works perfect for its intended…
Hephaestus
  • 4,337
  • 5
  • 35
  • 48
69
votes
17 answers

android mediaRecorder.setAudioSource failed

I have android G1 firmware 1.6, I am trying to record voice from the app with the follow code. MediaRecorder recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); …
user121196
  • 30,032
  • 57
  • 148
  • 198
66
votes
6 answers

Stopping & starting music on incoming calls

I have implemented an activity that plays media from a URL in Android. In order to add pause functionality when a call is incoming I created a receiver that sets a variable when the call is coming. The activity reads this variable in onPause(),…
user669231
  • 1,371
  • 3
  • 18
  • 27
65
votes
2 answers

AVPlayer HLS live stream level meter (Display FFT Data)

I'm using AVPlayer for a radio app using HTTP live streaming. Now I want to implement a level meter for that audio stream. The very best would a level meter showing the different frequencies, but a simple left / right solution would be a great…
Julian F. Weinert
  • 7,474
  • 7
  • 59
  • 107
64
votes
5 answers

how to play audio file in android

I have a mp3 file in my android mobile, lets it's a xyz.mp3 somewhere in my sdcard. How to play it through my application?
dIvYaNsH sInGh
  • 1,943
  • 3
  • 21
  • 40
64
votes
11 answers

Android: MediaPlayer setVolume function

about the params Set what to make the player no sound and full sound Thanks
Qing
  • 3,029
  • 7
  • 25
  • 31
61
votes
9 answers

iPhone SDK:How do you play video inside a view? Rather than fullscreen

I am trying to play video inside a UIView, so my first step was to add a class for that view and start playing a movie in it using this code: - (IBAction)movie:(id)sender{ NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath =…
Sam
  • 1,343
  • 5
  • 18
  • 30
54
votes
2 answers

How do I turn the system volume overlay back on after using MPVolumeView?

I'm building an audio player for a non-native sound format. The application's hierarchy is based on the iPod.app. It has a number of UITableView's and one UIView (TrackView) that uses an MPVolumeView to allow the user to change the volume onscreen.…
Shaun Inman
  • 1,968
  • 1
  • 19
  • 28
51
votes
11 answers

Passing parameters on button action:@selector

I want to pass the movie url from my dynamically generated button to MediaPlayer: [button addTarget:self action:@selector(buttonPressed:) withObject:[speakers_mp4 objectAtIndex:[indexPath row]] forControlEvents:UIControlEventTouchUpInside]; but…
Pascal Bayer
  • 2,615
  • 8
  • 33
  • 51
47
votes
5 answers

Listener (or handler) for video finish

I have implement the following code in order to test playing a video from a remote web server through it´s URL. videoView = (VideoView)this.findViewById(R.id.videoView); MediaController mc = new…
Rui Gonçalves
  • 2,423
  • 6
  • 30
  • 42
46
votes
10 answers

Android : How to set MediaPlayer volume programmatically?

How to set the mediaplayer volume programmatically. I use it for alarm notification. Any help is highly appreciated and thanks in advance.
Pattabi Raman
  • 5,814
  • 10
  • 39
  • 60
42
votes
4 answers

Android Media Stream Error? java.io.FileNotFoundException: No content provider :http://

I followed this to Play Stream Radio In android Here Its working Fine But Player Loading Bit Slow after clicking I need to wait for 30+ seconds time But I am getting This error In console MediaPlayer: setDataSource IOException happend :…
Whats Going On
  • 1,379
  • 6
  • 20
  • 49
41
votes
8 answers

How to play the audio files directly from res/raw folder?

I have multiple audio files in res/raw folder. I showing ListView that contains audio files name. I want to play the corresponding audio file when user select into the ListView. I have used setDataSource(path), but it showing error while playing.…
bharath
  • 14,283
  • 16
  • 57
  • 95
40
votes
5 answers

AudioTrack, SoundPool or MediaPlayer, which should I use?

Should I use AudioTrack, SoundPool or MediaPlayer if I need to be able to: play multiple audio files, with different duration, like 5 to 30 seconds. set the volume independently for right / left channel. apply sound effects, like reverb /…
Fede
  • 1,656
  • 4
  • 24
  • 42
1
2 3
99 100