How To Add Videos in Vaadin from local file system or local my application

[b]
I want add video from My Local File in my project…
&
How to create HTML5 File?

this is path of my video==== " D:/Kshitij/Movie/01Akasy hits-Aayega maja ab barsatka.mp4"
I Do Following way but not working…

[/b]

package com.example.feedba;

import com.vaadin.terminal.ExternalResource;
import com.vaadin.ui.Button;
import com.vaadin.ui.Video;
import com.vaadin.ui.Window;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;

@SuppressWarnings(“serial”)
public class Feedback extends Window {

/**
 * @param string 
 *
 */
public Feedback(String string) {
    super();
    this.setCaption( "Video Lib" );

    final Video v = new Video( "video" );
    v.setSources( new ExternalResource( "file:///D:/Kshitij/Movie/01Akasy hits-Aayega maja ab barsatka.mp4" ),
            new ExternalResource( "file:///D:/Kshitij/Movie/01Akasy hits-Aayega maja ab barsatka.ogv" ) );
  
    v.setWidth( "640px" );
    v.setHeight( "360px" );
    addComponent( v );
    addComponent( new Button( "Play video", new ClickListener() {

        public void buttonClick( ClickEvent event ) {
            v.play();
        }

    } ) );
    addComponent( new Button( "Pause video", new ClickListener() {

        public void buttonClick( ClickEvent event ) {
            v.pause();
        }

    } ) );

  
}



public Feedback() {
	// TODO Auto-generated constructor stub
}

}

[b]

Please Help to me…i
thanks…advance
[/b]

If you’re using ExternalResource with a “file://” URL, it requires that the file should be found on the computer where the browser is running, not on the server running your Vaadin application. Try to use a FileResource instead.

this file is on this computer on which vaadin Application & Browser is running…please help me its very imp to me…

If you are using Vaadin 8, you can use AudioVideo add-on, which supports also ConnectorResources, like FileResource, etc.

https://vaadin.com/directory/component/audiovideo