6

Already created a post for this on Delphi TWebbrowser to use -enable-media-stream which yet to receive any comment or answer. So I make a different question. How can I use WebRTC using TWebBrowser in Android, iOS & MacOSX? In Windows I used TChromiumFMX which has the feature to enable media stream from command line. But how to do with TWebBrowser. For Android I put following permission and user features:

<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. Please help. enter image description here

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.

Community
  • 1
  • 1
shariful
  • 455
  • 1
  • 9
  • 21
  • If you want to use native WebRTC on ios/android take a look at Alcinoe (https://github.com/Zeus64/alcinoe) – zeus Nov 13 '20 at 22:48

1 Answers1

0

I think that TWebBrowser on iOS uses the Safari engine, but Safari doesn't have WebRTC capabilities (yet). 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.

Waiting for others to comment on this..

Istvan
  • 1,591
  • 1
  • 13
  • 19
  • Is this an answer of my Question? -enable-media-stream commandline switch on chrome enable the camera. This can be done by TChromiumFMX. But Chromium Embeded Framework doesn't support Android. How do I do that with TWebBrowser? That was my question. – shariful Feb 24 '17 at 11:19
  • Hi shariful , do you have a solution for enable the media stream on Android ? I try to make the same thing: show the webrtc media in delphi android embedded webbrowser and I have got the same problem, But If I open the url in an "OS Browser" out of the program(TJIntent) , it works. – Tamas May 22 '20 at 15:20