PlaceholderSurface


@UnstableApi
class PlaceholderSurface : Surface


A placeholder Surface.

Summary

Public functions

synchronized java-static Boolean

Returns whether the device supports secure placeholder surfaces.

java-static PlaceholderSurface!
newInstance(context: Context!, secure: Boolean)

Returns a newly created placeholder surface.

java-static PlaceholderSurface!
@InlineMe(replacement = "PlaceholderSurface.newInstance(context, secure)", imports = "androidx.media3.exoplayer.video.PlaceholderSurface")
newInstanceV17(context: Context!, secure: Boolean)

This function is deprecated.

Use newInstance instead.

Unit

Public properties

Boolean

Whether the surface is secure.

Inherited functions

From android.view.Surface
Unit
Int
Unit

This function is deprecated.

Boolean
Boolean
Canvas!
lockCanvas(inOutDirty: Rect!)
Canvas!
Unit
Unit
setFrameRate(frameRate: Float, compatibility: Int)
Unit
String!
Unit
unlockCanvas(canvas: Canvas!)

This function is deprecated.

Unit
Unit
writeToParcel(dest: Parcel!, flags: Int)

Public functions

isSecureSupported

synchronized java-static fun isSecureSupported(context: Context!): Boolean

Returns whether the device supports secure placeholder surfaces.

Parameters
context: Context!

Any Context.

Returns
Boolean

Whether the device supports secure placeholder surfaces.

newInstance

java-static fun newInstance(context: Context!, secure: Boolean): PlaceholderSurface!

Returns a newly created placeholder surface. The surface must be released by calling release when it's no longer required.

Parameters
context: Context!

Any Context.

secure: Boolean

Whether a secure surface is required. Must only be requested if isSecureSupported returns true.

Throws
java.lang.IllegalStateException

If a secure surface is requested on a device for which isSecureSupported returns false.

newInstanceV17

@InlineMe(replacement = "PlaceholderSurface.newInstance(context, secure)", imports = "androidx.media3.exoplayer.video.PlaceholderSurface")
java-static fun newInstanceV17(context: Context!, secure: Boolean): PlaceholderSurface!

release

fun release(): Unit

Public properties

secure

val secureBoolean

Whether the surface is secure.