Integer height = Integer.valueOf(elt.getAttribute("height"));
String preview = elt.getAttribute("poster");
String captions = elt.getAttribute("captions");
String audioDescription = elt.getAttribute("audiodescription");
MediaPlayerPanel comp = new MediaPlayerPanel(wicketId, videoUrl, width, height) {
private static final long serialVersionUID = 1L;
@Override
public void onPlay (String status) {
if (cwmSessionService.isSignedIn())
eventService.saveEvent("video:view", "id=" + elt.getAttribute("videoId") + ",state=" + status, contentPage);
}
};
comp.setFullScreen(true);
comp.setUseOnPlay(true);
if (!Strings.isEmpty(preview))
comp.setPreview(getRelativeRef(preview));
if (!Strings.isEmpty(captions))
comp.setCaptionFile(getRelativeRef(captions));
if (!Strings.isEmpty(audioDescription))
comp.setAudioDescriptionFile(getRelativeRef(audioDescription));
comp.add(new AttributeRemover("src", "width", "height", "poster", "captions", "audiodescription", "videoId"));
return comp;
} else if (wicketId.startsWith("audioplayer_")) {
String audioSrc = elt.getAttribute("src");