mobileplayer-ios icon indicating copy to clipboard operation
mobileplayer-ios copied to clipboard

Customize Fullscreen button

Open ducnv55 opened this issue 7 years ago • 2 comments

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

  1. 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

  1. 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!

ducnv55 avatar Mar 27 '17 07:03 ducnv55

I have same problem and waiting for the response

liuyongVAE avatar Jul 23 '17 07:07 liuyongVAE

@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

thanhBkap avatar Nov 10 '17 06:11 thanhBkap