[Vala] VideoTexture Correction Correction (OMG)



Sorry,

I just needed to point out that I forgot to do
"videoPlayer.set_playing(false);" when creating the player. If I don't do
that then the if statement in the buttonevent handler does not work. Here
is the working test (still the same problem as original post) ...

using Clutter;
using ClutterGst;

/*
Gui: class called from main to define the ui before the clutter.main loop
is called
*/
class Gui : GLib.Object {

private Stage stage;
private VideoTexture videoPlayer;

public Gui() {
 // All the worlds a stage
stage = new Stage();
//stage.set_fullscreen(true);
stage.color = Color () { alpha = 255 };
stage.set_reactive(true);
stage.set_size(1280, 800);
stage.hide.connect (Clutter.main_quit);

videoPlayer = new ClutterGst.VideoTexture();
videoPlayer.set_uri("file:///home/brian/Videos/work.mp4");
videoPlayer.set_property("seek-flags", 1);
videoPlayer.set_reactive(true);
                videoPlayer.set_playing(false); // dont forget this
******************************************************

videoPlayer.button_press_event.connect(onPlayPress);

stage.add(videoPlayer);

stage.show();


-- 
Duff


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]