Skip to content

[POT 5.6 RC1] MediaPlayer autoPlay property keeps playing last source #59

@sinadogru

Description

@sinadogru

To mimic the bug, please try a MediaPlayer with a mp3 (I am not sure if this bug is related with mp3's.).

MediaPlayer {
        id: player
        autoPlay: true
        loops: 1
        source: "file:///home/pi/sin.mp3"
        onStopped: {
            source = "";
        }
}

Even loops property setted to 1, on stopped handler, assigning source to empty string does not cause to MediaPlayer stops. What I mean it keeps going to play last source, "sin.mp3".

After few tries to find out where is the exact problem is, I guess I detected it because of the autoPlay property is setted to true. To prove it is because of autoPlay property please try this, and you should see that MediaPlayer does not keep going to play last source:

MediaPlayer {
        id: player
        autoPlay: true
        loops: 1
        source: "file:///home/pi/sin.mp3"
        onStopped: {
            autoPlay = false;
            source = "";
        }
}

I have not check the codes but somehow setting the autoPlay to true cause the MediaPlayer keeps playing the source property even it is setted to empty string.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions