I am trying to play video in background everything works just fine and the video play and get pause normally in background.But the only problem is whenever I go back from the from my videoviewcontroller(the view on which is played to menu), the video still remains in the background and you can see it as Musicplayer position. How can this be removed once I get out of videoviewcontroller
I have tried
NSError *error;
[[AVAudioSession sharedInstance] setActive:NO error:&error];
NSLog(@"ERROR: %@", error);
output ERROR: (null) this code removes the video from the background
[[AVAudioSession sharedInstance] setCategory:nil error:nil];
but if now if want to play the video again it will not play in background mode