media-player

How do I create a custom media player to play a custom codec in Android?

跟風遠走 提交于 2021-02-05 20:28:31
问题 n00b here (first Android project). I have been given a custom video codec that has been integrated with an Android firmware build. It's an .so file containing a class that inherits from MediaPlayerInterface, as well as a custom MediaPlayerService implementation to return instances of the custom codec class from the create() factory function for the appropriate file types. I want to use this codec as part of a video player application that can be installed on phones that do not contain the

How to play a WPF Sound File resource

折月煮酒 提交于 2021-02-05 11:03:09
问题 I am trying to play a sound file in my WPF application. Currently I have the following call: private void PlaySound(string uriPath) { Uri uri = new Uri(@"pack://application:,,,/Media/movepoint.wav"); var player = new MediaPlayer(); player.Open(uri); player.Play(); } Now if I specify Media/movepoint.wav as build action Content and load it as a relative or absolute file path it works fine, so I suspect this has something to do with the Pack URI , but I cannot for the life of me figure out what.

Android mediaPlayer.getDuration() return 0 or -1

烈酒焚心 提交于 2021-02-05 09:23:07
问题 I am creating online media player where we are playing song with the help of URL . In Media Player we are displaying Total time of song, for displaying time we are using mediaPlayer.getDuration() function but it always returning -1 . When I am passing Drop Box URL then it working but when I pass my server URL (https://) then it not working. 2021-01-25 14:50:33.777 11438-11438/com.dd.xyz W/MediaPlayer: Use of stream types is deprecated for operations other than volume control 2021-01-25 14:50

Android 4.0.4 WebView MediaPlayer Error (1, -2147483648) Using <audio> Tag and Local Assets File

旧城冷巷雨未停 提交于 2021-02-04 17:52:53
问题 I'm new to Android and have been trying to get the HTML5 <audio> tag to work in a WebView browser but keep getting MediaPlayer Error (1, -2147483648). The file I'm trying to play resides below the "assets" directory. I've tried referencing a file in the "res/raw" directory, but with the same result. To verify that the files could be found and played, as part of my tests I created a variation of the code where the sound would be triggered through an <a> tag and would be processed by a

Android 4.0.4 WebView MediaPlayer Error (1, -2147483648) Using <audio> Tag and Local Assets File

≡放荡痞女 提交于 2021-02-04 17:52:49
问题 I'm new to Android and have been trying to get the HTML5 <audio> tag to work in a WebView browser but keep getting MediaPlayer Error (1, -2147483648). The file I'm trying to play resides below the "assets" directory. I've tried referencing a file in the "res/raw" directory, but with the same result. To verify that the files could be found and played, as part of my tests I created a variation of the code where the sound would be triggered through an <a> tag and would be processed by a

media player should stop on disconnecting headphone in my android app programatically

 ̄綄美尐妖づ 提交于 2021-02-04 12:41:05
问题 I have an issue in developing a media player application. I want it so that when I remove my headphone from my device then the MediaPlayer in my app pauses. 回答1: The Android documentation suggests using the AUDIO_BECOMING_NOISY intent filter Set the intent filter in your manafest and then: public class MusicIntentReceiver extends android.content.BroadcastReceiver { @Override public void onReceive(Context ctx, Intent intent) { if (intent.getAction().equals( android.media.AudioManager.ACTION

JavaFX : MediaException: MEDIA_UNSUPPORTED : media type not supported

。_饼干妹妹 提交于 2021-01-29 17:56:38
问题 I need to play the 3gp , mov and mp4 videos in the media player. Right now I am using JavaFx media player but it supports only mp4 videos. So what I can do to play the other two formats as well in this player or is there any other solution also available for this. Any help and suggestions please? jdk = 1.7 JavaFx: 2.1 回答1: Here is a list of JavaFX supported audio and video formats. For anything unsupported by JavaFX, you have the option of either converting them to another format or finding a

TMediaPlayer Error - Unsupported Media File

﹥>﹥吖頭↗ 提交于 2021-01-28 03:23:19
问题 I am trying to play a mp3 file from Firemonkey XE7 windows application. It should have been a simple task by putting a TMediaPlayer component, assigning it a .mp3 file, and just playing it. However, I get the following error: Application Error Exception EReadError in module MediaPlayerTest.exe at 00000000000012139E. Error reading MediaPlayer1.FileName: Unsupported media file testfile.mp3. I have also tried .wav, and it didn't work either. (Audio codec have already been installed and the media

How to stop all sounds in activity?

大憨熊 提交于 2021-01-28 01:25:41
问题 I have a lot of Mediaplayer sounds in my application acitvity and i have button to stop all sounds that are playing but its taking a lot of space and i want to know the code how to stop all the mediplayer sounds at same time not like this : sadegfqc.pause(); dsfsdf.pause(); sadfsadfsad.pause(); dsfg.pause(); htzh.pause(); nensmene.pause(); fdshs.pause(); gshtrhtr.pause(); hfshztjr.pause(); sgawg.pause(); And then i have to call all the creates of Mediaplayer with a source again. like this:

javaFX: MediaPlayer's seek method hangs the player without error message oder Status change

北城以北 提交于 2020-12-26 08:32:54
问题 I have a programm with 8 mediaplayer, which are controlled like one big video with a single set of controls. I have one Slider to control the time, aka I call all MediaPlayer's seek methods in onMouseReleased of the slider. My Problem is, the mediaplayer hang all the time, without changing their status or calling onError . When I put every seek in a new Thread, these problems disappear msot of the time, but not always and I'm gettign a lot of concurrency issues. Does anybody know the reason