Skip to content

Player won't resize on iOS when using Metal #3

@funniray

Description

@funniray

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions