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;
|
FShutdownWaitTime : cardinal;
|
||||||
FWidevinePath : ustring;
|
FWidevinePath : ustring;
|
||||||
FMustFreeLibrary : boolean;
|
FMustFreeLibrary : boolean;
|
||||||
|
FAutoplayPolicy : TCefAutoplayPolicy;
|
||||||
|
|
||||||
FMustCreateResourceBundleHandler : boolean;
|
FMustCreateResourceBundleHandler : boolean;
|
||||||
FMustCreateBrowserProcessHandler : boolean;
|
FMustCreateBrowserProcessHandler : boolean;
|
||||||
@ -364,6 +365,7 @@ type
|
|||||||
property ShutdownWaitTime : cardinal read FShutdownWaitTime write FShutdownWaitTime;
|
property ShutdownWaitTime : cardinal read FShutdownWaitTime write FShutdownWaitTime;
|
||||||
property WidevinePath : ustring read FWidevinePath write FWidevinePath;
|
property WidevinePath : ustring read FWidevinePath write FWidevinePath;
|
||||||
property MustFreeLibrary : boolean read FMustFreeLibrary write FMustFreeLibrary;
|
property MustFreeLibrary : boolean read FMustFreeLibrary write FMustFreeLibrary;
|
||||||
|
property AutoplayPolicy : TCefAutoplayPolicy read FAutoplayPolicy write FAutoplayPolicy;
|
||||||
property ChildProcessesCount : integer read GetChildProcessesCount;
|
property ChildProcessesCount : integer read GetChildProcessesCount;
|
||||||
|
|
||||||
property OnRegCustomSchemes : TOnRegisterCustomSchemesEvent read FOnRegisterCustomSchemes write FOnRegisterCustomSchemes;
|
property OnRegCustomSchemes : TOnRegisterCustomSchemesEvent read FOnRegisterCustomSchemes write FOnRegisterCustomSchemes;
|
||||||
@ -499,6 +501,7 @@ begin
|
|||||||
FShutdownWaitTime := 0;
|
FShutdownWaitTime := 0;
|
||||||
FWidevinePath := '';
|
FWidevinePath := '';
|
||||||
FMustFreeLibrary := False;
|
FMustFreeLibrary := False;
|
||||||
|
FAutoplayPolicy := appDefault;
|
||||||
|
|
||||||
FMustCreateResourceBundleHandler := False;
|
FMustCreateResourceBundleHandler := False;
|
||||||
FMustCreateBrowserProcessHandler := True;
|
FMustCreateBrowserProcessHandler := True;
|
||||||
@ -1318,6 +1321,20 @@ begin
|
|||||||
STATE_DISABLED : commandLine.AppendSwitch('--disable-smooth-scrolling');
|
STATE_DISABLED : commandLine.AppendSwitch('--disable-smooth-scrolling');
|
||||||
end;
|
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
|
if FFastUnload then
|
||||||
commandLine.AppendSwitch('--enable-fast-unload');
|
commandLine.AppendSwitch('--enable-fast-unload');
|
||||||
|
|
||||||
|
@ -362,6 +362,12 @@ type
|
|||||||
|
|
||||||
TCefProxyScheme = (psHTTP, psSOCKS4, psSOCKS5);
|
TCefProxyScheme = (psHTTP, psSOCKS4, psSOCKS5);
|
||||||
|
|
||||||
|
TCefAutoplayPolicy = (appDefault,
|
||||||
|
appDocumentUserActivationRequired,
|
||||||
|
appNoUserGestureRequired,
|
||||||
|
appUserGestureRequired,
|
||||||
|
appUserGestureRequiredForCrossOrigin);
|
||||||
|
|
||||||
TCefWebRTCHandlingPolicy = (
|
TCefWebRTCHandlingPolicy = (
|
||||||
hpDefault,
|
hpDefault,
|
||||||
hpDefaultPublicAndPrivateInterfaces,
|
hpDefaultPublicAndPrivateInterfaces,
|
||||||
|
Loading…
Reference in New Issue
Block a user