GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

Player and SDK tablet support - Android

This document provides comprehensive details about the tablet support features of the SDK. The SDK offers specialized support for different types of devices, ensuring an optimal user experience across various scenarios.

Two primary use cases are covered: Full Screen Player and Player in Container.

Full screen player

Overview

The Full Screen Player is a versatile feature of the BlazeSDK, designed to adapt to both phone and tablet devices. It maximizes screen usage by taking over the entire display, enhancing the media viewing experience.

Implementation

  • Managed by SDK: In this mode, the activity lifecycle is handled by the SDK.
  • Optimal experience: Utilizing android:configChanges="orientation|screenSize" in the activity declaration of the SDK ensures a fluid experience during orientation changes. This setup prevents unnecessary activity restarts, offering a smoother transition especially.

Behavior

  • On phones: The orientation is locked to portrait mode, preventing landscape orientation.
  • On tablets: Full support for orientation changes is provided. The player seamlessly continues from the same seek point during an orientation change, without interrupting the user's viewing experience.

Player in container

Overview

In this configuration, the player is embedded within a container in the client's app, rather than occupying the full screen. This mode is suited for scenarios where the media player is part of a larger UI layout.

Implementation options

Option 1: recommended approach

  • Using android:configChanges: Clients are advised to add android:configChanges="orientation|screenSize" to their activity declaration.
  • Advantages:
    • Enhanced user experience: Prevents the activity from restarting during orientation changes, thereby maintaining the current state and ensuring continuity.
    • Efficiency: Reduces the overhead of recreating the view hierarchy, leading to better performance and smoother user transitions.

Option 2: alternative approach

  • Without using android:configChanges: While this approach is supported, it's less recommended due to its implications.
  • Behavior and implications::
    • Activity recreation: Each orientation change triggers a restart of the activity.
    • Rebuilding view hierarchy: This approach necessitates the complete reconstruction of the view hierarchy, which can be resource-intensive and may lead to a less fluid user experience.

Behavior for both options

  • On phones: The orientation is locked to portrait mode, preventing landscape orientation.
  • On tablets: Full support for orientation changes is provided. The player seamlessly continues from the same seek point during an orientation change, without interrupting the user's viewing experience.

Did this page help you?