public void release() { if (!isVideo) return; player.stop(); player.release(); playerFactory.release(); player = null; playerFactory = null; }
/** * Release the media player component and the associated native media player resources. * * <p>The associated media player factory will <em>not</em> be released, the client application is * responsible for releasing the factory at the appropriate time. */ public final void release() { onBeforeRelease(); mediaPlayer.release(); onAfterRelease(); }