VideoA convenience type for showing a specified video More... Inherits Item Properties
Signals
MethodsDetailed DescriptionVideo is a convenience type combining the functionality of a MediaPlayer and a VideoOutput into one. It provides simple video playback functionality without having to declare multiple types. import QtQuick 2.0 import QtMultimedia 5.0 Video { id: video width : 800 height : 600 source: "video.avi" MouseArea { anchors.fill: parent onClicked: { video.play() } } focus: true Keys.onSpacePressed: video.paused = !video.paused Keys.onLeftPressed: video.position -= 5000 Keys.onRightPressed: video.position += 5000 } Video supports untransformed, stretched, and uniformly scaled video presentation. For a description of stretched uniformly scaled presentation, see the fillMode property description. Screen SaverIf it is likely that an application will be playing video for an extended period of time without user interaction, it may be necessary to disable the platform's screen saver. The ScreenSaver (from QtSystemInfo) may be used to disable the screensaver in this fashion: import QtSystemInfo 5.0 ScreenSaver { screenSaverEnabled: false } See also MediaPlayer and VideoOutput. Property DocumentationThis 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 determines whether the media should begin playback automatically. Returns the availability state of the video instance. This is one of:
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 video. It can be one of:
This property holds a string describing the current error condition in more detail. Set this property to define how the video is scaled to fit the target area.
Because this type is for convenience in QML, it does not support enumerations directly, so enumerations from VideoOuput are used to access the available fill modes. The default fill mode is preserveAspectFit. This property holds whether the current media has audio content. This property holds whether the current media has video content. This property holds whether the audio output is muted. The orientation of the Video in degrees. Only multiples of 90 degrees is supported, that is 0, 90, 180, 270, 360, etc. This property holds the rate at which video is played at as a multiple of the normal rate. This read only property indicates the playback state of the media.
The default state is MediaPlayer.StoppedState. This property holds the current playback position in milliseconds. This property holds whether the playback position of the video can be changed. This property holds the source URL of the media. 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). Signal DocumentationMethod Documentation |