AtomicLiveView
Introduction
AtomicLiveView is a lightweight alternative to LiveCoreView, designed for pure playback scenarios. It is a standalone view container that manages its own render surfaces and lifecycle, and does not depend on LiveCoreView. Suitable for scenarios that only require video rendering and do not need seat / co-hosting / PK capabilities.Key Features
Minimal View Container: Focused solely on video rendering for pure playback scenarios.
Standalone Container: Manages its own render view lifecycle without depending on
LiveCoreView.Seamless AtomicPlayer Integration: Pass this view to the
AtomicPlayer constructor to complete the video output pipeline.Data Structures
AtomicLiveViewType
Render type of AtomicLiveView.
Enum Value | Description |
PLAY_VIEW | Play view, used with AtomicPlayer. |
PUSH_VIEW | Push view, used with AtomicPusher. |
UnitInfo
Live unit info, describing a single seat rendered on the AtomicLiveView.
Property | Type | Description |
index | Int | Unit index. |
liveID | String | Live ID. |
userID | String | User ID. |
userName | String | User name. |
avatarURL | String | Avatar URL. |
microphoneStatus | Microphone status. | |
cameraStatus | Camera status. | |
userSuspendStatus | User suspend status. |
AtomicLiveViewChangeAdapter
AtomicLiveView widget adapter. Implement this protocol to provide overlay sub-UIs for the current AtomicLiveView as needed, and receive callbacks such as video view frame changes. The SDK mounts them at the correct layer above the push preview view without affecting the underlying rendering. Returning nil from create* methods indicates that the view does not need that type of widget.
Methods
onCreateUnitView: Build the seat widget view when a unit is newly added; use onUpdateUnitView to refresh its content later.
fun onCreateUnitView(unitInfo: UnitInfo?,): View?
Parameter | Type | Description |
unitInfo | Live unit info. |
onUpdateUnitView: Update an existing seat widget view when its business fields change.
fun onUpdateUnitView(unitInfo: UnitInfo?,view: View?,)
Parameter | Type | Description |
unitInfo | Latest live unit info. | |
view | View? | The current widget view of this seat, or null if the seat has no widget yet. |
onVideoViewFrameChanged: Video view frame change callback. Triggered by the SDK when the position / size of the co-guest seat video view changes. The business side can use this to synchronously adjust the layout of custom widgets overlaid on it. Positions are expressed as ratios relative to the parent container, in the range 0, 1.
fun onVideoViewFrameChanged(left: Float,top: Float,right: Float,bottom: Float,)
Parameter | Type | Description |
left | Float | Ratio of the top-left point from the left edge. |
top | Float | Ratio of the top-left point from the top edge. |
right | Float | Ratio of the bottom-right point from the left edge. |
bottom | Float | Ratio of the bottom-right point from the top edge. |
onVolumeChanged: Speaking volume change callback. Triggered by the SDK when the speaking volume of a seat user changes, for both the play side (volume carried by the stream) and the push side (local capture and remote co-guest users). The callback is only delivered when the volume of that user actually changes.
fun onVolumeChanged(unitInfo: UnitInfo?,volume: Int,view: View?,)
Parameter | Type | Description |
unitInfo | Live unit info of the seat whose volume changed. | |
volume | Int | Latest speaking volume of this seat user, in the range 0 to 100. |
view | View? | The current widget view of this seat, or null if the seat has no widget yet. |
