Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

MediaPlayer is a namespace but is used like a type

eldervasquezeldervasquez USMember ✭✭
myvideo.MediaPlayer = new MediaPlayer(media) { EnableHardwareDecoding = true };

Hi, I use libVLC for my videos and working fine in Xamarin.Android but in Xamarin.iOS show me an error:

MediaPlayer is a namespace but is used like a type

any ideas?


  • eldervasquezeldervasquez USMember ✭✭

    Well, I fixed it by adding namespace in the constructor class:

    myvideo.MediaPlayer = new LibVLCSharp.Shared.MediaPlayer(media) { EnableHardwareDecoding = true };

  • LandLuLandLu Member, Xamarin Team Xamurai

    Try to mark it to end this thread since you have resolved it.

Sign In or Register to comment.