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
39
votes
3 answers

Online radio streaming app for Android

I'm building an Android app that will stream several radio stations from a Latin Country, there is like 10 stations that I know can be played in android, I got the URL's from them and actually made them work using this tutorial (link removed,…
zvzej
  • 6,276
  • 7
  • 33
  • 41
38
votes
6 answers

Android - How to tell when MediaPlayer is buffering

I've got to be missing something obvious here, but I can't seem to find anything to allow me to determine when MediaPlayer is buffering audio. I'm streaming internet audio and I want to display a buffering indicator, but nothing I've tried allows…
Daniel
  • 1,151
  • 1
  • 9
  • 15
38
votes
6 answers

How to resume the mediaplayer?

I am using a media player. I have the option for starting ,stopping and pausing the player. The problem I have is that I cannot find the option to resume the song from the point that it previously was paused.. Any help provide would be really…
Prateek Raj
  • 3,966
  • 6
  • 39
  • 50
37
votes
8 answers

No Sound coming from Android Emulator

I ran my application and I can't get the sound working on the Android Emulator. I checked and enabled the audio playback boolean in the Eclipse AVD Manager. I also went into the sound options in the Android Emulator and put them up (no sound while…
user947659
  • 2,485
  • 4
  • 21
  • 24
37
votes
15 answers

Android MediaPlayer throwing "Prepare failed.: status=0x1" on 2.1, works on 2.2

I've been really banging my head against the table trying to get the MediaPlayer class to try to play h.264-encoded videos on Android 2.1. My code is rather simple: AssetFileDescriptor fileDescriptor =…
Nik Reiman
  • 39,067
  • 29
  • 104
  • 160
35
votes
2 answers

Video player lights out mode in Android using appcompat-v7

I'm porting a codebase from native Holo (Theme.Holo etc) to the appcompat-v7 (Theme.AppCompat and so on). The last section contains the tl;dr if you don't want to read the details. The issue Everything's working but I had issues replicating one…
35
votes
2 answers

Forcing Android to use RTSP/AVP/TCP interleaved

I am using Android 4.1.2 on Galaxy S3. Currently android mediaplayer always tries RTSP UDP (RTP/AVP/UDP) method to connect with RTSP server. If Android MediaPlayer does not receive the data on its UDP ports..it timesout and then tries RTSP TCP…
ext123
  • 351
  • 3
  • 3
34
votes
3 answers

Application threads vs Service threads

What are the advantages/disadvantages in placing a lengthy network access code in a thread in an activity or a thread in a service? How would it affect the application? I am writing a streaming audio player and from what I've read so far putting…
zerayaqob
  • 426
  • 1
  • 6
  • 12
33
votes
10 answers

Exception when calling setDataSource(FileDescriptor) method (failed.: status=0x80000000)

I'm developing a video streaming application and I'm getting stuck when calling set setDataSource with a FileDescriptor. I want my application to play the video as it is being downloaded, so once I get a minimum number of bytes, I move those bytes…
Pedriyoo
  • 1,259
  • 4
  • 16
  • 26
32
votes
2 answers

MediaPlayer.setDataSource causes IOException for valid file

This code used to work. Then, maybe I changed something, somewhere (or if I know Android right, an update introduced a bug in the media player). It stopped working on some devices! Especially my Nexus S (2.3.6). The file test.m4a (17 775 201 bytes)…
l33t
  • 18,692
  • 16
  • 103
  • 180
32
votes
3 answers

JavaFx Drag and Drop a file INTO a program

Hey there community I was wondering if is possible to create a program that allows for the user to Drag a file from anywhere on there hard drive (the desktop, documents folder, videos folder) and drop it into the window of the program. I am creating…
TheHoop
  • 365
  • 1
  • 3
  • 8
32
votes
6 answers

Android MediaPlayer Stop and Play

I'm creating Android application contains 2 buttons, on click on each button play a mp3 file. The problem is when I play button1 it plays sound1, when I click button2 it plays sound2. I check on each button the other player if it's working and I…
Mohammad Hammad
  • 491
  • 1
  • 5
  • 11
30
votes
4 answers

Play mp3 file from raw resource on click of a TextView

I want to play a certain mp3 file when a text is clicked. For example, I clicked the word "Nicholas", the app have to play nicholas.mp3. Sorry for my messy code, I'm new to android dev: package com.example.playword; import…
Kris
  • 3,709
  • 15
  • 50
  • 66
30
votes
7 answers

Dealing with video (DVDs, .avi .mkv) in Java

After looking around for a decent library for playing videos in Java, I've come unstuck. Everyone around is screaming not to use JMF because it's outdated, old and requires the user to install it, other alternatives such as VLCJ seem good if they…
Michael Berry
  • 70,193
  • 21
  • 157
  • 216
30
votes
4 answers

Android ExoPlayer : Does it solve gapless / seamless playback issue that is broken for the Android Media Player

Has anyone tried using ExoPlayer to achieve this? I tried looking online with no success. When I say gapless playback, I am referring to the problem of using the media player to play local videos back to back. After the first video is done…