Flash object

Although a media player like WMediaPlayer is usually used to play video, you may also choose a WFlashObject to play video. In the example below the YouTube flash player is used. If flash is not supported on your system, a static image is shown.

  void Flash() {
    String poster = "pics/sintel_trailer.jpg";
    WContainerWidget container = new WContainerWidget();
    WFlashObject flash =
        new WFlashObject("https://www.youtube.com/v/HOfdboHvshg", (WContainerWidget) container);
    flash.setFlashParameter("allowFullScreen", "true");
    flash.setAlternativeContent(new WImage(new WLink(poster)));
    flash.resize(new WLength(640), new WLength(360));