You've already forked CEF4Delphi
							
							
				mirror of
				https://github.com/salvadordf/CEF4Delphi.git
				synced 2025-10-30 23:07:52 +02:00 
			
		
		
		
	Added widevine helper functions
This commit is contained in:
		| @@ -52,7 +52,8 @@ uses | ||||
|   {$ELSE} | ||||
|   Windows, Classes, SysUtils, Controls, ActiveX, Math, | ||||
|   {$ENDIF} | ||||
|   uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFResourceHandler, uCEFGetGeolocationCallback; | ||||
|   uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFResourceHandler, uCEFGetGeolocationCallback, | ||||
|   uCEFRegisterCDMCallback; | ||||
|  | ||||
| const | ||||
|   Kernel32DLL = 'kernel32.dll'; | ||||
| @@ -188,6 +189,9 @@ function GetDeviceScaleFactor : single; | ||||
|  | ||||
| function CefGetGeolocation(const aCallbackFunction : TOnLocationUpdate) : boolean; | ||||
|  | ||||
| procedure CefRegisterWidevineCdm(const path: ustring; const callback: ICefRegisterCdmCallback); | ||||
| procedure CefFastRegisterWidevineCdm(const path: ustring; const callback: TCefRegisterCDMProc); | ||||
|  | ||||
| implementation | ||||
|  | ||||
| uses | ||||
| @@ -1238,4 +1242,17 @@ begin | ||||
|   Result := GetScreenDPI / 96; | ||||
| end; | ||||
|  | ||||
| procedure CefRegisterWidevineCdm(const path: ustring; const callback: ICefRegisterCdmCallback); | ||||
| var | ||||
|   str: TCefString; | ||||
| begin | ||||
|   str := CefString(path); | ||||
|   cef_register_widevine_cdm(@str, CefGetData(callback)); | ||||
| end; | ||||
|  | ||||
| procedure CefFastRegisterWidevineCdm(const path: ustring; const callback: TCefRegisterCDMProc); | ||||
| begin | ||||
|   CefRegisterWidevineCdm(path, TCefFastRegisterCdmCallback.Create(callback) as ICefRegisterCdmCallback); | ||||
| end; | ||||
|  | ||||
| end. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user