Advertisement
Intermediate .NET MAUI, Fonts, Icons & Media

How do you display and control video/audio in MAUI?

Short answer

Use the MAUI Community Toolkit's MediaElement, which wraps native players. Bind Source (URL or file), and control playback with Play/Pause/Stop and events for state and position. For advanced needs, a dedicated media library or custom handler may be warranted.

Save .NET MAUI mock interview
Advertisement
AModel answer
Use the MAUI Community Toolkit's MediaElement, which wraps native players. Bind Source (URL or file), and control playback with Play/Pause/Stop and events for state and position. For advanced needs, a dedicated media library or custom handler may be warranted.
<toolkit:MediaElement Source="https://cdn/video.mp4"
                      ShouldAutoPlay="True"
                      ShouldShowPlaybackControls="True" />
Real-world example
A course app streams lesson videos with MediaElement, showing native playback controls on each platform.
Likely follow-ups
  • Where does MediaElement come from? | Can it play local files?
Related topics