[Android-development] play a video

Harri Pasanen harri at mpaja.com
Mon Feb 17 22:19:44 CET 2014


I haven't actually tried myself, but few things come to mind:

1.  Where do you expect the code would find AULA.mp4?
2.  Does it work on desktop?
3.  I recommend you use Qt 5.2.1 or later, some Android issues are fixed 
there.

Qt Everywhere demo from Play store now seems to play video just fine 
that it is updated to Qt 5.2.1, at least on my Nexus 7 with Android 4.4.2.

Hope this helps,

Harri

On 17/02/2014 20:46, Lindeval Lima wrote:
> Why the code below does not work?
>
> # Add more folders to ship with the application, here
> folder_01.source = qml/app4
> folder_01.target = QML
> DEPLOYMENTFOLDERS = FOLDER_01
> QT + = multimedia
> # Additional import path used to resolve QML modules in Creator's code 
> model
> QML_IMPORT_PATH =
>
> The #. Cpp file Which was generated for your project. Feel free to 
> hack it.
> SOURCES + = main.cpp
>
> # Installation path
> # = Target.path
>
> # Please do not modify the Following two lines. Required for deployment.
> include (qtquick2applicationviewer/qtquick2applicationviewer.pri)
> qtcAddDeployment ()
>
> import QtQuick 2.0
> import QtMultimedia 5.0
>
> Item {
>     MediaPlayer {
>         id: mediaplayer
>         source: "AULA.mp4"
>     }
>
>     VideoOutput {
>         anchors: parent.fill
>         source: mediaplayer
>     }
>
>     MouseArea {
>         id: playArea
>         anchors.fill: parent
>         onPressed: mediaplayer.play();
>     }
> }
>
>
>
> 2014-02-17 15:23 GMT-04:00 Lindeval Lima <lindeval.ufrr at gmail.com 
> <mailto:lindeval.ufrr at gmail.com>>:
>
>     Hello everybody! How do I play a video using qtquick for android 2.0?
>
>     -- 
>     Prof. Lindeval Fernandes de Lima
>     (95) 81235852
>
>
>
>
>
> -- 
> Prof. Lindeval Fernandes de Lima
> (95) 81235852
>
>
>
>
> _______________________________________________
> Android-development mailing list
> Android-development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/android-development

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/android-development/attachments/20140217/048032fb/attachment.html>


More information about the Android-development mailing list