-
public final class VideoBlockServer-driven inline video block.
SPEC-070-A E.4 — replaces the "▶ Playing video" stub with real
androidx.media3ExoPlayer 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.swiftuses AVKit'sVideoPlayer(player:)+AVPlayer(url:). We mirror the same flags —muted,autoplay,loop, optionalcontrols, thumbnail-tap-to-play — and surface them as ExoPlayer + PlayerView properties.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringvideo_urlprivate final Stringvideo_thumbnail_urlprivate final Floatvideo_heightprivate final Floatvideo_corner_radiusprivate final Booleanautoplayprivate final Booleanloopprivate final Booleanmutedprivate final Booleancontrolsprivate final Booleaninline_playback
-
Method Summary
Modifier and Type Method Description final StringgetVideo_url()final StringgetVideo_thumbnail_url()final FloatgetVideo_height()final FloatgetVideo_corner_radius()final BooleangetAutoplay()final BooleangetLoop()final BooleangetMuted()final BooleangetControls()final BooleangetInline_playback()-
-
Method Detail
-
getVideo_url
final String getVideo_url()
-
getVideo_thumbnail_url
final String getVideo_thumbnail_url()
-
getVideo_height
final Float getVideo_height()
-
getVideo_corner_radius
final Float getVideo_corner_radius()
-
getAutoplay
final Boolean getAutoplay()
-
getControls
final Boolean getControls()
-
getInline_playback
final Boolean getInline_playback()
-
-
-
-