-
-
Notifications
You must be signed in to change notification settings - Fork 306
Video view customization
Martijn van Dijk edited this page Sep 25, 2019
·
1 revision
The video view will automatically be attached to the player. If you have multiple video views and you want to hook it up yourself do:
CrossMediaManager.Current.MediaPlayer.AutoAttachVideoView = false;
After that you can manually add the video view like this:
For android we need a VideoView
in the axml layout.
<mediamanager.platforms.android.video.VideoView
android:id="@+id/your_videoview"
android:layout_width="match_parent"
android:layout_height="300dp" />
Then find the view in code:
playerView = view.FindViewById<VideoView>(Resource.Id.your_videoview);
For iOS, MacOS or tvOS we need to add a VideoView
either in code, or in a Xib or Storyboard.
var playerView = new VideoView();
View.AddSubview(playerView);
Then for all platforms we have to add the player view to the MediaPlayer
CrossMediaManager.Current.MediaPlayer.VideoView = playerView;