开发者

Customize MPMoviePlayerController

开发者 https://www.devze.com 2022-12-11 18:52 出处:网络
how to customize MPMoviePlayerController and how can use next and previous buttons in MPMoviePlayerController and move to next and previous movies after completion or clicking on those butto开发者_开发

how to customize MPMoviePlayerController and how can use next and previous buttons in MPMoviePlayerController and move to next and previous movies after completion or clicking on those butto开发者_开发百科ns?


to make short answer:

Try to inspect all the view in the main UIWindow like:

for(UIView* ViewLvl1 in [[UIApplication sharedApplication] keyWindow].subviews){
  NSLog(@"1 %@",[viewLvl1 descriptions]);
  for(UIView* ViewLvl2 in viewLvl1.subviews)
  {
    NSLog(@"2  %@",[viewLvl2 descriptions]);
    …etc…
  }
}

After that you will get all the name and property of each view , like MPVideoView or MPFullScreenTransportControls(this is where the button are).

So your question ask a lot of work, there is no easy answer unfortunately. For one time, apple did shit.

Good luck


Your best bet is to create a custom class that uses MPMoviePlayerController or AVPlayer "under the hood", but uses its own components for all other visual components, such as buttons for play/pause, duration etc. It takes a little while but is absolutely doable.


play your movie using-->`

moviePlayerController.controlStyle = MPMovieControlStyleFullscreen;

or any control style method use this link for more control style method...

https://developer.apple.com/library/ios/documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号