Code example for VideoView

Methods: isPlaying

0
 
    Handler mHandler = new Handler();
 
    Runnable mPlayingChecker = new Runnable() {
        public void run() { 
            if (mVideoView.isPlaying()) { 
                mProgressView.setVisibility(View.GONE); 
            } else { 
                mHandler.postDelayed(mPlayingChecker, 250); 
            } 
        } 
    }; 
 
    public MovieViewControl(View rootView, Context context, Uri videoUri) {
        mContentResolver = context.getContentResolver();
        mVideoView = (VideoView) rootView.findViewById(R.id.surface_view);
        mProgressView = rootView.findViewById(R.id.progress_indicator);
 
        mUri = videoUri;
 
        // For streams that we expect to be slow to start up, show a