5 messages in com.googlegroups.android-developers[android-developers] Re: mediaplayer| From | Sent On | Attachments |
|---|---|---|
| CherryMM | 22 Jul 2008 20:16 | |
| Fräntz Miccoli | 23 Jul 2008 01:37 | |
| rollbak | 23 Jul 2008 07:39 | |
| Fräntz Miccoli | 23 Jul 2008 08:18 | |
| CherryMM | 27 Jul 2008 22:28 |
| Subject: | [android-developers] Re: mediaplayer![]() |
|---|---|
| From: | Fräntz Miccoli (fran...@gmail.com) |
| Date: | 07/23/2008 08:18:26 AM |
| List: | com.googlegroups.android-developers |
What do you mean by "raw" ? Embeded in the app ? (sorry but i'm french, my english isn't perfect)
On 23 juil, 16:39, rollbak <roll...@gmail.com> wrote:
It can be possible to open content in raw format?
On Jul 23, 5:37 am, Fräntz Miccoli <fran...@gmail.com> wrote:
no need to install anything. My code :
mp = new MediaPlayer(); //sorry i've only played remote content mp.setDataSource("http://myurl"); //surfaceHolder is the surface is obtained by getHolder on the videoview component you use if you want to play video mp.setDisplay(surfaceHolder.getSurface());
mp.setOnPreparedListener(this);
mp.setAudioStreamType(AudioSystem.STREAM_MUSIC);
mp.prepareAsync();
Then you have instantiate your player and you are preparing it. After this do an onPrepared method : public void onPrepared(MediaPlayer mp) { mp.start();
}
Try to reuse it on your problem.
Bye
On 23 juil, 05:16, CherryMM <lsy2...@163.com> wrote:
The function "MediaPlayer.create(this,R.raw.cry)" can't play viedo files,my test file is in mp3. Why? Need to install anything ?
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to andr...@googlegroups.com To unsubscribe from this group, send email to andr...@googlegroups.com Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---




