mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2024-11-16 00:05:55 +01:00
Added GlobalCEFApp.AutoplayPolicy property
This commit is contained in:
parent
37518b318e
commit
5bc37a52ad
@ -145,6 +145,7 @@ type
|
||||
FShutdownWaitTime : cardinal;
|
||||
FWidevinePath : ustring;
|
||||
FMustFreeLibrary : boolean;
|
||||
FAutoplayPolicy : TCefAutoplayPolicy;
|
||||
|
||||
FMustCreateResourceBundleHandler : boolean;
|
||||
FMustCreateBrowserProcessHandler : boolean;
|
||||
@ -364,6 +365,7 @@ type
|
||||
property ShutdownWaitTime : cardinal read FShutdownWaitTime write FShutdownWaitTime;
|
||||
property WidevinePath : ustring read FWidevinePath write FWidevinePath;
|
||||
property MustFreeLibrary : boolean read FMustFreeLibrary write FMustFreeLibrary;
|
||||
property AutoplayPolicy : TCefAutoplayPolicy read FAutoplayPolicy write FAutoplayPolicy;
|
||||
property ChildProcessesCount : integer read GetChildProcessesCount;
|
||||
|
||||
property OnRegCustomSchemes : TOnRegisterCustomSchemesEvent read FOnRegisterCustomSchemes write FOnRegisterCustomSchemes;
|
||||
@ -499,6 +501,7 @@ begin
|
||||
FShutdownWaitTime := 0;
|
||||
FWidevinePath := '';
|
||||
FMustFreeLibrary := False;
|
||||
FAutoplayPolicy := appDefault;
|
||||
|
||||
FMustCreateResourceBundleHandler := False;
|
||||
FMustCreateBrowserProcessHandler := True;
|
||||
@ -1318,6 +1321,20 @@ begin
|
||||
STATE_DISABLED : commandLine.AppendSwitch('--disable-smooth-scrolling');
|
||||
end;
|
||||
|
||||
case FAutoplayPolicy of
|
||||
appDocumentUserActivationRequired :
|
||||
commandLine.AppendSwitchWithValue('--autoplay-policy', 'document-user-activation-required');
|
||||
|
||||
appNoUserGestureRequired :
|
||||
commandLine.AppendSwitchWithValue('--autoplay-policy', 'no-user-gesture-required');
|
||||
|
||||
appUserGestureRequired :
|
||||
commandLine.AppendSwitchWithValue('--autoplay-policy', 'user-gesture-required');
|
||||
|
||||
appUserGestureRequiredForCrossOrigin :
|
||||
commandLine.AppendSwitchWithValue('--autoplay-policy', 'user-gesture-required-for-cross-origin');
|
||||
end;
|
||||
|
||||
if FFastUnload then
|
||||
commandLine.AppendSwitch('--enable-fast-unload');
|
||||
|
||||
|
@ -362,6 +362,12 @@ type
|
||||
|
||||
TCefProxyScheme = (psHTTP, psSOCKS4, psSOCKS5);
|
||||
|
||||
TCefAutoplayPolicy = (appDefault,
|
||||
appDocumentUserActivationRequired,
|
||||
appNoUserGestureRequired,
|
||||
appUserGestureRequired,
|
||||
appUserGestureRequiredForCrossOrigin);
|
||||
|
||||
TCefWebRTCHandlingPolicy = (
|
||||
hpDefault,
|
||||
hpDefaultPublicAndPrivateInterfaces,
|
||||
|
Loading…
Reference in New Issue
Block a user