-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Video and Audio Playback and Recording
In Android apps, there are often cases where we need to play audio or video files. Checking the Supported Media Formats we can see that several audio formats (MP3, AAC, FLAC, Vorbis) and several video formats (H.264, MPEG-4) are playable by default. Let's take a look at how to play media within an app using MediaPlayer and VideoView. We will also look at how to record or capture media with the MediaRecorder.
Needs Attention, Cliffnotes Here
In this section we will take a look at how to play audio content using the MediaPlayer and capture audio with the MediaRecorder.
...
...
...
In this section we will take a look at how to play video content using the VideoView and capture video with the MediaRecorder.
...
...
...
There are a few ways of video playback on the android device. Most of which include downloading the content to the device for playback. If you want to stream a video from a network hosted source. the youtube api gives you the ability to do so using their provided 3gp stream. The provided YouTube Android Player API allows you to do so with very little code.
- http://mrbool.com/how-to-play-video-formats-in-android-using-videoview/28299
- http://developer.android.com/guide/topics/media/mediaplayer.html
- http://developer.android.com/training/managing-audio/index.html
- http://developer.android.com/guide/appendix/media-formats.html
- https://developers.google.com/youtube/android/player/
- http://www.vogella.com/tutorials/AndroidMedia/article.html
- http://developer.android.com/guide/topics/media/audio-capture.html
- http://www.tutorialspoint.com/android/android_audio_capture.htm
- http://www.androidhive.info/2012/03/android-building-audio-player-tutorial/
- http://www.edumobile.org/android/android-beginner-tutorials/how-to-play-a-video-file/
- http://www.androidbegin.com/tutorial/android-video-streaming-videoview-tutorial/
Created by CodePath with much help from the community. Contributed content licensed under cc-wiki with attribution required. You are free to remix and reuse, as long as you attribute and use a similar license.
Finding these guides helpful?
We need help from the broader community to improve these guides, add new topics and keep the topics up-to-date. See our contribution guidelines here and our topic issues list for great ways to help out.
Check these same guides through our standalone viewer for a better browsing experience and an improved search. Follow us on twitter @codepath for access to more useful Android development resources.