mobileplayer-ios
mobileplayer-ios copied to clipboard
Customize Fullscreen button
I want to customize your library a little bit, and I have 2 issues here. They are Fullscreen button and Video orientation when press fullscreen button
-
I want to put a fullscreen button to my app (using your library), but I don't know how to append it to BottomBar. My code just put fullscreen button into player.view like below:
let player = MobilePlayerViewController(contentURL: URL(string: "abc.mp4")!) player.title = "Video title" player.activityItems = [videoURL!] let fullScreenButton = UIButton(frame: CGRect(x: 100, y: 100, width: 30, height: 30)) fullScreenButton.setBackgroundImage(#imageLiteral(resourceName: "fullscreen"), for: .normal) fullScreenButton.addTarget(self, action: #selector(fullscreenButtonTapped), for: UIControlEvents.touchUpInside) player.view.addSubview(fullScreenButton) presentMoviePlayerViewControllerAnimated(player)
Below is how my app looks like: https://drive.google.com/open?id=0B_xqd7iS_Qn6dW5RS1lidGg4OHM
- When I click Fullscreen button I want to keep iPhone on vertical orientation, but video rotate horizontally (still fullscreen) like Youtube app. How can I do that?
Please help me, thank you!
I have same problem and waiting for the response
@ducnv55 @liuyongVAE 1. you can add a button in your config json with another identifier like advance in example and 2. you can do it by add a new player controller then transform 90 degree player view