Closed anveshfactorly closed 3 years ago
Hi, are you trying this on the simulator? I haven't add any issues like the one your described.
Hello there
I have tried swift version of it and when i click on default icon of full screen video stop and shows black screen
Any solution ?
you can create own full screen using avplayerlayer check this app: https://apps.apple.com/us/app/iburn-music-player-stream/id1506178737?ls=1
here is example :
public func setUp(withLayer:AVPlayerLayer){
playLayer = withLayer
UIView.animate(withDuration: 0.3) {
self.transform = CGAffineTransform(rotationAngle: CGFloat(90 * Float.pi/180))
self.frame = (UIApplication.as_topViewController()?.view.bounds)!
}
// THIS IS NO NEEDET IF TRANSFORM VIEW
// withLayer.transform = CATransform3DMakeRotation(90.0 / 180.0 * .pi, 0.0, 0.0, 1.0)
withLayer.frame = self.bounds
withLayer.contentsGravity = .resizeAspect
coverView.layer.addSublayer(withLayer)
if !musicManager.videoPlayer!.isPlaying{
btnPlay.setImage(#imageLiteral(resourceName: "fullPlay"), for: .normal)
btnPlay.tag = 1
}
}
Hello there
I have tried swift version of it and when i click on default icon of full screen video stop and shows black screen
Any solution ?