CoreWebView2.IsMuted Property

Definition

Indicates whether all audio output from this CoreWebView2 is muted or not. Set to true will mute this CoreWebView2, and set to false will unmute this CoreWebView2. true if audio is muted.

public bool IsMuted { get; set; }
member this.IsMuted : bool with get, set
Public Property IsMuted As Boolean

Property Value

Examples

webView.CoreWebView2.IsMuted = !webView.CoreWebView2.IsMuted;
bool isDocumentPlayingAudio = webView.CoreWebView2.IsDocumentPlayingAudio;
bool isMuted = webView.CoreWebView2.IsMuted;
string currentDocumentTitle = webView.CoreWebView2.DocumentTitle;
if (isDocumentPlayingAudio)
{
    if (isMuted)
    {
        this.Title = "🔇 " + currentDocumentTitle;
    }
    else
    {
        this.Title = "🔊 " + currentDocumentTitle;
    }
}
else
{
    this.Title = currentDocumentTitle;
}

Applies to