Sdílet prostřednictvím


MediaPlayer.SetVideoScalingMode(VideoScalingMode) Method

Definition

Sets video scaling mode.

[Android.Runtime.Register("setVideoScalingMode", "(I)V", "GetSetVideoScalingMode_IHandler")]
public virtual void SetVideoScalingMode (Android.Media.VideoScalingMode mode);
[<Android.Runtime.Register("setVideoScalingMode", "(I)V", "GetSetVideoScalingMode_IHandler")>]
abstract member SetVideoScalingMode : Android.Media.VideoScalingMode -> unit
override this.SetVideoScalingMode : Android.Media.VideoScalingMode -> unit

Parameters

mode
VideoScalingMode

target video scaling mode. Must be one of the supported video scaling modes; otherwise, IllegalArgumentException will be thrown.

Attributes

Remarks

Sets video scaling mode. To make the target video scaling mode effective during playback, this method must be called after data source is set. If not called, the default video scaling mode is #VIDEO_SCALING_MODE_SCALE_TO_FIT.

The supported video scaling modes are: <ul> <li> #VIDEO_SCALING_MODE_SCALE_TO_FIT<li> #VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING</ul>

Java documentation for android.media.MediaPlayer.setVideoScalingMode(int).

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