Skip to content

EMediaPlayer Media player ​

import EUI 1.0

Examples ​

Media player ​

Media playback requires the desktop multimedia backend. Try it in the Gallery.

Try in the Gallery ↗
QML sourceQML

Properties ​

PropertyDescriptionValues and default
autoPlayalias

Play automatically after loading media.

DefaultAlias: player.autoPlay
controlsVisiblebool

Show playback controls.

Defaulttrue
enabledbool

Allow interaction; false disables the control.

Defaulttrue
heightreal

Component size in pixels; may be bound to its parent layout.

DefaultimplicitHeight
mutedalias

Mute playback.

DefaultAlias: player.muted
sourcealias

Image or media resource URL supported by Qt.

DefaultAlias: player.source
visiblebool

Whether the component is visible.

Defaulttrue
volumealias

Playback volume from 0 to 1.

0–1

DefaultAlias: player.volume
widthreal

Component size in pixels; may be bound to its parent layout.

DefaultimplicitWidth
durationintRead only

Animation or display duration in milliseconds; the component binding identifies its use.

DefaultComputed at runtime
errorStringstringRead only

Description of the most recent operation failure.

DefaultComputed at runtime
playbackStateintRead only

Qt Multimedia playback state: stopped, playing or paused.

MediaPlayer.StoppedState
MediaPlayer.PlayingState
MediaPlayer.PausedState

DefaultComputed at runtime
positionintRead only

Current playback position in milliseconds.

0–duration (milliseconds)

DefaultComputed at runtime

Signals ​

SignaturePurpose
failed(string message)

Emitted when an operation fails; message describes the error.

Methods ​

SignaturePurpose
play()

Start or resume media playback.

stop()

Stop media playback.

pause()

Pause media playback.

seek(position)

Seek playback to position.

Released under the MIT License. Third-party assets retain their own licenses.