Question

Hi i have made a simple program that plays a video file, i used QT Designer in creating the UI of my program i have manage to make it play a video, and also connecting the seekslider too

my problem now is that. i cant make my volumnSlider work with the phonon player..

in my research this is how to connect it

self.ui.volumeSlider.setAudioOutput(self.audioOutput)

self.ui.volumeSlider is my volumeslider (using QT Designer)

what im missing is.. what self.audioOutput is?

doing some research i found this codes

self.audioOutput = Phonon.AudioOutput(Phonon.VideoCategory, self)
Phonon.createPath(self.mediaObject, self.audioOutput) 

my problem in this is that. the volumnslider is made through codes(but mines is made on QT designer)

i dont know if im doing the wrong thing.. im trying now to find a way to covert this

Phonon.AudioOutput(Phonon.VideoCategory, self)

to a self.audioOutput that i need. please help me out guys, thanks

EDIT:

This my code on that part

    self.audioOutput = Phonon.AudioOutput(Phonon.VideoCategory, self)
    Phonon.createPath(self.ui.videoPlayer.mediaObject(), self.audioOutput) 
    self.ui.volumeSlider.setAudioOutput(self.audioOutput)

EDIT:

Heres the solution to this problem.. thanks to Avaris.

    #self.audioOutput = Phonon.AudioOutput(Phonon.VideoCategory, self)
    #Phonon.createPath(self.ui.videoPlayer.mediaObject(), self.audioOutput) 
    self.ui.volumeSlider.setAudioOutput(self.ui.videoPlayer.audioOutput())

i have commented the first two lines. since its not needed anymore. thanks again

Was it helpful?

Solution

Heres the solution to this problem.. thanks to Avaris.

#self.audioOutput = Phonon.AudioOutput(Phonon.VideoCategory, self)
#Phonon.createPath(self.ui.videoPlayer.mediaObject(), self.audioOutput) 
self.ui.volumeSlider.setAudioOutput(self.ui.videoPlayer.audioOutput())

i have commented the first two lines. since its not needed anymore. thanks again

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top