Media control in notification widget

Hi all,


The media control shows up unexpected, especially, after playing video via airplay.


Once I set nowplayinginfo or remote command, the media control will show up on the notification widget for 1-2 seconds while the media is playing and pause in "willResignActive" before the app entering background on iOS11.


I have tried to set nowplayinginfo to "nil" or to remove target for remote command in "willResignActive", but the media control panel still shows up for couple seconds and then disappear.


Is this a bug of iOS 11 or is there anyway we can do programatically to avoid the media control showing up in the notification widget?