return clone;
}
@Override
public Widget cloneDisplay(Map<String, Object> formData) {
Audio au = Audio.createIfSupported();
if (au == null) {
return new Label(notSupported.getText());
}
populate(au);
Object input = getInputValue(formData);
if (au != null && input != null) {
String url = input.toString();
au.setSrc(url);
if (url.endsWith(".mp3")) {
au.getElement().setPropertyString("type", "application/mp3");
} else if (url.endsWith(".ogg")) {
au.getElement().setPropertyString("type", "application/ogg");
} else if (url.endsWith(".mid")) {
au.getElement().setPropertyString("type", "application/midi");
}
}
super.populateActions(au.getElement());
return au;
}