media-player

How to display album artwork of streamed Apple Music?

♀尐吖头ヾ 提交于 2019-12-03 10:08:55
问题 In my music player using the new Apple Music API(released May 12, 2016) in iOS 9 (swift, although I'm currently getting familiar with Objective-C as well), I can display information from a streamed song, but not the artwork. I am using MediaPlayer, UIKit, and StoreKit frameworks. I have been successful requesting authorization to AddToCloudMusicLibrary and MusicCatalogPlayback. I have success displaying Apple Music artwork from songs that I downloaded from the Apple Music app, as well as

How can I make android mediaplayer play sound?

a 夏天 提交于 2019-12-03 09:44:56
I don't know why it doesn't works, there is no error logged in logcat, but I cannot hear a sound. public static void DeclararSonido(int numero, Context contexto){ switch(numero){ case 0: mp = MediaPlayer.create(contexto, R.raw.alan); break; } } public static void TocarPiedra( int posicion, Context contexto){ DeclararSonido(posicion, contexto); mp.start(); mp.stop(); mp.release(); } public static void TocarSirena(Context contexto){ MediaPlayer mp2= MediaPlayer.create(contexto, R.raw.doh); mp2.start(); mp2.stop(); mp2.release(); } If I erase mp2.stop(); and mp2.release(); AND mp.stop(); and mp

Set Notification Sound from Assets folder

一曲冷凌霜 提交于 2019-12-03 09:43:28
I am attaching the sound files in the assets folder for play sound in the notification but I am not able to play sound from the assets folder. I have setting page from which user can set the sound for the notification and also user can play sound. This part is completed. I am able to play sound from the assets folder using Media Player. I can use same logic at the Notification creation time but problem can be happened when user click on the Notification because media player still playing the sound. I tried notification.sound = Uri.parse("file:///android_asset/Sound/Long/AlarmClock.mp3"); also

Android Media Stream Error? java.io.FileNotFoundException: No content provider :http://

扶醉桌前 提交于 2019-12-03 09:32:45
I followed this to Play Stream Radio In android Here Its working Fine But Player Loading Bit Slow after clicking I need to wait for 30+ seconds time But I am getting This error In console MediaPlayer: setDataSource IOException happend : java.io.FileNotFoundException: No content provider: http://www.example.com:8000/live.ogg at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1074) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:927) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:854) at android

How do I turn the system volume overlay back on after using MPVolumeView?

守給你的承諾、 提交于 2019-12-03 09:17:41
I'm building an audio player for a non-native sound format. The application's hierarchy is based on the iPod.app. It has a number of UITableView 's and one UIView ( TrackView ) that uses an MPVolumeView to allow the user to change the volume onscreen. Until the first time TrackView becomes visible changing the volume using the hardware buttons displays the system volume overlay as expected (and desired). When TrackView is visible these overlays don't appear since the MPVolumeView updates when changing the volume with the hardware buttons (also desired). Here's the problem: once you back out of

Black screen when returning to video playback activity in Android

余生颓废 提交于 2019-12-03 09:11:18
问题 I'm currently developing the android application ServeStream and I've encountered and problem that I can't fix. My application will stream music and video using the android MediaPlayer class. I've modeled my class after the example found at: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Video.html The difference between this example and my own code is my MediaPlayer is runs in a service which allows it to continue playback in the

Android Recyclerview MediaPlayer previous Item sound stop, release after new one is clicked

烈酒焚心 提交于 2019-12-03 08:58:31
In my app i have recyclerview items, and each item play sound when i click it. Problem is that when i click few items, they all play sounds in the same time until they finish. Lets say i click 10 items, all 10 play sounds in the same time and after some time app get crashed and i get this error: E/MediaPlayer: error (1, -19) . I avoid app crashing by implementing automatic release with this code: mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { mediaPlayer.release(); } }); But that's not what i want, it is

A simple way of embedding a video in my Swing GUI

狂风中的少年 提交于 2019-12-03 07:44:11
问题 I've been looking for a while now for a dead simple way of embedding a video into my Java Swing GUI. Am I chasing after the wind? Ideally, I would love to have something like: VideoPlayer video = new VideoPlayer("filename"); frame.getContentPane().add(video); video.play(); Am I searching for something that doesn't exist? I've developing mainly for linux but with windows in mind as I might try and make my application cross platform in the future. Addtional information: I've looked at JMF

Overriding MPNowPlayingInfoCenter while using WKWebView

半腔热情 提交于 2019-12-03 07:26:30
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 the <audio> and <video> tags inside the HTML and/or to override the infos it provides with my infos? Here

Mediaplayer progress update to seekbar not smooth?

有些话、适合烂在心里 提交于 2019-12-03 05:06:17
问题 I am working on an app with recorder and player. I am using mediaplayer to play the recorded .wav file and meantime I want to update to a seekbar. Everything is working fine But my problem is mediaplayer progress updation to seekbar is not happening smoothly, If we are playig a small file, thumb of the seekbar jumps in seconds or between. Can anyone help me with a workaround to make it smooth seeking of the progress in seekbar. My code is shown below.I am totlay stuck here. mediaPlayerIntiate