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.
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