Solved Qt Multimedia for iOS. How?
-
Hello!
I am trying to play video from URL. Using QML MediaPlayer, all is working for Android, MacOS, but failing with iOS. How to use it in iOS? Is there any manuals? Or examples, key point FOR IOS? -
Have you followed the documentation about iOS limitations? https://doc.qt.io/qt-5/qtmultimedia-ios.html Seems unrelated but maybe will help...
-
@sierdzio Thx for reply. I've seen it. Looks for me unrelated. I am using this code:
Video { id: video width : parent.width height : parent.height source: "url here " MouseArea { anchors.fill: parent onClicked: { video.play() } } focus: true Keys.onSpacePressed: video.playbackState == MediaPlayer.PlayingState ? video.pause() : video.play() Keys.onLeftPressed: video.seek(video.position - 5000) Keys.onRightPressed: video.seek(video.position + 5000) }
It's working perfectly on Android and MacOS but on iOS just hear the sound. But no any video. This example from doc https://doc.qt.io/qt-5/qml-qtmultimedia-video.html And sound playing just few seconds at begin.
-
For now I found this https://github.com/wang-bin/QtAV Will try to build it for iOS
-
@sierdzio It's kind of bug and I don't know where. When I am running application on simulator from Qt Creator or XCode - It's not working with this kind of error:
dyld: warning, Ignoring DYLD_IMAGE_SUFFIX because DYLD_ROOT_PATH is used. QML debugging is enabled. Only use this in a safe environment. 2021-03-19 11:44:48.708128+0300 Multimedia_v1[3197:73797] stale focus object QObject(0x0) , doing manual update 2021-03-19 11:44:49.617137+0300 Multimedia_v1[3197:74026] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600000285820> F8BB1C28-BAE8-11D6-9C31-00039315CD46
When I run it on Device from XCode or QtCreator it's working. I mean about QMultimedia. I am running it via this code:
In *.proQT += multimedia
In *.qml
Video { id: video width : parent.width height : parent.height source: "URL Here" MouseArea { anchors.fill: parent onClicked: { video.play() } } focus: true Keys.onSpacePressed: video.playbackState == MediaPlayer.PlayingState ? video.pause() : video.play() Keys.onLeftPressed: video.seek(video.position - 5000) Keys.onRightPressed: video.seek(video.position + 5000) }
For me issue closed with QMultimedia. If anyone knows why it's happening - write a message here.
Created bug report https://bugreports.qt.io/browse/QTBUG-92003