Friday, April 24, 2026
HomeiOS DevelopmentDelphi IOS Iphone WKWebview setAllowsInlineMediaPlayback doesn't work

Delphi IOS Iphone WKWebview setAllowsInlineMediaPlayback doesn’t work

[ad_1]

I attempt to inbound a TWebbrowser for displaying an youtube stream in my app.
If I click on on the stream, the stream opens within the iphone Movieplayer Window. So I’ve to zoom out, to view the video. On Android units it really works tremendous. Additionally, once I write the app in Xcode, I can set performs inline and the stream works inline.

So in Delphi, I can modify the FMX.Webbrowser.Cocoa. It’s attainable to set true configuration.setAllowsInlineMediaPlayback. However this doesn’t works out. configuration.allowsinlineMediaPlayback stays false.

Instance:

constructor TCommonWebBrowserService.Create; 
var check:Boolean;
start
 FWebView := TNativeWebViewHelper.CreateAndInitWebView;
 FWebView.configuration.setAllowsInlineMediaPlayback(True);
 check:=FWebView.configuration.allowsAirPlayForMediaPlayback;

check stays False.

Apple writes: setAllowsInlineMediaPlayback needs to be set, while you create the View.

At FMX.Webbrowser.Delegate.IOS there may be

class operate TNativeWebViewHelper.CreateAndInitWebView: WKWebView;
start
 End result := TWKWebView.Create();
finish;

however there isn’t any strategy to set .configuration.setAllowsInlineMediaPlayback(True);

At FMX.Webbrowser.delegate.ios there’s a operate referred to as

operate TWebViewDelegate.webViewCreateWebViewWithConfigura tion(webView: WKWebView; configuration: WKWebViewConfiguration;navigationAction: WKNavigationAction; windowFeatures: WKWindowFeatures): WKWebView;

however Delphi doesn’t use this operate.

Is there an overwrite or an answer to this downside?

Thanks rather a lot.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments