media-player

How to stream authenticated content with MediaPlayer on Android

佐手、 提交于 2019-12-21 03:34:29
问题 I've seen quite a few posts asking this question on SO but there doesn't seem to be a definitive answer (or at least an answer I like!) I've got content protected behind basic auth (username/password) -- I can download it fine using the various HTTP download clases but for the life of me I can't sort out how to tell media player to stream it (and provide the authentication). I saw one post that suggested it wasn't possible since the MediaPlayer is all native code and doesn't things like the

Progress Bar while media player is preparing

喜欢而已 提交于 2019-12-21 02:52:12
问题 I am trying to figure out how to have a progress bar that says "Loading. Please Wait..." while my media player prepares a streaming file. What occurs now is that it displays after the song is prepared. how can i fix this? mediaPlayerLoadingBar =ProgressDialog.show(PlaylistActivity.this, "", "Loading. Please wait...", true); /*dubstep stream*/ try { dubstepMediaPlayer.setDataSource(dubstepPlaylistString[0]); dubstepMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); dubstepMediaPlayer

AudioContext panning audio of playing media

人盡茶涼 提交于 2019-12-21 01:23:05
问题 I wonder if is there a way to pan the audio of a video with JavaScript. The same way you can adjust volume, I need to pan an stereo audio left to right or right to left. This feature would be useful for multilingual events where you can produce a video in two languages using stereo, for instance, pan english audio to left and german translation to right. Then the player could transform the stereo track into mono muting one of the languages depending on user election. I already implemented

Overriding MPNowPlayingInfoCenter while using WKWebView

扶醉桌前 提交于 2019-12-20 20:26:46
问题 I am trying to create a multi-source music player with tracks coming from YouTube and Soundcloud, and I would like to override the content of MPNowPlayingInfoCenter to provide informations about the artists/releases instead of the name of the YouTube video. Everything worked well when I used UIWebview, but for performance reasons, I had to switch to the new WKWebview and now the method I used before to set the nowPlayingInfos has no effect Is there a way to disable the automatic mapping of

mp3 player in HTML website [closed]

北城余情 提交于 2019-12-20 17:15:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I want insert a simple mp3 player into my website. The Mp3 player must have just 2 buttons (play and pause). I found this: http://www.schillmania.com/projects/soundmanager2/ and it seems nice but I could not make it have those two buttons. Can anyone help me find a way to insert an mp3 player in this way? 回答1: I

mp3 player in HTML website [closed]

爷,独闯天下 提交于 2019-12-20 17:15:08
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I want insert a simple mp3 player into my website. The Mp3 player must have just 2 buttons (play and pause). I found this: http://www.schillmania.com/projects/soundmanager2/ and it seems nice but I could not make it have those two buttons. Can anyone help me find a way to insert an mp3 player in this way? 回答1: I

Android Native Video player with subtitles

人走茶凉 提交于 2019-12-20 14:41:48
问题 I'm currently developing a video player for android. I've created a simple textview that shows the current subtitle. The problem is: MediaPlayer getCurrentPosition() method only gives me time in seconds. And I need that value in milliseconds to correctly synchronize the subtitle with the movie. The getCurrentPosition is supposed to give me the time in milliseconds, but it gives the time in seconds*1000 (every number ends with "000"). Do you know a better way of doing this? How do I get the

MediaPlayer error -2147483648 when playing file on internal storage

Deadly 提交于 2019-12-20 10:24:33
问题 I'm using the Audio Capture sample on android.com to record and play back audio on actual devices. (Motorola touch pad, and Samsung Galaxy S). When I define the audio file path as mFile = Environment.getExternalStorageDirectory().getAbsolutePath(); record and playback works. But if I set the audio file as mFile = getFilesDir().getAbsolutePath(); OR mFile = getDir("media", Context.MODE_PRIVATE).getAbsolutePath(); OR mFile = getDir("media", Context.MODE_WORLD_READABLE).getAbsolutePath(); record

In h264 NAL units means frame.?

北战南征 提交于 2019-12-20 10:10:20
问题 I am working on a h264 video codec. I want to know: Is a single NAL unit in H264 equivalent to one video frame? 回答1: No, a sequence of NAL units can be decoded into video frames, but they are not equivalent. http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC http://en.wikipedia.org/wiki/Network_Abstraction_Layer#NAL_Units_in_Byte-Stream_Format_Use http://wiki.multimedia.cx/index.php?title=H.264 来源: https://stackoverflow.com/questions/6858991/in-h264-nal-units-means-frame

MediaPlayer() audio stuttering(android)

混江龙づ霸主 提交于 2019-12-20 06:15:04
问题 I am using the MediaPlayer function to stream a live audio stream from a remote server, in my android app. But the audio is choppy and stuttering. The problem is not my internet as the feed plays perfectly when I play it on the computer. What could be the problem?*Note: the streams are live. This is the code I'm using: MediaPlayer mp = new MediaPlayer(); try{ mp.setDataSource("http://radiotool:80/feed 342.mp3");//hardcoded for testing purposes mp.prepare(); mp.start(); } catch(Exception e)