Skip to content

Commit 8c93b8b

Browse files
committed
OffScreen - Add CefSettings.EnableAudio
Just a helper method to remove the mute-audio command line arg
1 parent 4525b51 commit 8c93b8b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CefSharp.OffScreen/CefSettings.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,17 @@ public CefSettings() : base()
2121
//this can be removed in user code if required
2222
CefCommandLineArgs.Add("mute-audio", "1");
2323
}
24+
25+
/// <summary>
26+
/// Enables Audio - by default audio is muted in the OffScreen implementatio.
27+
/// This removes the mute-audio command line flag
28+
/// </summary>
29+
public void EnableAudio()
30+
{
31+
if(CefCommandLineArgs.ContainsKey("mute-audio"))
32+
{
33+
CefCommandLineArgs.Remove("mute-audio");
34+
}
35+
}
2436
}
2537
}

0 commit comments

Comments
 (0)