diff --git a/examples/clapper-gtk/download_cache/python/example.py b/examples/clapper-gtk/download_cache/python/example.py index 7cd04776..887e9d9c 100755 --- a/examples/clapper-gtk/download_cache/python/example.py +++ b/examples/clapper-gtk/download_cache/python/example.py @@ -32,17 +32,17 @@ def on_activate(app): video.props.player.props.queue.set_progression_mode(Clapper.QueueProgressionMode.CAROUSEL) video.props.player.set_autoplay(True) + # Assemble window + video.add_fading_overlay(controls) + win.set_child(video) + win.present() + # Create and add media for playback item_1 = Clapper.MediaItem(uri='http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4') item_2 = Clapper.MediaItem(uri='http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4') video.props.player.props.queue.add_item(item_1) video.props.player.props.queue.add_item(item_2) - # Assemble window - video.add_fading_overlay(controls) - win.set_child(video) - win.present() - # Create a new application app = Adw.Application(application_id='com.example.ClapperDownloadCache') app.connect('activate', on_activate) diff --git a/examples/clapper-gtk/simple/python/example.py b/examples/clapper-gtk/simple/python/example.py index 224ef73c..bfd0b560 100755 --- a/examples/clapper-gtk/simple/python/example.py +++ b/examples/clapper-gtk/simple/python/example.py @@ -24,9 +24,6 @@ def on_activate(app): # more than simply inverting fullscreen on the whole window). video.connect('toggle-fullscreen', on_toggle_fullscreen, win) - # Enable autoplay - video.props.player.set_autoplay(True) - # Create and add media for playback. First added media item to empty # playback queue will be automatically selected. item = Clapper.MediaItem(uri='http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4') @@ -37,6 +34,9 @@ def on_activate(app): win.set_child(video) win.present() + # Start playback + video.props.player.play() + # Create a new application app = Adw.Application(application_id='com.example.ClapperSimple') app.connect('activate', on_activate)