# WebRTC FAQ
# 1. Does FinClip Mini-Program SDK Support WebRTC?
Q: I want to use WebRTC capabilities in Mini-Programs. Does FinClip support this?
A: Yes, it is supported. Please ensure the SDK and mobile system meet the following requirements:
| SDK Version Requirement | Mobile System Requirement | |
|---|---|---|
| iOS | FinClip Mini-Program SDK version 2.33.9 or above | iOS system version 14.3 or above |
| Android | FinClip Mini-Program SDK version 2.24.1 or above | Android system version 6.0 or above |
Note
- iOS system version
2.24.4 ~ 2.27.1also supports WebRTC, but when reading UserAgent in HTML5, there may occasionally be cases where Provider/finogeeks (miniprogram; FinChat; runtimeSdkVersion/2.27.1) is not included. It is recommended to use version2.33.9or above. - For Android support details, please refer to the detailed explanation later in this document.
# 2. How to Use WebRTC Within FinClip Mini-Program SDK?
The core capability of WebRTC is to enable real-time audio or video conversations within web browsers. FinClip Mini-Program SDK supports opening specified HTML5 pages via WebView.
Therefore, when using HTML5 pages containing WebRTC-related capabilities, developers only need to focus on the following issues:
- The business domain names for WebRTC relay servers need to be configured. Refer to Feature Introduction - Domain Configuration;
- Before using HTML5 pages containing audio/video functions, camera and microphone permissions must be applied for in advance (it is recommended that the App applies for permissions first).
The FinClip Mini-Program SDK does not declare recording permissions, so the App needs to add permission declarations.
- In iOS projects, permission configuration declarations need to be added in the
info.plistfile. Refer to here; - In Android projects, permission configuration declarations need to be added in the
AndroidManifest.xmlfile. See the example below:
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
# 3. What is the Relationship Between App Permissions and Mini-Programs Within the SDK?
Scenario One: The App has successfully obtained camera and microphone permissions from the user
- At this point, when loading HTML5 containing WebRTC within the FinClip Mini-Program SDK, audio and video can be captured directly;
- Meanwhile, functions within the HTML5 can also pop up Alerts to ask the user whether to allow camera capture or microphone usage, enabling separate control over capture targets.
Scenario Two: If the user has not granted camera and microphone permissions to the App
- At this point, when the SDK loads HTML5 containing WebRTC functions, it will be unable to capture audio and video.
# 4. What is the Support Status of WebRTC in FinClip Android SDK?
- FinClip Android SDK's support for WebRTC originates from the Android native WebView's support for WebRTC.
- According to the Android developer platform's description regarding WebView in Android 5.0, WebView added support for WebRTC starting from Android 5.0. Relevant Description (opens new window)
- Cloud testing data indicates that Android 5.0 devices cannot properly support the official WebRTC sample AppRTC.
The reason is that the Android 5.0 WebView kernel is provided by the Android System WebView APK, and the Android System WebView APK versions included in Android 5.0 cloud testing devices are relatively low. - Cloud testing shows that almost all Android 6.0 and above devices pass the support test for AppRTC. Therefore, it can be concluded that the minimum Android system version supporting WebRTC in FinClip Android SDK is Android 6.0.