Closed joshbetz closed 12 years ago
I have it with song title and album title, but I see the iPhone music player has artist, song name, and then album. I tried 3 lines, but it doesn't work and puts the song name followed by "..."
I figured out the 3 line title, it was very easy. So just let me know what you think should be the best format.
Awesome. I think we should make the top and bottom lines a light grey, to make the title stand out. I wouldn't worry about matching it exactly to the Music app, but just something that looks good and makes the title stand out. Also, if we can shrink the line-height just a little bit - it seems to be breaking out of the bounds of the nav bar right now. And would it be possible to center it? I'm trying to figure out how to limit the width of the navigation bar buttons because it's pretty limiting when you end up with a back button that goes 1/3 of the way across the screen. Possibly even having just an arrow on the now playing screen like the music app does? Also, it seems like we might need a way to offset the right side of the nav bar because centering the text would center it in whatever space there is left after the back button is set.
That's a lot, let me know what you think about all that.
One more thing, when you go to the next song, the info doesn't update. I used the same strings to generate the lock screen info in setMediaInfo
and that updates when the song changes, so maybe move the logic that sets that info into setMediaInfo
? If you decide to do that, you can put it outside the "if" conditional - that just checks if it's iOS5 and has the ability to set the media info on the lock screen.
I guess changing font colors isn't possible with the way I did this, and that's the only way I've been able to get it to work. The centering won't work because of the lack of a right button, so it looks better when it is left centered.
I added playerItemDidReachEnd
if you need a place to tell the interface to update... I needed this for Last.fm scrobbling, but it is suggested as a place to update the interface.
Now that I think about it though, you'd also want to update the interface when the user hits the next button.
So, it changes when you hit the next button, but not when the queueplayer changes by itself. I would suggest moving the lines that generate the UILabel to their own method and calling it in the nextSong
method as well as the playerItemDidReachEnd
method.
Should be fixed now: acd748f10b26d5e393e3223cef78e7c54ba23715
Ok, it doesn't seem that fixed it either.
I know why that fixed it, but now it doesn't change after the second song.
Also, it's not breaking perfect http://cl.ly/FWnW
The album is "A Fever You Can't Sweat Out"... The song is "The Only Difference Between Martyrdom And Suicide is Press Coverage"
Set title of Nav Bar to song title and album title, like the music player