return clone;
}
@Override
public Widget cloneDisplay(Map<String, Object> formData) {
Video v = Video.createIfSupported();
if (v == null) {
return new Label(notSupported.getText());
}
populate(v);
Object input = getInputValue(formData);
if (v != null && input != null) {
String url = input.toString();
v.setSrc(url);
if (url.endsWith(".ogv")) {
v.getElement().setPropertyString("type", "video/ogg");
} else if (url.endsWith(".mpeg") || url.endsWith(".mpg")) {
v.getElement().setPropertyString("type", "video/mpeg");
} else if (url.endsWith(".avi")) {
v.getElement().setPropertyString("type", "video/avi");
}
}
super.populateActions(v.getElement());
return v;
}