Skip to content

MediaPlayerElement

Fluent shell around Qt Multimedia MediaPlayer / VideoOutput.

import QWinUI3.Extras · src/extras/QWinUI3/Extras/MediaPlayerElement.qml

Category: Media & platform · Library: v2.80

← Component index

Gallery: MediaPlayerElementsrc/gallery/pages/MediaPlayerElementPage.qml

Extends Control.

Example

MediaPlayerElement {
    source: "file:///C:/video.mp4"
    Layout.fillWidth: true
    Layout.preferredHeight: 320
}
// --- API ---
// methods: play(), pause(), stop(), togglePlayPause()
// media.play() / media.pause() / media.stop()

Notes

Optional Qt Multimedia — build with -DQWINUI3_BUILD_MEDIA=ON (default when Multimedia is found). When Multimedia is absent, Extras ships a stub with available === false. Recipe: docs/media.md (1.21). Permanent defer 2.09 — experimental (codecs / backends / deploy app-owned). Keyboard: Space / Enter toggles play; focusable transport chrome.

API

Properties

Name Type Description
available bool Always true in the Multimedia build (stub sets false).
source alias Media URL
volume alias Playback volume 0..1
muted alias Mute flag
autoPlay bool Auto-play when source is set
showControls bool Show transport chrome
accessibleName string Screen-reader name override
playing bool
duration real
position real
mediaStatus int
errorString string

Signals

No custom signals (use inherited signals from the base type).

Methods

Signature Description
play()
pause()
stop()
togglePlayPause()

Inherited from Control

Also available (base type / Qt Quick Controls):

  • padding
  • font
  • background / contentItem

Generated from module sources by scripts/generate_component_docs.py — do not edit by hand.