Question: QML Video Source

I'm trying to change the source of a QML Video. When I initialize the property all is correct. I can play the video correctly. And I want that when the video finish a signal is emitted so from C++ I can randomly change the source.

All works almost fine. Because the second time I set the source, the video is not shown.

I'm working with QT 6.2.

The QML code is something like this.

Video {
            id: videoPlaying
            source: classVideo.currentSource
            fillMode: VideoOutput.PreserveAspectFit
            width: parent.width
            height: parent.height

            onSourceChanged: {
                videoPlaying.play()
            }

            onStopped: {
                classVideo.manageSource()
            }
    }