hello. I am a developer who has just started developing for iOS.
I'm building an RTSP player using MobileVLCKit.
The environment occurs when the storyboard, UIImageView is played with RTSP.
When playing vertically, there is no margin, but when rotating and playing horizontally, black margins appear on the left and right sides.
What options on the player should be changed when using other controls or when rotating?
In the case of VLC player, the left and right margins do not appear.
Code
@IBOutlet weak var Viewer: UIImageView!
func setupthePlayer()
{
let streamURL = URL(string: "rtsp://192.168.0.101:554/cam/realmonitor?channel=1&subtype=0")!
let theMedia = VLCMedia(url: streamURL)
thePlayer.media = theMedia
Viewer.contentMode = .scaleAspectFill
thePlayer.drawable = Viewer
thePlayer.audio?.isMuted = true
print("--------Play-----")
thePlayer.play()
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
return .all
}