All!
... I've integrated Spotify in my app using Sample Spotify Examples. I'm able to play track with Spotify's default controller.Now what my problem is: currently I'm able to play only one track. What to do if I want see the entire playlist track?
Thanking You in advance
With the current API, you need to do this yourself. I don't know exactly how you're doing playback, but when the current track ends you should prepare the next track and play it. There's no "play this list" API built-in to CocoaLibSpotify at the moment.
Related
We are creating an app using Swift on IOS that needs to use custom audio controls: a play button, a stop button, a current time/pos indicator, the duration and perhaps even a seek bar to play 1 audio file that is built into the application. My friend has worked hard on this project but so far was unable to find a solution. Is it possible using mediaplayer or is another api easier, possibly something similar to exoplayer for android apps.
Thanks.
In my opinion I would say that using AVFoundation would probably be easiest since it is built into swift you just have to do import AVFoundation and you would probably want to create an AVAudioPlayer to listen to the music. Also the API is pretty simple. If you need any help getting started I found this article on Mashable that shows how to play audio and how to control it with a custom play and pause button. https://medium.com/yay-its-erica/creating-a-music-player-app-in-swift-3-53809471f663. Also I found on Apple's documentation how to get the current time of the audio playing https://developer.apple.com/documentation/avfoundation/avaudioplayer/1387297-currenttime. I hope I was able to help and if you have anymore questions don't hesitate to ask!
I'm trying to have deezer add songs to the end of the playlist if it's near the end. So obviously, i'm using the addToQueue method to add a few songs to the end of the list.
So far, great success. However, the songs won't play, or at least not without manual intervention. My playlist will stop playing just before the added songs.
The api brings no solution. next(), play(),... no luck!
And then when i click the song in the player, it starts to play.
so euhm, help.
using latest version of chrome and pretty much the example from github.
We are currently working on an app with the deezer javascript SDK and having the same problem. I'll keep you updated if we find a way to make it work.
One hack we found and are testing right know is to keep an array of tracks in our javascript code, and on the end of a track using playtrack to play the next one.
Actually i am developing an app like net flix and in that i need to save favorite songs of end user, i am playing http live streamed videos and also i need to save played time of an video so that end user would be able to play a song from where he has left this song rather then just play it again from beginning.
They are sending me url of streamed videos in following format
http://xxxxxxxxxx/vod/definsts/mp4/low/mp4:1975010026_01.mp4/playlist.m3u8
so my question is that
What should be the best option to save user's favorite songs according to streamed url, means net flix kind of app having favorite songs in client side or at server side.what should be the preferred one and i am using MPMediaPlayerController from apple MoviePlayer sample app code.
If some one has any idea and want to know any thing more from my side then i will be available. I am and will be highly obliged for your any help.
Sorry but my English is not good and i don't know how to play with words.
Any small help or suggestion would be much appreciated.
Preferably your best option here looks like server side;
Saving the Data When you are removed from the application should be ultimately dealt with on the execution of the app to close.
you have multiple options when doing server Side Calls, One i found to be the best is ASIHTTPRequestDelegate
this has worked wonders and is fairly easy to learn.
You may even want to look into a REST method of pulling Video Feeds, may be a Faster and more secure approach.
hope this Helped! :)
I want to allow user to switch to my app during a phone call and play some sound that the second person will hear.
I see here that it was possible even before iOS4 and here that no one knows how to do it.
I will really appreciate if someone will spread some light on this issue.
Thank you.
If you would like to play a song and after launch a phone call, any iPhone OS will stop your song, just beacause phone call has privilege over audio playback.
What you can do is play a song after the call has started, but in this case you can only use speakers.
I've tried the second, and with great audio tracks and some simple advises, you can reach the desired effect.
You could achieve it using Twilio API
Is there a way to inspect the current playlist from MPMusicPlayerController to see whether there is another track to play in the queue?
It's possible to detect this after as skipToNextItem will stop playback and change playbackState, but I want to find out before, so I can disable the skip track function if there are no more tracks to skip on to.
Unfortunately, there does not seem to be a way to do this since MPMusicPlayerController offers no access to its playlist whatsoever. I hope Apple adds this functionality in a future SDK release. You should file a feature request with them.
Oh yes you can, with [MPMediaQuery playlistsQuery]. At least you can find out which playlist that is playing and you can start to play a song title in a playlist. I don't know how to continue to play the next item in the playlist, though.