Question: I am using Avplayer to show video clips and when i go back (app in background) video stop. How can i keep playing the video? 

I have search about background task & background thread ,IOS only support music in background (Not video)
 <http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html>

here is some discussion about play video in background 

1) <https://discussions.apple.com/thread/2799090?start=0&tstart=0>

2) <http://www.cocoawithlove.com/2011/04/background-audio-through-ios-movie.html> 

But there are many apps in AppStore, that play video in Background like 

Swift Player : <https://itunes.apple.com/us/app/swift-player-speed-up-video/id545216639?mt=8&ign-mpt=uo%3D2>

SpeedUpTV : <https://itunes.apple.com/ua/app/speeduptv/id386986953?mt=8>

Answer: 
If you try to change the background mode:
Sorry, App store wont approve it.[MPMoviePlayerViewController playback video after going to background for youtube](https://stackoverflow.com/questions/15389989/mpmovieplayerviewcontroller-playback-video-after-going-to-background-for-youtube)

In my research, someone would take the sound track out to play in te background when it goes into background as the video would be pause and get the playbacktime for resume playing when go into foreground
If you are Playing video using WebView you can handle using javascript to play video on background.

```
strVideoHTML = @"<html><head><style>body.........</style></head> <body><div id=\"overlay\"><div id=\"youtubelogo1\"></div></div><div id=\"player\"></div> <script> var tag = document.createElement('script'); tag.src = \"http://www.youtube.com/player_api\"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); var player; events: { 'onReady': onPlayerReady, } }); } function onPlayerReady(event) { event.target.playVideo(); } function changeBG(url){ document.getElementById('overlay').style.backgroundImage=url;} function manualPlay() {  player.playVideo(); }  function manualPause() {  player.pauseVideo(); }  </script></body> </html>";

NSString *html = [NSString stringWithFormat:strVideoHTML,url, width, height,videoid;
webvideoView.delegate = self;
[webvideoView loadHTMLString:html baseURL:[NSURL URLWithString:@"http://www.your-url.com"]];

```

On view diappear call

```
strscript = @"manualPlay();
[webvideoView stringByEvaluatingJavaScriptFromString:strscript];

```