Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8192599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:13:00+00:00 2026-06-07T04:13:00+00:00

Why doesn’t the MediaPlayer show the video as soon as it is available. What

  • 0

Why doesn’t the MediaPlayer show the video as soon as it is available. What I mean is on the IPhone when a video is played the video shows up right away. Even when returning from pause. But on the Android the screen stays black for a couple of milliseconds to a second depending on the device used and how many processes are running in the background.

I’m asking this because i want to use one of the beginning frames from my video play as a type of screenshot and currently I’m using a handler to wait 1 second before pausing the video.

Can someone tell me a quick way to make the video show up as soon as it is started or even prepared instead of my workaround?

EDIT:
Here is how I prepare my video player so It should be prepared right.

private void initVideo() 
{
    Log.i("VideoPlayer", "Initialize Video File" + videoFileName);

    AssetFileDescriptor afd;
    try {
        if(videoFileName != null);
        {

            afd = getAssets().openFd(videoFileName);

            vidplayer = new MediaPlayer();

            vidplayer.setDataSource(afd.getFileDescriptor(), afd.getStartOffset(), afd.getDeclaredLength());

            vidplayer.setDisplay(holder);
            vidplayer.prepare();
            vidplayer.setOnCompletionListener(this);
            vidplayer.setOnPreparedListener(this);  
            //Log.i("INITVIDEO", Integer.toString(videoPausedAt));
            vidplayer.seekTo(videoPausedAt);
            //Log.i("VideoPlayer", "video Prepared");

            videoDuration = vidplayer.getDuration()/1000;


            isVideoReady = true;

        }

    } catch (IllegalArgumentException e) {
        e.printStackTrace();
    } catch (IllegalStateException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    } catch (Exception e)
    {
        //Log.i("InitPlayer", e.getClass().toString());
        e.printStackTrace();
    }


}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T04:13:01+00:00Added an answer on June 7, 2026 at 4:13 am

    I have found that it is the phones fault.(mostly) Video’s will show up automatically unless phone is bogged down with apps and thus loading of the video takes longer (noticed after having a voip service running).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Doesn't the space occupied by a variable get deallocated as soon as the control
didSelectRowAtIndex doesn't trigger when I press on cell's UITextLabel even though it triggers if
Why doesn't the file input element show up at all??? see code and screen
Why doesn't a TRUNCATE on mygroup work? Even though I have ON DELETE CASCADE
doesn't show specified graph in Mathematica Graph Theory package 'Combinatorica'.
It doesn't look like TypeConverter is available to use. What is recommended to replace
Doesn't value have to return toString() to be able to call value.toString()? When do
Doesn't seem to work for me, maybe I just doing it wrong
Doesn't object initialization outside of a constructor break encapsulation ? Given: class MyClass {
This doesn't work: int number = 1; String numberstring = IntToString(number); I get The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.