Freigeben über


MediaRecorder.SetPreviewDisplay(Surface) Method

Definition

Sets a Surface to show a preview of recorded media (video).

[Android.Runtime.Register("setPreviewDisplay", "(Landroid/view/Surface;)V", "GetSetPreviewDisplay_Landroid_view_Surface_Handler")]
public virtual void SetPreviewDisplay (Android.Views.Surface? sv);
[<Android.Runtime.Register("setPreviewDisplay", "(Landroid/view/Surface;)V", "GetSetPreviewDisplay_Landroid_view_Surface_Handler")>]
abstract member SetPreviewDisplay : Android.Views.Surface -> unit
override this.SetPreviewDisplay : Android.Views.Surface -> unit

Parameters

sv
Surface

the Surface to use for the preview

Attributes

Remarks

Sets a Surface to show a preview of recorded media (video). Calls this before prepare() to make sure that the desirable preview display is set. If #setCamera(Camera) is used and the surface has been already set to the camera, application do not need to call this. If this is called with non-null surface, the preview surface of the camera will be replaced by the new surface. If this method is called with null surface or not called at all, media recorder will not change the preview surface of the camera.

Java documentation for android.media.MediaRecorder.setPreviewDisplay(android.view.Surface).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also