-
Content Count
277 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Yaron
-
As part of a new feature I'm working on, I wrote functions to browse and get streaming URLs for the Top-3 popular media servers (Plex, Emby and Jellyfin) through an easy to use abstraction layer. I open-sourced the code here: https://github.com/bLightZP/Zoom-Player-emby-jellyfin-client-plugin/tree/main
-
My media player is using a skinned window with no title and is written in Delphi 7. I am not sure if it's the Delphi 7 or the skinned form, but Window's snap to zone when dragging the window to the edge of the screen doesn't trigger automatically. Does anyone know if there is a manual way to trigger it (cause the transparent overlay showing the new layout while dragging the window to appear)?
-
I previously discussed the issue of not being able to upgrade my app to support the latest Android SDK because I haven't been making enough money on Android development to justify upgrading Delphi beyond v10.3. My app is very simple, so I was thinking I may find a "compilation" partner that would just compile the source code for me on the latest version of Delphi. Does that pose any licensing issues? I mean you're not expected to just develop for yourself, right?
-
Yes, I'm aware, but Delphi is so slow under android that I wrote most of the UI code myself using bitmaps (and optimized the bitmap code too).
-
Advice needed: Maintaining a Delphi application on the Google Play Store
Yaron posted a topic in Cross-platform
I require some advice from the sages of this forum, In 2019 I wanted to learn cross-platform development so I purchased the latest version of Delphi at the time and I wrote an companion Android app for my main Windows based software. The Android app did not justify paying continued version renewals (making less than $400/year) so I stopped updating to new versions of Delphi, stopping at v10.3. Even though my Android application is very basic, I don't think I can submit an app created in Delphi 10.3 to the google play store due to the old SDK version Google no longer accepts. My question is, what is be the best path forward to allow me to submit new versions of the app to the google play store? Use the community version? Rewrite the app in a free alternative to Delphi (any recommendations)? Something else I haven't considered? -
Advice needed: Maintaining a Delphi application on the Google Play Store
Yaron replied to Yaron's topic in Cross-platform
So my only option to develop an Android app for free is to abandon Pascal as a language? -
Advice needed: Maintaining a Delphi application on the Google Play Store
Yaron replied to Yaron's topic in Cross-platform
How practical would it be to try converting my app to a Lazarus project? -
I need advice on converting a 500k lines 32bit Delphi 7 application to 64bit
Yaron posted a topic in General Help
I hope this is the right spot & apologize if it isn't. I am the developer of Zoom Player, a windows media playback software developed in Delphi and initially released early 2000. Since then, Zoom Player has grown to over 500,000 lines of code and code-base wise, Zoom Player is stuck at Delphi 7. Over the years I got around most of Delphi 7's shortcoming using custom code, but now I've reached a point where converting Zoom Player to 64bit is becoming a greater necessity. I own a license to Delphi 10.3 so that is the 64bit target code-base I'm aiming for. Do you have any advice for me on ways to automate the jump from Delphi 7 32bit to Delphi 10.3 64bit without breaking the code in 1000's of places? Is there an AI agent or some other tool that could help me in this context? Right now this feels like a pain-staking months long project, am I wrong? -
I need advice on converting a 500k lines 32bit Delphi 7 application to 64bit
Yaron replied to Yaron's topic in General Help
From what you're writing, it seems that I'm in more of a mess than I initially considered. Most of the strings I use are WideString in order to support Unicode text in Delphi 7, not only that, all of my base visual components are based on the TNT Unicode library (e.g. TTNTForm, TTNTListBox, TTNTStringList, etc), so I can't even load the project without getting lots of error messages and I'm not even sure if the TNT Unicode library is compatible with Delphi 10.3, which means I have to revert 1000's of work-arounds for unicode text that I've implemented over the years. My code also uses quite a bit of ASM optimized code for Audio DSP, graphic processing, etc. -
I need advice on converting a 500k lines 32bit Delphi 7 application to 64bit
Yaron replied to Yaron's topic in General Help
Is there a way for me to continue developing/fixing the current Delphi 7 version while slowly fixing the code (maintaining Delphi 7 compatibility) based on compiler errors in the Delphi 10.3 environment without breaking everything? Or is my only option to maintain two separate code-bases until I successfully complete the transition? -
I need advice on converting a 500k lines 32bit Delphi 7 application to 64bit
Yaron replied to Yaron's topic in General Help
Everyone replying about strings, my code deals with a lot of UTF8 encoded strings, wouldn't leaving "string" as is has the potential of breaking UTF8 encoding in places? -
I need advice on converting a 500k lines 32bit Delphi 7 application to 64bit
Yaron replied to Yaron's topic in General Help
Thank you everyone for your kind advance. Zoom Player is already fully unicode, I bypassed this Delphi 7 limitations by using the TNT Unicode Controls, so at least part of the process wouldn't be as painful. Since whatever string that needed to support unicode is already defined as "WideString", I thought of doing a blind search and replace from "String" to "AnsiString". -
It's a relatively new image format, part of the AV1 specification. I haven't found any Delphi compatible sample code or a dll with Delphi headers for this format, any hints?
-
ImageEn is overkill and I can't pay for it. I couldn't find the actual compiled DLL for the GitHub project, otherwise I'd do the headers myself. I simply can't compile the DLLs as I don't have the infrastructure for this. I am aware that there is a section in the readme file that points to a windows library, but it doesn't link to a DLL (the only file there is "avif_x64_Release.lib"), so I'm not sure how I can use that in Delphi. Nope, nothing came up (and I did search both Google and Github before posting here). Thank you, but that's a video component, which interestingly enough is not an issue as there are AV1 video decoders out there that can be used in Delphi through DirectShow.
-
How do I get the client's IP address in a Server.Resources function?
Yaron posted a topic in MARS-Curiosity REST Library
Hi @Andrea Magni To improve security and statistics, I need access to the client's IP address when my function triggers in server.resources: [Path('projectX')] TProjectXServicesResource = class protected public [GET, Produces(TMediaType.TEXT_HTML)] function xHome([QueryParam] lang : String) : String; [POST, Consumes(TMediaType.MULTIPART_FORM_DATA), Produces(TMediaType.TEXT_HTML)] function xAction([FormParams] AParams: TArray<TFormParam>): String; end; function TProjectXServicesResource.xHome([QueryParam] lang : String) : String; begin // Need access to the client's IP here end; function TProjectXServicesResource.xAction([FormParams] AParams: TArray<TFormParam>) : String; begin // Need access to the client's IP here end; How can I obtain the client IP? -
I got a DM with a request on how I added Android AdMob interstitial ads, here's the code: First the definition: {$IF DEFINED(ANDROID) and DEFINED(ADMOB_FULLPAGE)} TInterStitialAdViewListener = class(TJavaLocal, JIAdListener) private FAD: JInterstitialAd; public constructor Create(AAD: JInterstitialAd); procedure onAdClosed; cdecl; procedure onAdFailedToLoad(errorCode: Integer); cdecl; procedure onAdLeftApplication; cdecl; procedure onAdOpened; cdecl; procedure onAdLoaded; cdecl; end; {$ENDIF} [code] Then in the private section of the main form: [code] {$IF DEFINED(ANDROID) and DEFINED(ADMOB_FULLPAGE)} LAdViewListener : TInterStitialAdViewListener; FInterStitial : JInterstitialAd; {$ENDIF} In the form's onCreate: {$IFDEF ADMOB_FULLPAGE} FInterStitial := TJInterstitialAd.JavaClass.init(MainActivity); {$IFDEF TRACEDEBUG} FInterStitial.setAdUnitId(StringToJString('ca-app-pub-3940256099942544/1033173712')); // google test ad {$ELSE} FInterStitial.setAdUnitId(StringToJString('ca-app-pub-xxxxxxxxxxxxxxxxxxx/xxxxxxxxxxx')); // real ad code {$ENDIF} {$ENDIF} And finally: {$IF DEFINED(ANDROID) and DEFINED(ADMOB_FULLPAGE)} constructor TInterStitialAdViewListener.Create(AAD: JInterstitialAd); begin inherited Create; FAD := AAD; {$IFDEF TRACEDEBUG}AddDebugEntry('InterStitialAdViewListener created');{$ENDIF} end; procedure TInterStitialAdViewListener.onAdClosed; begin {$IFDEF TRACEDEBUG}AddDebugEntry('InterStitialAdViewListener AdClosed event');{$ENDIF} //MainForm.ShowModal; end; procedure TInterStitialAdViewListener.onAdFailedToLoad(errorCode: Integer); begin {$IFDEF TRACEDEBUG}AddDebugEntry('InterStitialAdViewListener AdFailedToLoad code #'+errorCode.toString);{$ENDIF} {$IFDEF TRACEDEBUG}ShowMessage('AdFailedToLoad code #'+errorCode.toString);{$ENDIF} end; procedure TInterStitialAdViewListener.onAdLeftApplication; begin {$IFDEF TRACEDEBUG}AddDebugEntry('InterStitialAdViewListener AdLeftApplication');{$ENDIF} end; procedure TInterStitialAdViewListener.onAdLoaded; begin {$IFDEF TRACEDEBUG}AddDebugEntry('InterStitialAdViewListener AdLoaded');{$ENDIF} FAD.show; end; procedure TInterStitialAdViewListener.onAdOpened; begin {$IFDEF TRACEDEBUG}AddDebugEntry('InterStitialAdViewListener AdOpened');{$ENDIF} end; procedure TMainForm.ShowInterStitialAd; var LADRequestBuilder: JAdRequest_Builder; LadRequest: JAdRequest; begin LADRequestBuilder := TJAdRequest_Builder.Create; {$IFDEF TRACEDEBUG}LADRequestBuilder.addTestDevice(MainActivity.getDeviceID);{$ENDIF} LadRequest := LADRequestBuilder.build(); LAdViewListener := TInterStitialAdViewListener.Create(FInterStitial); CallInUIThread( procedure begin FInterStitial.setAdListener(TJAdListenerAdapter.JavaClass.init (LAdViewListener)); FInterStitial.loadAd(LadRequest); end); end; {$ENDIF}
-
I am using the microsoft's WebView2 API to embed the chromium based edge browser inside my Delphi 7 application (using Winsoft's WebView2 wrapper component). My problem is that WebView2's ExecuteScript function returns results asynchronously through a call-back function, which is a problem because my app needs to setup a few things based on the javascript function's result and can't proceed until the data is available. I couldn't find any way in Delphi to process the results synchronously without calling "Application.ProcessMessages" in a loop until the result function is triggered (I can't use "Sleep" because then the result function will never be triggered). Of course calling "Application.ProcessMessages" in a loop is not very desirable, so I'm wondering if there's a better approach?
-
Delphi 7 is a lot slower on Windows 10 (compared to Win7)
Yaron posted a topic in Delphi IDE and APIs
I know Delphi 7 is old, but I have projects that I maintain and once I upgraded to Windows 10, compilation/running is a lot slower compared to Win 7 (on the same machine). I believe it may has something to do with the real-time virus protection (which I disabled in Win7 and is very hard to disable in Win10), but there may be other factors I'm not aware of. Does anyone have any tips to speed things up? -
Delphi 7 is a lot slower on Windows 10 (compared to Win7)
Yaron replied to Yaron's topic in Delphi IDE and APIs
I think this issue has to do with the integrated debugger an some form of optimization microsoft changed in Windows 10. More info from Marco. If I disable the integrated debugger then running from inside Delphi works at the same speed as if I run it externally, so I don't think that having D7 installed under the program files folder is the cause of this issue. I tried setting "delphi32.exe" in Win7 compatibility mode, but it didn't help. I even tried running externally and then connecting the debugger, but as soon as new DLLs are loaded (playing a media file using directshow), everything is the same slowness. My problem running in a VM is that I'm developing a media player and as such, it uses a lot of hardware acceleration features and running under a VM will be a headache. And a media player needs internet access for streaming and opening a Win7 machine to the internet is a bit dangerous nowadays when security patches are no longer released. Any other ideas? -
Automatic fill & submit web forms using TWebBrowser on Android
Yaron posted a topic in Cross-platform
I wrote a web-facing application that uses a combination of javascript/css/html for the front-end and Delphi for the back-end. I decided to create a simple Android app that would wrap the web application using a TWebBrowser control that automatically navigates to the web application's URL. The web application's requires a login and once logged in, a token is generated sever-side and then embedded into the html of subsequent server requests for future authentication. For security reasons, I do not want to store the code used to create the token within the Android app, so the easiest way for me to perform the login would be to automatically fill in the web form fields and simulate a "submit" action. Searching the web, I only found examples of how to do this using the WinAPI version of TWebBrowser, but I'm trying to write something that will work on Android and possibly iOS, any ideas? -
@FPiette My application has over 100 keyboard macros, many dynamically created UI elements (skinned buttons) and even a TCP/IP control API (used for remote control) that can trigger events that should not be activated while a new media is in the process of loading, I can't simply disable one button, I have to disable 100's of elements and several event triggers that may execute unwanted functionality while waiting for the javascript callback event to trigger. Sure, I can do that, but it would take a lot more work than just having WebView2 return a result synchronously like TWebBrowser is able to do. @Edwin Yip I considered CEF4Delphi, but from my initial investigation, there were several show-stoppers, including the possible illegality of including audio/video codecs required by YouTube in the compiled binary, something I'm not willing to do. With regards to the 120+ MB WebView2 download, it won't be a thing in Windows 11 as WebView2 comes pre-installed on Win11. For Win10, I offer my users a quick setup option to download and install the evergreen version of WebView2 without much hassle.
-
I'm not sure how event driven would help me here, I have to wait until specific data is returned from a javascript function before allowing the code to proceed. Here's a real life example: 1. A user presses "play" in my app to play content. 2. I execute a javascript function to return data on the content (e.g. duration in seconds). 3. I now need to display the a position bar on a timeline to the user, which uses a combination of duration and the current position (which isn't always "0" when starting playback of live feeds). As soon as the user presses "play", I want to block all UI interaction until I get my data back from the javascript function. Sure, I can artificially block UI interaction by disabling every UI entry point, but that would be a messy workaround when all I need is the javascript function to return the result synchronously.
-
This is a tough one, I need advice. I currently offer the option to play YouTube video content in my Delphi 7 app by using YouTube's IFRAME player and Javascript API inside a TWebBrowser component. Unfortunately, the TWebBrowser component is limited to the Edge Legacy engine (Edge v11) and is dropping frames like crazy, which is why I would like to move the code to use the Edge Chromium engine. Previously, Microsoft let you choose the engine by specifying a registry key (HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION), but it seems that with the Chromium version, they dumped the old IWebBrowser interface for a new WebView2 interface. Unfortunately, I haven't found any WebView2 support for Delphi 7. It seems WebView2 support was only introduced in Delphi 10.4 and I only own Delphi 10.3 and can't afford paying $1000+ just for this feature. I'm aware of Delphi Chromium Embeded 3 project, but it may have legal issues with the decoders required to play YouTube content, so it's not an option. So the questions are: Can I hire someone to write a DLL I can then use in Delphi 7, giving me the functionality I need (video position within my window handle and a Javascript bridge to the YouTube API data/events)? Is there a WebView2 implementation that I missed and is compatible with Delphi 7 or at least would allow me to generate a DLL I can use in Delphi 7, but write in Delphi 10.3? Is there an option I haven't considered?
-
Sorry if I wasn't clear, I was referring to DirectShow which does not use a browser component. It does use http transport and you can specify the user-agent, but it makes no difference, somehow YouTube identifies it and limits the bandwidth to unusable levels.
-
From what I can tell, the problem is that YouTube is now detecting non-valid clients and then putting a bandwidth limiter on the connection, making playback unpractical. At least that's I experience when trying to use the D3YD YouTube Directshow filter. I am experimenting with it now, I can get it to load the video, but I'm still not sure how to capture javascript event and send the event's data back to Delphi.