Video stops after seek()
Unsolved
QML and Qt Quick
-
Hi,
Which version of Qt are you using ?
On which platform ?
Did you try to call play after seeking ?
Are you seeking while the media is playing ?
How are you triggering the seek ? -
- Qt 5.12.4
- Raspberry pi + Raspbian buster
- Yes, I call play() after seek(). (But it should not be necessary I think ...)
- Yes, I am seeking while media is playing.
- Seek is triggered through slider onMoved.
After calling seek() I can see that video position has changed. But the video is not running. Video position does not increment.
-
Does it happen with a specific file or all videos in general ?
-
Can you show the code related to that ?
-
@SGaist: Yes, of course.
... VideoOutput { anchors.top: middleVideo.top anchors.left: middleVideo.left anchors.right: middleVideo.right anchors.bottom: playPauseButton.top anchors.margins: 15 source: media onVisibleChanged: { if (visible) { media.play() } else { media.stop() } } } MediaPlayer { id: media autoLoad: true autoPlay: true onStatusChanged: { if (status == MediaPlayer.EndOfMedia) { internShow = def_SHOW_LISTS media.source = "" } } } ... Slider { id: slider anchors.left: playPauseButton.right anchors.leftMargin: 50 anchors.right: duration.left anchors.rightMargin: 50 anchors.bottom: parent.bottom anchors.bottomMargin: 0 height:30 from: 0 to: media.duration value: media.position stepSize: 1 onMoved: { media.seek((parseInt(value/1000))*1000) } } ...
-
@Melle_87 said in Video stops after seek():
media.seek((parseInt(value/1000))*1000)
Did you check the value you get there ?