2011-09-01 03:05:17 |
Jo-Erlend Schinstad |
description |
It should be possible to set a starting and ending position of the media being played. We should also be able to react to the end of the media. For instance, this would make it very easy to implement a loop function. Or you could have "bookmarks" in a media player, with a list of highlights to jump to. I'm thinking it should work something like this for a looper:
import gtk
from quickly.widgets.media_player_box import MediaPlayerBox
# Loops a media sequence
def end_reached(widget, data=None):
widget.position = widget.start_position
widget.play()
win = gtk.Window()
win.set_title("Medialooper")
player = MediaPlayerBox()
player.start_position = 100
player.end_position = 150
player.connect("end-reached", end_reached)
player.uri = "somefile.ogg"
win.add(player)
win.show_all()
player.play()
gtk.main() |
It should be possible to set a starting and ending position of the media being played. We should also be able to react to the end of the media. For instance, this would make it very easy to implement a loop function. Or you could have "bookmarks" in a media player, with a list of highlights to jump to. I'm thinking it should work something like this for a looper:
import gtk
from quickly.widgets.media_player_box import MediaPlayerBox
# Loops a media sequence
def end_reached(widget, data=None):
widget.position = widget.start_position
widget.play()
win = gtk.Window()
win.set_title("Medialooper")
player = MediaPlayerBox()
player.start_position = 100
player.end_position = 150
player.connect("end-reached", end_reached)
player.uri = "somefile.ogg"
win.add(player)
win.show_all()
player.play()
gtk.main()
The end-reached signal could also be used for something like a "play again" button. |
|