Keys.onLeftPressed: ek(player.position - 5000) Keys.onSpacePressed: aybackState = MediaPlayer.PlayingState ? player.pause() : ay() QtQml.qmlRegisterType(PlayerHelper, "AudioHelper", 1, 0, "PlayerHelper")įile = os.path.join(os.path.dirname(os.path.realpath(_file_)), "main.qml")Įngine.load((file)) Stream_control = self.get_stream_control(self.qml_player)įor i in range(stream_control.streamCount()): Return sip.cast(control, audioCount(self): Player = sip.cast(mediaObject, QtMultimedia.QMediaPlayer)Ĭontrol = rvice().requestControl( MediaObject = qmlplayer.property("mediaObject") Self.qml_player = get_stream_control(qmlplayer): Self.qml_player = notify=qmlplayerChanged) PyQt5: from PyQt5 import QtCore, QtGui, QtQml, QtMultimedia Basically this question is identical to the one in this post so I will ignore the explanations (To fully understand the answer you have to read the explanation of my other answer first) and only provide the code.Ĭonsidering the above, it is necessary to access the mediaplayer but unfortunately the item Video does not allow it, so VideoOuput + MediaPlayer must be used
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |