Note: Advice in this article will only work for JxBrowser 6. See the corresponding article for JxBrowser 7 here.

Since 6.3 version JxBrowser provides API that allows muting/unmuting audio on the loaded web page and checking whether audio is muted or not.

To mute audio use the following code:


To check whether audio is muted use the following code:

boolean audioMuted = browser.isAudioMuted();

Entire example that demonstrates how how to mute audio sound on the opened web page and check whether audio is muted or not is the following:

import com.teamdev.jxbrowser.chromium.Browser;
import com.teamdev.jxbrowser.chromium.swing.BrowserView;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

 * This sample demonstrates how to mute audio sound on the opened web page
 * and check whether audio is muted or not.
public class MuteAudioSample {
    public static void main(String[] args) {
        final Browser browser = new Browser();
        BrowserView view = new BrowserView(browser);

        final JButton muteAudioButton = new JButton();
        muteAudioButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                updateButtonText(muteAudioButton, browser);
        updateButtonText(muteAudioButton, browser);

        JFrame frame = new JFrame();
        frame.add(muteAudioButton, BorderLayout.NORTH);
        frame.add(view, BorderLayout.CENTER);
        frame.setSize(700, 500);


    private static void updateButtonText(final JButton button, final Browser browser) {
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                button.setText(browser.isAudioMuted() ? "Unmute Audio" : "Mute Audio");