-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Expand file tree
/
Copy pathCefSettings.cs
More file actions
37 lines (34 loc) · 1.19 KB
/
CefSettings.cs
File metadata and controls
37 lines (34 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright © 2018 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
namespace CefSharp.OffScreen
{
/// <summary>
/// Initialization settings. Many of these and other settings can also configured
/// using command-line switches.
/// </summary>
public class CefSettings : AbstractCefSettings
{
/// <summary>
/// Intialize with default values
/// </summary>
public CefSettings() : base()
{
WindowlessRenderingEnabled = true;
//For OffScreen it doesn't make much sense to enable audio by default, so we disable it.
//this can be removed in user code if required
CefCommandLineArgs.Add("mute-audio", "1");
}
/// <summary>
/// Enables Audio - by default audio is muted in the OffScreen implementatio.
/// This removes the mute-audio command line flag
/// </summary>
public void EnableAudio()
{
if(CefCommandLineArgs.ContainsKey("mute-audio"))
{
CefCommandLineArgs.Remove("mute-audio");
}
}
}
}