Search code examples
android-tvtelevisionamazon-fire-tv

Are Android TV and Fire TV devices always guaranteed to overscan?


I have a super simple video player on Android TV / Fire TV, basically my UI is just a 'Layoutmatching parent and then inside aPlayerView` also matching parent.

On both Android TV and Fire TV on different TVs I'm getting about 2.5% overscan. I can easily correct for this following the guidelines of Android TV development but should I make that apply to all my users? I fear that if I release an update with this then some users will end up with the video not filling the entire TV. Is there maybe a way to know if I need to account for overscan?

This is my layout:

<?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>

Edit: I would like to mention that I played a YouTube video in the YouTube app that shows you the amount of overscan and the YouTube app also has 2.5% overscan. Replicated this on 3 tvs.


Solution

  • The amount of overscan is specific to the TV panel. Some TVs don't have any but some have up to 5%. Some models allow the user to adjust the overscan, but not all unfortunately. For professional video (e.g., Hollywood movies or TV shows), overscan is considered in the framing of all the content, so it's safe to go edge-to-edge. Some TVs will cut off a small portion of the video, but it won't be anything vital like titles, subtitles, etc. For other types of video, it can be more problematic, especially for screen recordings where menus and tools can be cut off, so it depends on your use case a bit. You can consider making it user-adjustable.

    For all of your non-video content, you should account for the overscan for anything important to the user (menus, buttons, text, etc.) but typically a background image will go edge-to-edge. A simple XML layout would be something like this:

    <?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>
    

    Note: If you're using the AndroidX Leanback fragments (e.g., BrowseSupportFragment), then overscan is handled for you.