简体   繁体   English

Delphi Firemonkey TWebBrowser 在 Android、iOS 和 MacOS 中使用 WebRTC

[英]Delphi Firemonkey TWebBrowser use WebRTC in Android, iOS & MacOS

Already created a post for this on Delphi TWebbrowser to use -enable-media-stream which yet to receive any comment or answer.已经在Delphi TWebbrowser 上为此创建了一个帖子, 以使用 -enable-media-stream尚未收到任何评论或答案。 So I make a different question.所以我提出一个不同的问题。 How can I use WebRTC using TWebBrowser in Android, iOS & MacOSX?如何在 Android、iOS 和 MacOSX 中使用 TWebBrowser 使用 WebRTC? In Windows I used TChromiumFMX which has the feature to enable media stream from command line.在 Windows 中,我使用了 TChromiumFMX,它具有从命令行启用媒体流的功能。 But how to do with TWebBrowser.但是怎么用TWebBrowser。 For Android I put following permission and user features:对于 Android,我添加了以下权限和用户功能:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-feature android:name="android.hardware.audio.low_latency"/>
<uses-feature android:name="android.hardware.audio.pro"/>
<uses-feature android:name="android.hardware.microphone" android:required="true"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-feature android:name="android.hardware.camera" android:required="true"/>
<uses-feature android:name="android.hardware.camera.front" android:required="true"/>
<uses-feature android:glEsVersion="0x00020000" android:required="True"/>

It's not working, I am only getting a black circle with black play button image on TWebBrowser.它不起作用,我只在 TWebBrowser 上得到一个带有黑色播放按钮图像的黑色圆圈。 Please help.请帮忙。 在此处输入图片说明

my code to load url:我的代码加载网址:

  {$IFDEF MSWINDOWS}
  mybrowser.Load(Format('https://www.myhost.com/multiple.html?room=%s', [NumberBox1.Value.ToString]));
  {$ELSE}
  mybrowser.URL := Format('https://www.myhost.com/multiple.html?room=%s', [NumberBox1.Value.ToString]);
  mybrowser.Navigate
  {$ENDIF}

Above image is showing on my Nexus 5.上图显示在我的 Nexus 5 上。

I think that TWebBrowser on iOS uses the Safari engine, but Safari doesn't have WebRTC capabilities (yet).我认为 iOS 上的 TWebBrowser 使用 Safari 引擎,但 Safari 没有 WebRTC 功能(还)。 However the Android browser (built-in Chrome as used also for WebViews) has WebRTC and it would be nice if it would work also from a Delphi app.然而,Android 浏览器(内置 Chrome 也用于 WebViews)具有 WebRTC,如果它也可以在 Delphi 应用程序中工作,那就太好了。

Waiting for others to comment on this..等待其他人对此发表评论..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM