self.player = MediaPlayerBox(True)
self.player.show()
self.ui.vbox1.pack_start(self.player)
self.player.uri = file_to_play
self.player.play()
By passing in True when I created the MediaPlayerBox, that told it to display controls. You can also control whether controls are displayed by setting the controls_visible property: self.player.controls_visible = True
It's got other functions that you would expect: self.player.pause()
self.player.stop()
And other useful properties too. For example, you can get the duration of the current media file, and you can get and set the current position. So you could seek to halfway through the media file like this: dur = self.player.duration
self.player.position = dur/2
MediaPlayerBox is really just a thin wrapper around the gstreamer's playbin, so you still have all the power of gstreamer if you end up needing to go there. You can just use the playbin property and go to town if it comes to it.But MediaPlayerBox is focused on simplicity, just getting a video or song playing n your app esasily.
MediaPlayerBox is currently in a branch, so you can grab it and try it out.
Excellent, this is something i needed during the last UDS. When attending remotely, you have to fight with tons of apps. A browser (for blueprints, the schedule, the icecast links, the video feeds for the plenaries, the miro channel), with gwibber, totem, gobby, etc. So I wanted to merge all those into a quickly app. I investigated the various bits needed but UDS ended before i even got a chance to start coding :P
ReplyDeleteSo nice and great blog post about media it's also helpful information all of us so thanks a lot for sharing this tips with us
ReplyDeleteclipping path service
Wonderful article and great information share.
ReplyDeleteclipping path service | clipping path
Myotherapy, also known as massage therapy, is the art of manipulating and kneading a person's soft-tissues or muscles in order to improve their health or well being. Visit body massage spa near me
ReplyDeletePulsed Compression: Intermittent cycles female to male massage in hyderabadof pressure and release are applied to enhance blood flow and lymphatic drainage.
ReplyDeletespa near megood and the well knowledge
ReplyDeleteCupping therapy supporters believe full service massage in hyderabad that wet cupping removes harmful substances and toxins from the body to promote healing. But that’s not proven.
ReplyDeleteCross an ankle over your shin either female to male spa near me 24 hours under or above the knee. Or if above your knee, place a supporting foot under the supporting knee
ReplyDelete