Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play Video in html5 using GWT

Tags:

html

gwt

I have game (build in libgdx) I use GWT to convert it to html5

I need to show cinematic videos in it

is there any way to do it? I need to work my game on cross platform

like image 909
Bera Avatar asked Sep 11 '25 04:09

Bera


2 Answers

Use the widget Video. It represents HTML5 tag video. But this widget may not work properly on all browsers.

You can read about other HTML5 features supporting by GWT in the documentation.

like image 76
kapandron Avatar answered Sep 13 '25 18:09

kapandron


I used http://code.google.com/p/gwt-html5-video/downloads/list

to show videos

    VideoWidget videoPlayer = new VideoWidget(true, false, null);

    List<VideoSource> sources = new ArrayList<VideoSource>();
            sources.add(new VideoSource(video, VideoType.MP4));

        videoPlayer.setSources(sources);
        videoPlayer.setPixelSize(960, 640);
like image 40
Bera Avatar answered Sep 13 '25 16:09

Bera