Unsolved QMediaPlayer - setPosition() problem
I want to set start position in "QMediaPlayer" object using setPosition() function, but unfortunately it doesn't work. Does anyone have an idea how to set the starting point correctly?
SGaist Lifetime Qt Champion last edited by
When/How are you doing that ?
Which version of Qt ?
On which OS ?
I want to start a video (mp4) from position "x" not from "0".
I have Qt version 6.4 on Windows 10
@Zbigniew-Sch Do you set the position before or right after you call
You need wait the player to load and buffer the media.
mediaStatusChangedsignal and set the postion when the status is
Thank you, it works fine.
But I have the next problem, I want to start the video, then position it at position "x" and pause.
Where can I call the "pause()" function and set the position "x"?
I made several attempts, but the position (mostly is 0) is wrong or the "QVideoWidget" content is black
@Zbigniew-Sch Not sure what's your case, mine works when putting
pause()right before or right after
But it may depends on the media service plugin behaviour, for example when using windowsmediafoundation plugin under Windows, I just can't make the media pause.