【问题标题】:Are Android TV and Fire TV devices always guaranteed to overscan?Android TV 和 Fire TV 设备是否总是保证过扫描?
【发布时间】:2022-01-07 13:11:55
【问题描述】:

我在 Android TV / Fire TV 上有一个超级简单的视频播放器,基本上我的 UI 只是一个 'Layoutmatching parent and then inside aPlayerView` 也匹配父级。

在不同电视上的 Android TV 和 Fire TV 上,我得到了大约 2.5% 的过度扫描。我可以按照 Android TV 开发指南轻松纠正这一点,但我应该将其应用于我的所有用户吗?我担心如果我发布更新,那么一些用户最终会看到视频不会填满整个电视。有没有办法知道我是否需要考虑过扫描?

这是我的布局:

<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:background="@color/black"
    tools:context=".connected.VideoFragment">
    <com.google.android.exoplayer2.ui.PlayerView
        android:id="@+id/videoView"
        app:surface_type="texture_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:controller_layout_id="@layout/custom_player_controls" />
</androidx.appcompat.widget.LinearLayoutCompat>

编辑:我想提一下,我在 YouTube 应用中播放了一段 YouTube 视频,该视频向您显示了过度扫描的数量,而 YouTube 应用也有 2.5% 的过度扫描。在 3 台电视上复制了此内容。

【问题讨论】:

    标签: android-tv television amazon-fire-tv


    【解决方案1】:

    过扫描量特定于电视面板。有些电视没有,但有些电视高达 5%。某些型号允许用户调整过扫描,但不幸的是并非全部。对于专业视频(例如好莱坞电影或电视节目),在所有内容的取景中都考虑了过扫描,因此边缘到边缘是安全的。有些电视会截掉一小部分视频,但它不会像标题、字幕等那样重要。对于其他类型的视频,问题可能更大,尤其是对于可以剪切菜单和工具的屏幕录制关闭,所以这取决于您的用例。您可以考虑使其用户可调整。

    对于所有非视频内容,您应该考虑对用户很重要的任何内容(菜单、按钮、文本等)的过度扫描,但通常背景图像会边到边显示。一个简单的 XML 布局应该是这样的:

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
       android:layout_width="match_parent"
       android:layout_height="match_parent">
    
    <!-- Screen elements that can render outside the overscan safe area go here -->
    
        <!-- Nested RelativeLayout with overscan-safe margin -->
        <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:layout_marginTop="27dp"
           android:layout_marginBottom="27dp"
           android:layout_marginLeft="48dp"
           android:layout_marginRight="48dp">
    
          <!-- Screen elements that need to be within the overscan safe area go here -->
    
        </RelativeLayout>
    </RelativeLayout>
    

    注意:如果您使用的是 AndroidX Leanback 片段(例如 BrowseSupportFragment),则会为您处理过度扫描。

    【讨论】:

    • 谢谢,我已经在其他屏幕上占了,只是视频屏幕,我不明白我该怎么做。
    猜你喜欢
    • 2015-03-06
    • 2015-03-15
    • 2019-07-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-10
    • 2017-06-04
    相关资源
    最近更新 更多