MPVKit icon indicating copy to clipboard operation
MPVKit copied to clipboard

Player won't resize on iOS when using Metal

Open funniray opened this issue 1 year ago • 4 comments

Hey there,

I've been playing with the demo projects provided, but I don't seem to be able to get MPV to detect the metal layer resizing... I've added the following to MPVMetalViewController

    override func viewDidLayoutSubviews() {
        let size = view.frame.size
        let scale = UIScreen.main.nativeScale
        
        metalLayer.frame = view.frame
        metalLayer.drawableSize = CGSize(width: size.width * scale, height: size.height * scale)
    }

I can see with the performance overlay that the metal layer has resized, however, the video content isn't modified.

Is there any way to get resizing to work with libmpv on iOS?

funniray avatar Apr 01 '24 23:04 funniray