BMPlayer
BMPlayer copied to clipboard
Full screen mode in Portrait Mode
Hi @BrikerMan Can you please advice, if would make fullscreen mode in Portrait. The video should not show in middle of the screen rather it should display in scale to fill mode.
check #92 and #111
@BrikerMan I am sorry, I am not able to get code to do this. Could you please provide me the code to do this?
change videoGravity
of the player~
Please see the the image attached the, we have changed the gravity to AspectFill but its still coming in the center where as We want the video should be Zoomed and should be shown in full screen.
@BrikerMan We are seriously in need of this feature. Please help us.
I don't get what you need. Please provide me with some sketch maybe. DipyaChandniDas [email protected]于2017年8月9日 周三下午10:30写道:
@BrikerMan https://github.com/brikerman We are seriously in need of this feature. Please help us.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BrikerMan/BMPlayer/issues/135#issuecomment-321272853, or mute the thread https://github.com/notifications/unsubscribe-auth/AI71S5-RPQlLoQesw-MNWWRPddxiDSz_ks5sWcKEgaJpZM4OoGIU .
Sorry for replying on old thread.
I have similar issue, and I think the videoGravity
can't work properly because this line in BMPlayerLayerView in layoutSubviews will override the instance videoGravity
:
self.playerLayer?.videoGravity = AVLayerVideoGravity.resizeAspect
In my case I changed it into
self.playerLayer?.videoGravity = self.videoGravity
Sorry for replying on old thread. I have similar issue, and I think the
videoGravity
can't work properly because this line in BMPlayerLayerView in layoutSubviews will override the instancevideoGravity
:self.playerLayer?.videoGravity = AVLayerVideoGravity.resizeAspect
In my case I changed it into
self.playerLayer?.videoGravity = self.videoGravity
Which version u are using?
version 1.0.2
I am having same issue, there is no effect if change the video gravity, later i found `
override open func layoutSubviews() {
super.layoutSubviews()
switch self.aspectRatio {
case .default:
self.playerLayer?.videoGravity = AVLayerVideoGravity.resizeAspect
self.playerLayer?.frame = self.bounds
break
case .sixteen2NINE:
self.playerLayer?.videoGravity = AVLayerVideoGravity.resize
self.playerLayer?.frame = CGRect(x: 0, y: 0, width: self.bounds.width, height: self.bounds.width/(16/9))
break
case .four2THREE:
self.playerLayer?.videoGravity = AVLayerVideoGravity.resize
let _w = self.bounds.height * 4 / 3
self.playerLayer?.frame = CGRect(x: (self.bounds.width - w )/2, y: 0, width: w, height: self.bounds.height)
break
}
}`
I didn't understand, while setting videoGravity from my ViewController and later the video videoGravity got changed by this class. BMPlayerLayerView.swift any solution
同问,当设置videoGravity时,在layoutSubviews被重写了,设置videoGravity方法失效