[Qt-qml] Video Element auto-play

Justin McPherson justin.mcpherson at nokia.com
Thu Jan 13 09:12:32 CET 2011


Hi,

On 13/01/11 9:24 AM, ext Jason H wrote:
> All,
>
> I filed a bug, QTMOBILITY-980.

Thanks, as on the bug report, it's been checked and it can't be 
reproduced. If you could provided further details, that would be good.

> Also, I noticed that if I don't give it a height/width, it (qmlviewer) doesn't
> show a window.

Yes, I noticed that as well, it's probably a bug.

> 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
>
> }

There is never a guarantee that any particular meta-data item will be 
available, this will not work in the general case.


- Justin

> 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