ios - Retrieving / updating individual MPNowPlayingInfoCenter properties -


In an original audio AVPlayer example, we're playing back an HLS stream and now do the settings The information is being played successfully (), but the properties of MPNowPlayingInfoCenter can not be accessed.

category and active our AvAudioSession status and without any problem.

  NSMutableDictionary * Properties = [[NSMUTABADADO] allocation]; [Properties set object: Title for that: MPMDITPropertyTitial]; // Set many other properties MPNowPlayingInfoCenter * center = [MPNowPlayingInfoCenter defaultCenter]; [Center setnonwinginfo: property]; // Works! Lock screen successfully shows title and other properties NSLog ("% @", [center now PlaylayInfo]);   

NSLog shows a very Default View dictionary contains only MPNowPlayingInfoPropertyPlaybackRate to 0 - which is the way Not even right because the audio is playing back during the log.

We want to make some updates, and reset them (for things like album all updates, play / pause timings, etc.). What are we losing?

Try the following to obtain the current properties;

  NSMutableDictionary * playInfo = [NSMutableDictionary Dictionary Optional: [MPNowPlayingInfoCenter defaultCenter] .nowPlayingInfo];  

Setting / updating properties is as follows; [PlayInfo setObject: [with NSN number numberFlat: 1.0F] for KN: MPNowPlayingInfoPropertyPlaybackRate]; [PlayInfo setObject: [Repeat with NSNumber number: For song duration]: MPMDiITPProperty PlaybackDocumentation]; [MPNowPlayingInfoCenter defaultCenter] .nowPlayingInfo = playInfo;


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -