![]() |
Home · All Classes · All Functions · | ![]() |
The Audio element allows you to add audio playback to a scene. More...
|
This element is part of the Qt.multimedia 1.0 module.
import Qt 4.7 import Qt.multimedia 1.0 Text { text: "Click Me!"; font.pointSize: 24; width: 150; height: 50; Audio { id: playMusic source: "music.wav" } MouseArea { id: playArea anchors.fill: parent onPressed: { playMusic.play() } } }
See also Video.
This property indicates if loading of media should begin immediately.
Defaults to true, if false media will not be loaded until playback is started.
This property holds how much of the data buffer is currently filled, from 0.0 (empty) to 1.0 (full).
This property holds the duration of the media in milliseconds.
If the media doesn't have a fixed duration (a live stream for example) this will be 0.
This property holds the error state of the audio. It can be one of:
This property holds a string describing the current error condition in more detail.
This property holds whether the media is paused.
Defaults to false, and can be set to true to pause playback.
This property holds the rate at which audio is played at as a multiple of the normal rate.
This property holds whether the media is playing.
Defaults to false, and can be set to true to start playback.
This property holds the current playback position in milliseconds.
If the seekable property is true, this property can be set to seek to a new position.
This property holds whether position of the audio can be changed.
If true; setting a position value will cause playback to seek to the new position.
This property holds the status of media loading. It can be one of:
This property holds the volume of the audio output, from 0.0 (silent) to 1.0 (maximum volume).
This handler is called when playback stops because end of the media has been reached.
Audio::onError ( error, errorString ) |
This handler is called when an error has occurred. The errorString parameter may contain more detailed information about the error.
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Mobility Project 1.0.2 |