RSATom / QmlVlc

[ABANDONED] libvlc wrapper for Qt Quick 2/Qml
Other
140 stars 56 forks source link

multiple VlcPlayers & different volume values #38

Closed pincopallopino closed 9 years ago

pincopallopino commented 9 years ago

in my qml application i have two vlcplayers and i need to set different volume for each one. for example player1 -> muted and player2 -> volume: 50.. i tried it but when i set mute() on player1 also player2 got muted.. how can i do?

kevkha commented 9 years ago

I think like this should do. I assume you have two buttons for each player respectively. Try player1.audio.toggleMute() for player1 and player2.audio.volume = 50 for player2.

RSATom commented 9 years ago

@pincopallopino, do you use latest QmlVlc revision?

RSATom commented 9 years ago

I've tried

    Component.onCompleted: {
        vlcPlayer1.mute();
        vlcPlayer2.unMute();
    }
    Timer {
        interval: 3000; running: true; repeat: true
        onTriggered: { vlcPlayer1.toggleMute(); vlcPlayer2.toggleMute(); }
    }

and it works fine

pincopallopino commented 9 years ago

with your example, it not works (component.onCompleted).. i try this:

Timer {
    interval: 3000;
    running: true;
    repeat: false;
    onTriggered: {
        vlcPlayer1.mute();
        vlcPlayer2.unMute();
    }
}

and it works

RSATom commented 9 years ago

with your example, it not works (component.onCompleted)...

Maybe because I've tested with debug build, it could introduce some differences.

If you problem is solved, please close this issue.