Example usage for org.apache.wicket.markup.html.media Track setKind

List of usage examples for org.apache.wicket.markup.html.media Track setKind

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.media Track setKind.

Prototype

public void setKind(Kind kind) 

Source Link

Document

Sets the kind of the track belongs to the media component

SUBTITLES: Transcription or translation of the dialogue, suitable for when the sound is available but not understood (e.g.

Usage

From source file:org.wicketstuff.html5.media.webvtt.WebVttDemo.java

License:Apache License

public WebVttDemo() {
    final WebVtt webVtt = new WebVtt();
    webVtt.addCue(new VttCue("1", new VttTime().setS(1), new VttTime().setS(5), getString("first")));
    webVtt.addCue(new VttCue("2", new VttTime().setS(6), new VttTime().setS(10), getString("second")));
    Video video = new Video("video", "http://media.w3.org/2010/05/video/movie_300.mp4");
    Track track = new Track("track", new VttResourceReference("VTT") {

        private static final long serialVersionUID = -8739122871674506741L;

        @Override//  w w w.ja  v  a 2 s  . c  o  m
        public WebVtt getWebVtt() {
            return webVtt;
        }
    });
    track.setDefaultTrack(true);
    track.setKind(Kind.SUBTITLES);
    video.add(track);
    add(video);
}