private final MovieAnimation doInitialize() { if (null != m_video) { setErrorHandler(this, m_video.getVideoElement()); String url = getURL(); if ((null == url) || ((url = url.trim()).isEmpty()) || (url.startsWith("#"))) { throw new NullPointerException("null or empty or invalid url"); } url = UriUtils.fromString(url).asString(); if ((null == url) || ((url = url.trim()).isEmpty()) || (url.startsWith("#"))) { throw new NullPointerException("null or empty or invalid url"); } m_video.setSrc(url); m_video.setLoop(isLoop()); m_video.setVisible(false); m_video.setPlaybackRate(getPlaybackRate()); m_video.setPreload(MediaElement.PRELOAD_AUTO); if (getAttributes().isDefined(Attribute.VOLUME)) { m_video.setVolume(getVolume()); } setSizes(); return new MovieAnimation(this, m_video); } else { return null; } }
public final Movie setPlaybackRate(double rate) { getAttributes().setPlaybackRate(rate); if (null != m_video) { m_video.setPlaybackRate(rate); } return this; }