[Qt-qml] Video Element auto-play

Jason H scorp1us at yahoo.com
Thu Jan 13 00:24:26 CET 2011


All,

I filed a bug, QTMOBILITY-980.

Also, I noticed that if I don't give it a height/width, it (qmlviewer) doesn't 
show a window. Is there a way to get the media attributes and work with them? 
(like for handling different aspect ratio videos 4:3 16:9, etc.)

I ask because the metaData property is not working for me:
 Video {
     source: "1-tweaked.ogg"
     width:  metaData.resolution.width
     height: metaData.resolution.height
     playing: true

}

Generates:
TypeError: Result of expression 'metaData.resolution' [undefined] is not an 
object.
TypeError: Result of expression 'metaData.resolution' [undefined] is not an 
object.

What am I doing wrong?


----- Original Message ----
From: Justin McPherson <justin.mcpherson at nokia.com>
To: ext Jason H <scorp1us at yahoo.com>
Cc: "qt-qml at trolltech.com" <qt-qml at trolltech.com>
Sent: Sun, January 9, 2011 9:10:21 PM
Subject: Re: [Qt-qml] Video Element auto-play


Hi,

Just setting playing to true should do it.

Video {
   source: "blah"
   playing: true
}

If it doesn't, it's a bug, please file a report :)


- Justin


On 9/01/11 6:32 PM, ext Jason H wrote:
> Oh, nevermind. The On[PROPERTY]Changed slot is available for all properties...
>
>
>
>
> ----- Original Message ----
> From: Jason H<scorp1us at yahoo.com>
> To: qt-qml at trolltech.com
> Sent: Sun, January 9, 2011 3:08:04 AM
> Subject: [Qt-qml] Video Element auto-play
>
> How do I get a video element to start playing ASAP (without keys or clicks)?
>
> I get the first frame displayed, but I don't know how do start it.
>
> I was hoping there would be an onStatusChanged signal, that I could do:
>
> onStatusChanged(oldStatus) {
>
> if (status = Video.Loaded) play();
> }
>
>
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
>
>
>
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml


      


More information about the Qt-qml mailing list