MPMediaItem changing properties - ipod

I try to write Activator action for changing current song rating.
I now that we can read MPMediaItemPropertyRating property and get rating.
But how can we change it from app?

You can change the rating of a MPMediaItem with the following line:
[mediaItem setValue:[NSNumber numberWithInteger:rating] forKey:#"rating"];
Works fine in iOS 7, cannot be sure for earlier versions.

#sooper's answer works for local MPMediaItems on the device. But iOS doesnt sync these to iCloud Music Library or Apple Music.
Seems there is no way to change 'Star' Ratings so they are synced to iCloud Music Library. Any setValue:forKey: attempts change the Star Rating only locally. Such changes may be overwritten by any future iCloud Music Library sync.
We can change 'Love' Ratings of our Apple Music catalog and iCloud Music Library, using Apple Music Web APIs as pointed out by #AMGuru here.
And below is the Apple Documentation for those APIs:
https://developer.apple.com/documentation/applemusicapi/ratings

According to the iPod Library Access Programming Guide "All media item metadata is read-only.".

Related

How do I extract a RPG Maker MV HTML5 game out of Kongregate?

How do I extract a RPG Maker MV HTML5 game out of Kongregate, to help answer a question on Arquade?
I know how to extract a regular HTML5 game, but it doesn't get me the files I need if I try that with the RPG Maker MV HTML5 game in question, Medieval Shorts 3.
Instead, I get tons of Javascript and one CSS file, along with the HTML.
And the download link is dead, so this is the only way to get the music info without playing for about 50 minutes.
That's simple, Just use the "Developer Tools" built-in in your browser.
Open the Game, Go to the Developer Tools and Go to the "Network" Section.
And just playing, Until the Music plays, You should can see the file shows up in the Developer Tools, just Open it and Save it.

How to display GameCenter leaderboard sets on tvOS?

I have been trying to add multiple leaderboards that are in leaderboard sets to my tvOS target of my iOS game.
I already have a game on the tvOS App Store so I know I have to add the leaderboards in the asset catalogue, as described here
How to display GameCenter leaderboard on tvOS?
Now when trying to add multiple leaderboards I assumed you would add each leaderboard set with the corresponding image in Xcode (with correct leaderboard set ID), however this doesn't really work.
I can open the game enter menu on my TV and see the leaderboard sets, they even say how many leaderboards they contain, however clicking on it just says no data.
I tried signing out and back into game enter because you sometimes get the "no data" message on iOS in sandbox mode and a sign out/in fixes it. That didn't work.
Surely I don't have to add 40 leaderboards to my asset catalogue, that seems ridiculous
Has anyone done this before, I don't know what I am missing
Thanks
It seems you have to actually add each leaderboard set in Xcode asset catalogue with corresponding ID in the inspector on the right. Than for each leaderboard in a set you have to add the leaderboard. This seems madness if you have a lot of leaderboards but I haven't figured out another way yet.

AS3: Recording sound as they are output/played

I understand how to record microphone input in AS3 from this doc.
Is it possible to record sound exactly as they are being output/played?
The reason is I applied some sound transform (via the global SoundMixer) to sounds that are currently playing; and I also want to record this sound data while it is being played.
I just saw this question, to clarify, I am not trying to record just all sounds on the user's computer (which is not possible). My flash app has a Youtube player in it (via their AS3 API), and it's playing some sounds. I applied transforms using SoundMixer.soundTransform, and I want to record what's being played when the user is playing it.
Thanks in advance.
Just a passing suggestion.. on my desktop it seems ABLE to record sound into Flash from a different tab playing Youtube (HTML5).. I don't know how it's doing that!!
I allow microphone here.. (none actually plugged in, and speaker out has in-ear headphones)
http://code.tutsplus.com/tutorials/create-a-useful-audio-recorder-app-in-actionscript-3--active-5836
PS: Anyone trying this must reduce Windows volume since anything above 10-20% is distorted audio into the Flash app.
And this HTML5 youtube trailer was recorded fine into the Wav file produced by Flash app above
http://www.youtube.com/watch?v=MVt32qoyhi0
So after a quick search it seems my Realtek Audio is classed as a Full-Duplex soundcard and also within its own control panel I have an option called "Multi-streaming" which is enabled/ticked. I think Full-Duplex is enough to do this though. Try options within your soundcard's own settings software. Don't know about your end-users. Some hardware will do it, some wont, there is no all-round solution outside of AIR (which makes desktop apps out of your AS3 code).

How to Close the "Music + Videos" Process on Windows Phone 8?

When I call the MediaPlayer.Stop() method The Music Player stopped, but I still can see the last song's information in the volume panel like this: Screenshot
What can I do if I want to hide or close it?
Thanks!
I believe you want to use the BackgroundAudioPlayer class and BackgroundAudioPlayer.Track property from the Micrsoft.Phone.BackgroundAudio namespace. You can clear the que of tracks being played by the background audio player and shown on the Universal Volume Control (UVC) by setting AudioTrack to Null. The reason you're still able to see the last played song is because it's still in the AudioTrack que. Also, look into MediaHistory and MediaHistoryItem class. These classes allow you access to the Music Hub for the phone. I got all my information from the MSDN documentation and an example of a BackgroundMediaPlayer, so follow these links for more information:
BackgroundAudio Namespace
BackgroundAudioPlayer Class
BackgroundAudioPlayer Example

How do you make an embedded flash player open the little window telling them to update it?

The flash player has a little window that can be opened (similar to flash->settings) telling the user to update the player if the movie loaded is for a more recent version. How can you instruct the player to do this? ITV have managed it with their catchup-tv player.
Context: I am allowing users to copy flash into their PowerPoint presentations and would like to tell them to update their flash player if necessary. I am not embedding a web page in the power point so no JS can be run for checking etc (because I know this is not necessary).
Thanks in advance
For getting the current version of flash:
var version:String = Capabilities.version;
I don't know what ITV has done, but I don't know of any way of forcing the player to show that box, although it may do it automatically.
EDIT:
I just found a complete blog post that answers this.
There is no way to force the window to open itself. It's a user defined setting:
Have a look at the Security class. I have used it in some Flash to prompt users to increase storage limits. The panels that you can show are found in SecurityPanel. However, this may not be the way to prompt for outdated Flash version. (If you are looking to customize these panels, that is off limits.)
You can actually test the browser/Flash version in Javascript, so there really is no point in loading Flash to tell the user to upgrade Flash.