activity_tubi_player.xml


Overview

`activity_tubi_player.xml` defines the user interface layout for the Tubi video player activity within the Android application. This XML layout file specifies the arrangement and properties of UI components used to display video content, handle interactive video ads, and show cue point indicators during video playback. It uses a `FrameLayout` as the root container, allowing overlapping views and flexible positioning.

The layout integrates a custom video player view (`TubiExoPlayerView`), a `WebView` for VPAID (Video Player-Ad Interface Definition) ads, and a `TextView` to indicate cue points in the video timeline. This design supports seamless video playback alongside interactive advertising and visual markers, enhancing the user experience.


Detailed Component Explanations

Root Element: <FrameLayout>


1. <com.tubitv.media.views.TubiExoPlayerView>


2. <WebView>


3. <TextView>


Important Implementation Notes


Interaction with Other System Components


Usage Example (Conceptual)

// In the player activity or fragment

TubiExoPlayerView playerView = findViewById(R.id.tubitv_player);
WebView vpaidWebView = findViewById(R.id.vpaid_webview);
TextView cuePointIndicator = findViewById(R.id.cuepoint_indictor);

// Start video playback
playerView.setVideoUri(videoUri);
playerView.play();

// When a VPAID ad starts
vpaidWebView.setVisibility(View.VISIBLE);
vpaidWebView.loadUrl(adUrl);

// When the ad ends
vpaidWebView.setVisibility(View.GONE);

// When a cue point is reached during playback
cuePointIndicator.setText("Chapter 2: Introduction");

Visual Diagram

componentDiagram
    component FrameLayout {
        +TubiExoPlayerView
        +WebView (vpaid_webview)
        +TextView (cuepoint_indicator)
    }
    FrameLayout --> TubiExoPlayerView : video display
    FrameLayout --> WebView : VPAID ads (hidden/shown)
    FrameLayout --> TextView : cue point display

Summary

`activity_tubi_player.xml` is a fundamental layout file defining the Tubi video player screen with support for video playback, interactive VPAID ads, and cue point indicators. Its design leverages effective view layering to provide a rich multimedia experience while maintaining flexibility for dynamic content updates and user engagement features. It integrates closely with the app’s media playback and advertising subsystems to deliver a seamless viewing experience.