MPNowPlayingInfoCenter does't show previous and next buttons in iOS 10

Question!

I'm playing a video using AVPlayerViewController, and I noticed that in now playing center, previous and next buttons were replaced with 15 seconds back and forth seeking buttons. The problem is that I need previous and next buttons to be visible. Also I set updatesNowPlayingInfoCenter property to NO.

See the images below for a better understanding:

Current UI:

enter image description here

Wanted result:

enter image description here



Answers

After some researching, I've found a solution: just disabled backward and forward MPSkipIntervalCommand:

MPRemoteCommandCenter *rcc = [MPRemoteCommandCenter sharedCommandCenter];

MPSkipIntervalCommand *skipBackwardIntervalCommand = [rcc skipBackwardCommand];
[skipBackwardIntervalCommand setEnabled:NO];

MPSkipIntervalCommand *skipForwardIntervalCommand = [rcc skipForwardCommand];
[skipForwardIntervalCommand setEnabled:NO]; 


var mainState = 3;
-mainState; //-3
--mainState; //2 

Your code should look like this

window.onpopstate(function(){
    if(pushed){
        history.go(--mainState); //FIXED
    }
})
By : Whitcik


If you have to pass multiple parameter please use class object:

public class PortalClass
{
    public ApplicationModel applicationModel { get; set; }
    public string user_id { get; set; }
    public string id { get; set; }
    public object pageCollection { get; set; }
}

public object GetApplication(PortalClass data)
{
    JsonSerializerSettings settings = new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All, PreserveReferencesHandling = PreserveReferencesHandling.None };
    var myObject=JsonConvert.DeserializeObject<PageCollection>(data.pageCollection.ToString(), settings)
    return null;
}

Client Side:

var data = {
    user_id: userId,
    id: id
};

http.post(url, data).then(
   function (response) {

}, function (err) {
   callback.reject(err);
});


This video can help you solving your question :)
By: admin