Package 

Class VideoBlock


  • 
    public final class VideoBlock
    
                        

    Server-driven inline video block.

    SPEC-070-A E.4 — replaces the "▶ Playing video" stub with real androidx.media3 ExoPlayer playback wired through PlayerView.

    Lifecycle:

    • The ExoPlayer is created lazily inside remember so it survives recompositions but is unique per Composable instance.

    • DisposableEffect releases the player when the Composable leaves the composition. Without this, every navigation event leaks one ExoPlayer + its codec + audio focus + decoder thread, which on low-end devices (the AppDNA SDK ships down to API 24) starves the OS within a few flows.

    iOS parity: packages/appdna-sdk-ios/Sources/AppDNASDK/Core/VideoBlockView.swift uses AVKit's VideoPlayer(player:) + AVPlayer(url:). We mirror the same flags — muted, autoplay, loop, optional controls, thumbnail-tap-to-play — and surface them as ExoPlayer + PlayerView properties.