addSource(new VideoSource(src));
}
public void addSource(VideoSource videoSource)
{
VideoSourceElement sourceElement = VideoSourceElement.as(DOM.createElement(VideoSourceElement.TAG));
if (videoSource.getSrc() == null)
{
throw new IllegalArgumentException("src must not be null");
}
sourceElement.setSrc(videoSource.getSrc());
if (videoSource.getVideoType() != null)
{
sourceElement.setType(videoSource.getVideoType().getType());
}
if (VideoType.WEBM.equals(videoSource.getVideoType()))
{
videoElement.insertFirst(sourceElement);
}