Hello,
Welcome to our Microsoft Q&A platform!
Xamarin.Android uses the C# code language, and its syntax is slightly different from that of Java. To set player for the playerView, try using playerView.Player = player
command instead. The PlayerView.Player
is both the get
and set
method for the property.
playerView = FindViewById<PlayerView>(Resource.Id.playerview);
SimpleExoPlayer player = new SimpleExoPlayer.Builder(this).Build();
playerView.Player = player;
Best Regards,
Jarvan Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.