Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vaadin framework play video

Tags:

java

video

vaadin

Can I play video using Vaadin framewotk ? The main idea is loading video files from local drive in flv or avi formats and play it in web using vaadin framework. Thanks.

like image 217
jitm Avatar asked Mar 01 '11 09:03

jitm


People also ask

Is Vaadin framework good?

Vaadin is a mature web framework for developing rich internet applications. Building web-based GUIs with Vaadin feels like developing a desktop application, which is great, comfortable and fast. However, there are situations where Vaadin is not suitable.

What is Vaadin used for?

Vaadin Flow (formerly Vaadin Framework) is a Java web framework for building web applications and websites. Vaadin Flow's programming model allows developers to use Java as the programming language for implementing User Interfaces (UIs) without having to directly use HTML or JavaScript.

Is Vaadin frontend or backend?

Vaadin is an open-source platform for building modern, collaborative web apps for Java backends. It integrates UI components, frameworks, and tools into one opinionated web development stack. It comes with over 40 customizable components.


1 Answers

There is a sample in the Sampler: http://demo.vaadin.com/sampler/#FlashEmbed You can see the source by clicking 'view source', and it will show you something like this:

Embedded e = new Embedded(null, new ExternalResource(
                "http://www.youtube.com/v/meXvxkn1Y_8&hl=en_US&fs=1&"));
e.setMimeType("application/x-shockwave-flash");
e.setParameter("allowFullScreen", "true");
e.setWidth("320px");
e.setHeight("265px");
addComponent(e);

Obviously, you'll want to change the ExternalResource to something else (e.g FileResource, ClassResource, StreamResource, ...) in order to play local files.

like image 129
Marc Englund Avatar answered Sep 25 '22 18:09

Marc Englund