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 8569973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:27:23+00:00 2026-06-11T18:27:23+00:00

I want to mute a playing Video by VideoView in my Android Application. I

  • 0

I want to mute a playing Video by VideoView in my Android Application.
I couldn’t find any method to do so in VideoView Class.
Any idea how to do this?

I have found a method “setVolume” in MediaPlayer Class, But I am unable to find any working code to play video by MediaPlayer class.
So I believe I can set volume 0 by this method.

Therefore I am looking for any working code to play video using MediaPlayer Class or how to control volume using VideoView Class.

Below is the code for playing video using VideoView , which I am using.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_video);

    VideoView videoView = (VideoView)this.findViewById(R.id.VVSimpleVideo);
    MediaController mc = new MediaController(this);
    mc.setAnchorView(videoView);
    mc.setMediaPlayer(videoView);
    videoView.setMediaController(mc);
    String _path = "/mnt/sdcard/Movies/video5.mp4";

    videoView.setVideoPath(_path);

    videoView.requestFocus();
    videoView.start();


}
  • 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-11T18:27:24+00:00Added an answer on June 11, 2026 at 6:27 pm

    I have done this using MediaPlayer class.
    I have used setVolume function of MediaPlayer class to set the volume to 0.
    also I have realised that dont use AudioManager class, because using AudioManager if a set volume to 0, then it set volume to 0 for all the instance of MediaPlayer and VideoView. But if you will use setVolume() method of MediaPlayer then it will just Mute the volume of that instance only.

    Also set volume to 0 is bot easy using VideoView because VideoView is a wrapper over MediaPlayer class and just allow to access few function of MediaPlayer.
    Also I have read on some blog that though you can reference MediaPlayer instance using VideoView instances, but its very complex and its not recommended to do so.
    Hope this would be helpful to other new readers how try to do similar things.

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

Sidebar

Related Questions

I am using UIImagePickerController for recording video in one of my application. i have
In my Android application, I want a setting to be toggleable in it's menu
want to share a link from my application in windows phone 7. Any one
Want to run javascript function from parent window in child window Example I have
want to have a Hyperlink-Button in a gridView in which I can display a
I have 2 prefs - a song title and the audio state(mute or volume)
My class structure is something like this: var jpTWUI = function(id, connection){ this.id =
I have written an API and defined a method which a user needs to
I'm showing a form using Form.ShowDialog() , in this Form I have override void
I have use AVQueuePlayer to play two video at the same time, Now I

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.