> 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
public final class PlaceholderSurface extends Surface implements PlaceholderSurfaceInterface
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.md.txt) |||
| ↳ | [android.view.Surface](https://developer.android.com/reference/android/view/Surface.md.txt) ||
|   | ↳ | [androidx.media3.exoplayer.video.PlaceholderSurface](https://developer.android.com/reference/androidx/media3/exoplayer/video/PlaceholderSurface.md.txt) |

*** ** * ** ***

A placeholder `Surface`.

## Summary

| ### Public fields |
|---|---|
| `final boolean` | `secure` Whether the surface is secure. |

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

### Inherited Constants

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

### Inherited methods

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

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

**This method is deprecated.**
`void` `unlockCanvasAndPost(Canvas canvas)` `void` `writeToParcel(Parcel dest, int flags)`

## Public fields

### secure

```
public final boolean secure
```

Whether the surface is secure.

## Public methods

### getSurface

```
public Surface getSurface()
```

Returns the placeholder `Surface`.

### isSecure

```
public boolean isSecure()
```

Returns whether the placeholder surface is secure.

### isSecureSupported

```
synchronized public static boolean [isSecureSupported](https://developer.android.com/reference/androidx/media3/exoplayer/video/PlaceholderSurface#isSecureSupported(android.content.Context))(Context context)
```

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

### newInstance

```
public static PlaceholderSurface [newInstance](https://developer.android.com/reference/androidx/media3/exoplayer/video/PlaceholderSurface#newInstance(android.content.Context,boolean))(Context context, boolean secure)
```

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

### newInstanceV17

```
public static PlaceholderSurface [newInstanceV17](https://developer.android.com/reference/androidx/media3/exoplayer/video/PlaceholderSurface#newInstanceV17(android.content.Context,boolean))(Context context, boolean secure)
```

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

### release

```
public void release()
```