API reference
API reference
Select your platform
No SDKs available
No versions available

ReadableVideoSurfacePanelRegistration Class

Modifiers: final
Panel registration for when you want both post-processing and a simple surface to render on.
This registration creates a Views panel with only a surface view and returns a handle to that surface. If you want control over the surface itself or more complex management you should set up a view with a surface on it yourself.

Constructors

ReadableVideoSurfacePanelRegistration ( registrationId , surfaceConsumer , settingsCreator , panelSetup )
Parameters
registrationId: Int
  Unique identifier for this panel registration
surfaceConsumer: Function2
  Function that receives the entity and surface for custom media rendering setup. This is where you would configure your media player or renderer to output to the provided surface.
settingsCreator: Function1
  Function that creates ReadableMediaPanelSettings for each panel instance, allowing dynamic panel configuration optimized for media content
panelSetup: Function2
  Optional setup function called after panel creation for additional configuration of the PanelSceneObject

Properties

activityClass : Class?
[Get][Set]
Activity class if the panel is powered by an activity and its layout/logic.
Signature
var activityClass: Class<*>?
init : Function2
[Get]
The initialization block that will be called when the panel is created
Signature
val init: PanelRegistration.(entity: Entity) -> Unit
layoutResourceId : Int?
[Get][Set]
Layout resource id if the panel is view-based and created in the same immersive activity.
Signature
var layoutResourceId: Int?
panelIntent : Intent?
[Get][Set]
Intent to launch the panel's activity if the panel is activity-based.
Signature
var panelIntent: Intent
registrationId : Int
[Get]
The unique identifier for this panel
Signature
val registrationId: Int

Functions

config ( overriding , block )
Signature
fun config(overriding: Boolean = true, block: PanelConfigOptions.() -> Unit): PanelRegistration
Parameters
overriding: Boolean
block: Function1
panel ( overriding , block )
Signature
fun panel(overriding: Boolean = true, block: PanelSceneObject.() -> Unit): PanelRegistration
Parameters
overriding: Boolean
block: Function1
panelComponent ()
Returns the Panel component that will be used to create the panel entity.
Signature
fun panelComponent(): Panel
Returns
panelCreator ( scene , spatialContext )
Returns a function that takes an entity as input and returns a PanelSceneObject. This function will be used to create the panel scene object in PanelCreationSystem. Whenever you create Entity with Panel(registrationId) component, this function will be called to create the panel scene object.
Signature
open override fun panelCreator(scene: Scene, spatialContext: SpatialContext): (entity: Entity) -> PanelSceneObject
Parameters
scene: Scene
  The scene in which the panel will be created.
spatialContext: SpatialContext
  The spatial context of the panel.
Returns
Function1
  A function that takes an entity as input and returns a PanelSceneObject.
view ( block )
Parameters
block: Function1
Did you find this page helpful?