> Documentation index: https://developer.android.com/reference/llms.txt

# PlaceholderSurface

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/video/PlaceholderSurface.java+class:androidx.media3.exoplayer.video.PlaceholderSurface)

*** ** * ** ***


```
@UnstableApi
class PlaceholderSurface : Surface, PlaceholderSurfaceInterface
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [android.view.Surface](https://developer.android.com/reference/android/view/Surface.md.txt) ||
|   | ↳ | [androidx.media3.exoplayer.video.PlaceholderSurface](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/PlaceholderSurface.md.txt) |

*** ** * ** ***

A placeholder `Surface`.

## Summary

| ### Public functions |
|---|---|
| `Surface!` | `getSurface()` Returns the placeholder `Surface`. |
| `Boolean` | `isSecure()` Returns whether the placeholder surface is secure. |
| `synchronized java-static Boolean` | `[isSecureSupported](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/PlaceholderSurface#isSecureSupported(android.content.Context))(context: Context!)` **This function is deprecated.** Use `isSecureSupported` instead. <br /> |
| `java-static PlaceholderSurface!` | `[newInstance](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/PlaceholderSurface#newInstance(android.content.Context,boolean))(context: Context!, secure: Boolean)` **This function is deprecated.** Use `newInstance` instead. <br /> |
| `java-static PlaceholderSurface!` | `[newInstanceV17](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/PlaceholderSurface#newInstanceV17(android.content.Context,boolean))(context: Context!, secure: Boolean)` **This function is deprecated.** Use `newInstance` instead. <br /> |
| `Unit` | `release()` |

| ### Public properties |
|---|---|
| `Boolean` | `secure` Whether the surface is secure. |

### Inherited Constants

From [android.os.Parcelable](https://developer.android.com/reference/android/os/Parcelable.md.txt) `const Int` `CONTENTS_FILE_DESCRIPTOR = 1` `const Int` `PARCELABLE_WRITE_RETURN_VALUE = 1` From [android.view.Surface](https://developer.android.com/reference/android/view/Surface.md.txt) `const Int` `CHANGE_FRAME_RATE_ALWAYS = 1` `const Int` `CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS = 0` `const Parcelable.Creator<Surface!>!` `CREATOR` `const Int` `FRAME_RATE_COMPATIBILITY_AT_LEAST = 2` `const Int` `FRAME_RATE_COMPATIBILITY_DEFAULT = 0` `const Int` `FRAME_RATE_COMPATIBILITY_FIXED_SOURCE = 1` `const Int` `ROTATION_0 = 0` `const Int` `ROTATION_180 = 2` `const Int` `ROTATION_270 = 3` `const Int` `ROTATION_90 = 1`

### Inherited functions

From [androidx.media3.exoplayer.video.PlaceholderSurfaceInterface](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/PlaceholderSurfaceInterface.md.txt) `java-static PlaceholderSurfaceInterface!` `newInstance(context: Context!, secure: Boolean)`

Returns a newly created placeholder surface.
From [android.view.Surface](https://developer.android.com/reference/android/view/Surface.md.txt) `Unit` `clearFrameRate()` `Int` `describeContents()` `Unit` `finalize()` `Boolean` `isProducerThrottlingEnabled()` `Boolean` `isValid()` `Canvas!` `lockCanvas(inOutDirty: Rect!)` `Canvas!` `lockHardwareCanvas()` `Unit` `readFromParcel(source: Parcel!)` `Unit` `setFrameRate(frameRate: Float, compatibility: Int)` `Unit` `setProducerThrottlingEnabled(enabled: Boolean)` `String!` `toString()` `Unit` `unlockCanvas(canvas: Canvas!)`

**This function is deprecated.**
`Unit` `unlockCanvasAndPost(canvas: Canvas!)` `Unit` `writeToParcel(dest: Parcel!, flags: Int)`

## Public functions

### getSurface

```
fun getSurface(): Surface!
```

Returns the placeholder `Surface`.

### isSecure

```
fun isSecure(): Boolean
```

Returns whether the placeholder surface is secure.

### isSecureSupported

```
synchronized java-static fun [isSecureSupported](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/PlaceholderSurface#isSecureSupported(android.content.Context))(context: Context!): Boolean
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `isSecureSupported` instead.

### newInstance

```
java-static fun [newInstance](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/PlaceholderSurface#newInstance(android.content.Context,boolean))(context: Context!, secure: Boolean): PlaceholderSurface!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `newInstance` instead.

### newInstanceV17

```
java-static fun [newInstanceV17](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/video/PlaceholderSurface#newInstanceV17(android.content.Context,boolean))(context: Context!, secure: Boolean): PlaceholderSurface!
```

> [!CAUTION]
> **This function is deprecated.**   
>
> Use `newInstance` instead.

### release

```
fun release(): Unit
```

## Public properties

### secure

```
val secure: Boolean
```

Whether the surface is secure.