EMediaPlayer Media player
Examples
Media player
Properties
autoPlayaliasPlay automatically after loading media.
Alias: player.autoPlaycontrolsVisibleboolShow playback controls.
trueenabledboolAllow interaction; false disables the control.
trueheightrealComponent size in pixels; may be bound to its parent layout.
implicitHeightmutedaliasMute playback.
Alias: player.mutedsourcealiasImage or media resource URL supported by Qt.
Alias: player.sourcevisibleboolWhether the component is visible.
truevolumealiasPlayback volume from 0 to 1.
0–1
Alias: player.volumewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthdurationintRead onlyAnimation or display duration in milliseconds; the component binding identifies its use.
Computed at runtimeerrorStringstringRead onlyDescription of the most recent operation failure.
Computed at runtimeplaybackStateintRead onlyQt Multimedia playback state: stopped, playing or paused.
MediaPlayer.StoppedStateMediaPlayer.PlayingStateMediaPlayer.PausedState
Computed at runtimepositionintRead onlyCurrent playback position in milliseconds.
0–duration (milliseconds)
Computed at runtimeSignals
failed(string message)Emitted when an operation fails; message describes the error.
Methods
play()Start or resume media playback.
stop()Stop media playback.
pause()Pause media playback.
seek(position)Seek playback to position.