public PreviewIjkVideoView(Context context, AttributeSet attributeSet) {
   super(context, attributeSet);
   mContext = context;
   inflater = LayoutInflater.from(mContext);
   view = inflater.inflate(getResourseIdByName("layout", "preview_videoview"), this, true);
   mIjkVideoView = (IjkVideoView) view.findViewById(getResourseIdByName("id", "ijkvideoview"));
   background = (RelativeLayout) view.findViewById(getResourseIdByName("id", "background"));
   mProgressBar = (ProgressBar) view.findViewById(getResourseIdByName("id", "progressbar"));
   btn_video = (ImageButton) view.findViewById(getResourseIdByName("id", "btn_video"));
   btn_video.setOnClickListener(this);
   mIjkVideoView.setMediaBufferingIndicator(mProgressBar);
   this.setClickable(true);
   this.setFocusable(true);
 }
 public int getBufferPercentage() {
   return mIjkVideoView.getBufferPercentage();
 }
 public int getCurrentPosition() {
   return mIjkVideoView.getCurrentPosition();
 }
 public String getCurrentVideoId() {
   return mIjkVideoView.getCurrentVideoId();
 }
 public void setVid(String vid, int bitRate) {
   mIjkVideoView.setVid(vid, bitRate);
 }
 public void setVideoLayout(int layout) {
   mIjkVideoView.setVideoLayout(layout);
 }
 public void setOnBufferingUpdateListener(OnBufferingUpdateListener l) {
   mIjkVideoView.setOnBufferingUpdateListener(l);
 }
 public void seekTo(long mesc) {
   mIjkVideoView.seekTo(mesc);
 }
 public void setOnErrorListener(OnErrorListener l) {
   mIjkVideoView.setOnErrorListener(l);
 }
 public void setOnInfoListener(OnInfoListener l) {
   mIjkVideoView.setOnInfoListener(l);
 }
 public void setOnCompletionListener(OnCompletionListener l) {
   mIjkVideoView.setOnCompletionListener(l);
 }
 public void setOnPreparedListener(OnPreparedListener l) {
   mIjkVideoView.setOnPreparedListener(l);
 }
 public void setMediaController(IjkBaseMediaController mediaController) {
   mIjkVideoView.setMediaController(mediaController);
 }
 public IjkMediaPlayer getMediaPlayer() {
   return mIjkVideoView.getMediaPlayer();
 }
 public void start() {
   btn_video.setVisibility(View.GONE);
   mIjkVideoView.setBackgroundDrawable(null); // remove preview
   mIjkVideoView.start();
 }
 public boolean isPlaying() {
   return mIjkVideoView.isPlaying();
 }
 public void pause() {
   mIjkVideoView.pause();
 }
 /** @param vid */
 public void setVid(String vid) {
   mIjkVideoView.setVid(vid);
 }
 public void stopPlayback() {
   mIjkVideoView.stopPlayback();
 }
 /** @param uri */
 public void setVideoUri(Uri uri) {
   mIjkVideoView.setVideoURI(uri);
 }
 /** @param path */
 public void setVideoPath(String path) {
   mIjkVideoView.setVideoPath(path);
 }