MediaPlayer.SetDisplay(ISurfaceHolder) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the SurfaceHolder
to use for displaying the video
portion of the media.
[Android.Runtime.Register("setDisplay", "(Landroid/view/SurfaceHolder;)V", "GetSetDisplay_Landroid_view_SurfaceHolder_Handler")]
public virtual void SetDisplay (Android.Views.ISurfaceHolder? sh);
[<Android.Runtime.Register("setDisplay", "(Landroid/view/SurfaceHolder;)V", "GetSetDisplay_Landroid_view_SurfaceHolder_Handler")>]
abstract member SetDisplay : Android.Views.ISurfaceHolder -> unit
override this.SetDisplay : Android.Views.ISurfaceHolder -> unit
Parameters
the SurfaceHolder to use for video display
- Attributes
Remarks
Sets the SurfaceHolder
to use for displaying the video portion of the media.
Either a surface holder or surface must be set if a display or video sink is needed. Not calling this method or #setSurface(Surface)
when playing back a video will result in only the audio track being played. A null surface holder or surface will result in only the audio track being played.
Java documentation for android.media.MediaPlayer.setDisplay(android.view.SurfaceHolder)
.
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.