【问题标题】:Video resolution to show full screen video in iOS在 iOS 中显示全屏视频的视频分辨率
【发布时间】:2018-12-26 13:31:28
【问题描述】:

我想在应用启动时显示视频, 但视频重力设置为缩放视频的纵横比。 所以视频显示了某些设备中的一些空白空间。

但根据客户的说法,视频应该在所有设备中实现边缘到边缘, 谁能告诉我所有设备中视频的正确尺寸?

谢谢,

【问题讨论】:

    标签: ios iphone xcode video avplayer


    【解决方案1】:

    您必须使用 AutoLayout 将其适应您的屏幕

    https://theswiftdev.com/2017/10/31/ios-auto-layout-tutorial-programmatically/

    或者您必须通过以下方式以编程方式将其设置为 UIViewController 的大小:

    view.bounds.width
    view.bounds.height
    

    或者到屏幕尺寸:

    UIScreen.main.bounds.width
    UIScreen.main.bounds.height
    

    【讨论】:

    • 您好,感谢您的回复,但我认为您误解了我的问题...我需要知道所有设备中纵向模式下的视频分辨率大小。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-27
    • 2018-01-18
    • 1970-01-01
    相关资源
    最近更新 更多