QT 5.4 QML VideoOutput not workking on IOS Iphone/Ipad
-
Dears,
I try to play a video with sound on IOS application with Qt or Qml.
My environment is :- Qt 5.4
- compilation under OSX Yosemite 10.10.2
- the IOS devices are Ipad2 version 8.3 and Iphone6+ version 8.3
Code tested :
QML Versionimport QtQuick 2.4 import QtMultimedia 5.0 VideoOutput { anchors.fill: parent fillMode: VideoOutput.PreserveAspectFit source: player MediaPlayer { id: player autoPlay: true onStatusChanged: {if (status==MediaPlayer.EndOfMedia) play();} source: "qrc:/videos/vid2.mp4" } }
and
C++ VersionQMainWindow w; QVideoWidget* pVWidget = new QVideoWidget; QMediaPlayer* pPlayer = new QMediaPlayer; pPlayer->setMedia(QUrl("qrc:/videos/vid2.mp4")); w.setCentralWidget(pVWidget); w.show(); pPlayer->play();
.pro file
TEMPLATE = app QT += core gui network sql widgets xmlpatterns quick qml multimedia multimediawidgets SOURCES += main.cpp RESOURCES += qml.qrc
Source tested :
- from resource: qrc://videos/vid2.mp4
- from local file after successfull copy on the storage : /var/mobile/Containers/Data/Application/12BD0B54-46B3-439F-9869-E06E1AC6CD87/Library/Application Support/data/vid1.mp4
- from video online : http://www.rmh.de/9d0386eada217cd63a752458aeca89d6/9d0386eada217cd63a752458aeca89d6.mp4
Everything works fine when it's running on Android, OSX Desktop but impossible to have something on IOS Device neither IOS Simulator.
I tried adding the QTPLUGING but as it should be, Cretor found that it was duplicating.
I tried using QMAKE_BUNDLE_DATA....
Nothing works until now...
What I get is white screen on QML version and black screen on C++ version.Thanks for your help or sample projects on it.